Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recreate job always if generation has changed #414

Merged
merged 2 commits into from
Jan 19, 2024
Merged

Conversation

raulcabello
Copy link
Contributor

@raulcabello raulcabello commented Jan 16, 2024

Delete the k8s Job if the GitJob generation has changed. This deletion will trigger a reconciliation loop, and a new k8s Job will be created. k8s Jobs are immutable, so we need to delete and recreate.

Don't use retry if there is a conflict error when updating the GitJob Status. This was updating the ObservedGeneration when it shouldn't . Use Requeue instead of retry.

e2e in fleet with this version are passing rancher/fleet#2080

refers to #415

@raulcabello raulcabello force-pushed the gitjob-update-bug branch 2 times, most recently from 3bc2b36 to fda1f18 Compare January 16, 2024 14:45
@raulcabello raulcabello changed the title [wip] Recreate job always if generation has changed Recreate job always if generation has changed Jan 16, 2024
@raulcabello raulcabello marked this pull request as ready for review January 16, 2024 16:55
@raulcabello raulcabello requested a review from a team as a code owner January 16, 2024 16:55
raulcabello and others added 2 commits January 17, 2024 15:45
Co-authored-by: Corentin Néau <tan.neau@suse.com>
Co-authored-by: Xavi Garcia <xavi.garcia@suse.com>
@weyfonk weyfonk merged commit 3079c5d into master Jan 19, 2024
5 checks passed
@weyfonk weyfonk deleted the gitjob-update-bug branch January 19, 2024 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants