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

Use RequeueAfter for Gitpolling job. #2643

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

0xavi0
Copy link
Contributor

@0xavi0 0xavi0 commented Jul 17, 2024

Uses the Manager's timers instead of creating a different go routine to deal with the polling job.

This is an approach to deal with multiple calls updating the status of a gitrepo in the same reconcile loop. There were issues setting the status and getting it in the same reconcile as the cache was not properly set yet.

This tries to fix those issues by only updating the status once per reconcile.

It also adds a new condition specific for the GitPolling task.

It has been tested with rancher 2.9-head

Refers to: #2631

@0xavi0 0xavi0 added this to the v2.9-Next1 milestone Jul 17, 2024
@0xavi0 0xavi0 self-assigned this Jul 17, 2024
Uses the Manager's timers instead of creating a different go routine to deal with the polling job.

This is an approach to deal with multiple calls updating the status of a `gitrepo` in the same reconcile loop.
There were issues setting the status and getting it in the same reconcile as the cache was not properly set yet.

This tries to fix those issues by only updating the status once per reconcile.

Refers to: rancher#2631

Signed-off-by: Xavi Garcia <[email protected]>
@0xavi0 0xavi0 force-pushed the 2631-gitrepo-status-race-conditions branch from a74fc3a to 98adea9 Compare July 17, 2024 15:49
@0xavi0 0xavi0 marked this pull request as ready for review July 17, 2024 16:09
@0xavi0 0xavi0 requested a review from a team as a code owner July 17, 2024 16:09
@manno manno merged commit 0ef20e4 into rancher:main Jul 22, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants