-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: applicationset reduce redundant reconciles (#12457) #12480
fix: applicationset reduce redundant reconciles (#12457) #12480
Conversation
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #12480 +/- ##
==========================================
+ Coverage 48.94% 48.99% +0.04%
==========================================
Files 246 246
Lines 42435 42486 +51
==========================================
+ Hits 20770 20816 +46
- Misses 19555 19559 +4
- Partials 2110 2111 +1
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
TODO: Add tests |
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rumstead I just remembered... when progressive syncs are enabled, and when the applicationset has a sync strategy, we should trigger reconciles on changes to certain parts of the status field. Specifically, looks like we care about
- status.health.status
- status.sync.status
- status.operationstate
- status.operationstate.phase
@wmgroot am I missing anything?
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
Great catch. It took me a while to understand the different statuses. The statuses on the applicationset track the statuses of the owned applications. The owned applications have their statuses updated by the application controller. Thus, when the application controller updates one of those statuses, we would want to reconcile to trigger the next step in the progressive sync. |
I believe those will cover what the Progressive Syncs feature needs. argo-cd/applicationset/controllers/applicationset_controller.go Lines 978 to 987 in df3bd34
|
Assuming
Edit: Looks like it isn't covered, I added a comment. |
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
@crenshaw-dev just wanted to see if you had any bandwidth soon to review the bug fix? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small things
/cherry-pick release-2.7 |
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
…nto fix/reduce-reconciles
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
@rumstead how would you feel about me just cherry-picking this back to 2.7? If it behaves, and folks later want it picked further-back, I'd be happy to do that. |
I know I wouldn't mind this picked back to 2.4 (of the appset controller). To be on the safer route, I think it makes sense to soak in 2.7. |
Word, let's give it some time in 2.7 and then look at picking it further back. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me.
* fix: applicationset reduce redundant reconciles Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * fix: applicationset reduce redundant reconciles Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * adding tests Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * every line counts Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * deep copy applications from event object Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * update from code review Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * check progressive sync fields Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * check progressive sync fields Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * selective checks for progressive syncs Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * selective checks for progressive syncs Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * pural Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> --------- Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
…3029) * fix: applicationset reduce redundant reconciles * fix: applicationset reduce redundant reconciles * adding tests * every line counts * deep copy applications from event object * update from code review * check progressive sync fields * check progressive sync fields * selective checks for progressive syncs * selective checks for progressive syncs * pural --------- Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> Co-authored-by: rumstead <37445536+rumstead@users.noreply.github.com>
…oproj#12480) (argoproj#13029) * fix: applicationset reduce redundant reconciles * fix: applicationset reduce redundant reconciles * adding tests * every line counts * deep copy applications from event object * update from code review * check progressive sync fields * check progressive sync fields * selective checks for progressive syncs * selective checks for progressive syncs * pural --------- Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> Co-authored-by: rumstead <37445536+rumstead@users.noreply.github.com> Signed-off-by: schakrad <58915923+schakrad@users.noreply.github.com>
…oproj#12480) * fix: applicationset reduce redundant reconciles Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * fix: applicationset reduce redundant reconciles Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * adding tests Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * every line counts Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * deep copy applications from event object Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * update from code review Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * check progressive sync fields Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * check progressive sync fields Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * selective checks for progressive syncs Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * selective checks for progressive syncs Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> * pural Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com> --------- Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>
fixes #12457
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: