Do not resume job that we are waiting to delete and recreate - #353
Merged
Conversation
brandond
force-pushed
the
no-resume-unsynced
branch
6 times, most recently
from
September 3, 2026 05:59
c244db8 to
5efabac
Compare
rbrtbnfgl
approved these changes
Sep 3, 2026
brandond
force-pushed
the
no-resume-unsynced
branch
2 times, most recently
from
September 3, 2026 17:22
4a0bb37 to
a215d32
Compare
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
brandond
force-pushed
the
no-resume-unsynced
branch
from
September 4, 2026 00:43
a215d32 to
c660df2
Compare
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.
If a change is made that would trigger a recreate of the job while the job is waiting to be observed by the job controller, the chart controller may resume the job and then delete and recreate it in quick succession.
The job is eligible for deletion as soon as conditions are present and there are no active or terminating pods - all of which are satisfied at the same time as the job is eligible to be resumed. This quick resume-and-recreate will trigger the same bug in the job controller that we have been trying to avoid.
Work around this by adding an annotation to the job when we are waiting to replace it, and check for this annotation and do not resume the job if it is present.
Adds another test that uses a custom job manager and finalizer so that the test can control the conditions and deletion of the job.
Linked issues: