Skip to content

Commit 6f051a0

Browse files
committed
fix: misleading warning message on workflow execution (#2170)
Signed-off-by: Attila Mészáros <[email protected]>
1 parent 435e9a2 commit 6f051a0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Diff for: operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/workflow/AbstractWorkflowExecutor.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,20 @@ public AbstractWorkflowExecutor(Workflow<P> workflow, P primary, Context<P> cont
4444
protected abstract Logger logger();
4545

4646
protected synchronized void waitForScheduledExecutionsToRun() {
47+
// in case when workflow just contains non-activated dependents,
48+
// it needs to be checked first if there are already no executions
49+
// scheduled at the beginning.
50+
if (noMoreExecutionsScheduled()) {
51+
return;
52+
}
4753
while (true) {
4854
try {
49-
// in case when workflow just contains non-activated dependents,
50-
// it needs to be checked first if there are already no executions
51-
// scheduled at the beginning.
55+
this.wait();
5256
if (noMoreExecutionsScheduled()) {
5357
break;
5458
} else {
5559
logger().warn("Notified but still resources under execution. This should not happen.");
5660
}
57-
this.wait();
5861
} catch (InterruptedException e) {
5962
if (noMoreExecutionsScheduled()) {
6063
logger().debug("interrupted, no more executions for: {}", primaryID);

Diff for: operator-framework/src/test/java/io/javaoperatorsdk/operator/DependentOperationEventFilterIT.java

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class DependentOperationEventFilterIT {
2525
@RegisterExtension
2626
LocallyRunOperatorExtension operator =
2727
LocallyRunOperatorExtension.builder()
28+
.withNamespaceDeleteTimeout(2)
2829
.withReconciler(new DependentOperationEventFilterCustomResourceTestReconciler())
2930
.build();
3031

0 commit comments

Comments
 (0)