fix: prevent CJI with runOnNotReady from using stale job image#1742
Merged
bsquizz merged 2 commits intoRedHatInsights:masterfrom Mar 9, 2026
Merged
fix: prevent CJI with runOnNotReady from using stale job image#1742bsquizz merged 2 commits intoRedHatInsights:masterfrom
bsquizz merged 2 commits intoRedHatInsights:masterfrom
Conversation
Add generation tracking to ClowdAppStatus so the CJI controller can verify the ClowdApp has been reconciled with its current spec before creating jobs. Without this, a CJI created concurrently with a ClowdApp update could read a stale job spec from the informer cache and launch a job with the old image. This mirrors the existing pattern used by ClowdEnvironment, where Status.Generation is compared against metadata.Generation to detect unreconciled changes. The runOnNotReady flag continues to bypass the deployment readiness check, preserving the init container / migration workflow.
Contributor
|
This looks like a good approach to me. Would it be possible to enhance one of the kuttl tests dealing w/ CJIs to test this? |
Enhance test-runonnotready-cji to verify that a CJI with runOnNotReady picks up an updated job image after a ClowdApp spec change. The test updates the job image from busybox to busybox:1.37 and creates a new CJI, asserting the resulting Job uses the new image.
Contributor
|
/test-e2e |
rodrigonull
added a commit
to rodrigonull/clowder
that referenced
this pull request
Mar 26, 2026
Add the missing generation field to the ClowdApp status schema in deploy.yml and deploy-mutate.yml. Without this, the API server silently prunes the field during status updates, making the generation tracking from PR RedHatInsights#1742 ineffective.
bsquizz
pushed a commit
that referenced
this pull request
Mar 27, 2026
Add the missing generation field to the ClowdApp status schema in deploy.yml and deploy-mutate.yml. Without this, the API server silently prunes the field during status updates, making the generation tracking from PR #1742 ineffective.
3 tasks
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.
Add generation tracking to ClowdAppStatus so the CJI controller can verify the ClowdApp has been reconciled with its current spec before creating jobs. Without this, a CJI created concurrently with a ClowdApp update could read a stale job spec from the informer cache and launch a job with the old image.
This mirrors the existing pattern used by ClowdEnvironment, where Status.Generation is compared against metadata.Generation to detect unreconciled changes.