Repository navigation
Conversation
The reconciliation counter is incremented at the start of reconcile(), before the status patch is applied, so the await condition could see a positive count, an existing Deployment and a still-null status. The resulting NullPointerException is not an AssertionError, so Awaitility fails immediately instead of polling again. Assert the status is not null first so the condition is retried until the patch lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the test-only change adding null-status guards to the polling assertions.
No open issues 🎉
What changed in this PR
This test-only change prevents intermittent null-pointer failures in WorkflowAllFeatureIT while reconciliation status is still being published.
Changes:
- Adds non-null status assertions in both polling blocks so Awaitility retries instead of failing immediately.
- Stores the first block’s status lookup locally before checking its fields.
| File | Description |
|---|---|
operator-framework/src/test/java/io/javaoperatorsdk/operator/workflow/workflowallfeature/WorkflowAllFeatureIT.java |
Guards status reads in configMapNotReconciledUntilDeploymentReady against delayed status publication. |
Review effort: Balanced
gaborgsomogyi
approved these changes
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WorkflowAllFeatureIT.configMapNotReconciledUntilDeploymentReadyfails intermittently in CI with:The reconciler increments its execution counter at the start of
reconcile(), but the status patch is only applied after it returns. In the gap between the Deployment being created and the status patch landing, the first await condition sees a positive count, an existing Deployment, no ConfigMap and anullstatus. The resulting NPE is not anAssertionError, so Awaitility fails the test straight away instead of polling again. In the failing run the test died about 1s in, well within the 10s timeout.This PR asserts that the status is not null before dereferencing it, in both await blocks, so the condition is retried until the patch is visible. The other tests in the class already do this.
Test-only change. I verified it with
spotless:checkandtest-compile; I did not run the IT locally because it needs a cluster.🤖 Generated with Claude Code
Summary by CodeRabbit