fix(appset): Fix perpetual appset reconciliation#19822
Merged
agaudreault merged 1 commit intoargoproj:masterfrom Sep 13, 2024
Merged
fix(appset): Fix perpetual appset reconciliation#19822agaudreault merged 1 commit intoargoproj:masterfrom
agaudreault merged 1 commit intoargoproj:masterfrom
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #19822 +/- ##
=========================================
Coverage ? 55.84%
=========================================
Files ? 320
Lines ? 44381
Branches ? 0
=========================================
Hits ? 24786
Misses ? 17027
Partials ? 2568 ☔ View full report in Codecov by Sentry. |
d83db00 to
998da98
Compare
Contributor
Author
|
I see there is a license check problem, if I read correctly, the problem also appears on other PRs, is there anything needed from us to fix it? |
6aed467 to
aa67e2d
Compare
agaudreault
requested changes
Sep 10, 2024
Golang maps do not guarantee the order of the application resources from the applicationset which causes rapid sync activity for the applicationset as the objects and hence their resourceVersions are updated after each reconcile loop. This then triggers reconciliation of all objects watching the ApplicationSet. In order to prevent this behaviour, ensure that the ApplicationSet reconciler provides an idempotent list of resources, ensuring objects are not updated. Fixes: argoproj#19757 Co-authored-by: Fabian Selles <fabian.sellesrosa@gmail.com> Co-authored-by: Ariadna Rouco <ariadna.rouco@adevinta.com> Signed-off-by: Thibault Jamet <thibault.jamet@adevinta.com> Signed-off-by: Fabián Sellés <fabian.selles@adevinta.com>
aa67e2d to
d39b7c7
Compare
Contributor
|
Would be great to get a patch release for this, it is very noisy inside our etcd 😓 |
|
yes please! 👆 🙏 |
Member
|
/cherry-pick release-2.12 |
gcp-cherry-pick-bot bot
pushed a commit
that referenced
this pull request
Sep 18, 2024
Golang maps do not guarantee the order of the application resources from the applicationset which causes rapid sync activity for the applicationset as the objects and hence their resourceVersions are updated after each reconcile loop. This then triggers reconciliation of all objects watching the ApplicationSet. In order to prevent this behaviour, ensure that the ApplicationSet reconciler provides an idempotent list of resources, ensuring objects are not updated. Fixes: #19757 Signed-off-by: Thibault Jamet <thibault.jamet@adevinta.com> Signed-off-by: Fabián Sellés <fabian.selles@adevinta.com> Co-authored-by: Fabian Selles <fabian.sellesrosa@gmail.com> Co-authored-by: Ariadna Rouco <ariadna.rouco@adevinta.com>
gdsoumya
pushed a commit
that referenced
this pull request
Sep 19, 2024
Golang maps do not guarantee the order of the application resources from the applicationset which causes rapid sync activity for the applicationset as the objects and hence their resourceVersions are updated after each reconcile loop. This then triggers reconciliation of all objects watching the ApplicationSet. In order to prevent this behaviour, ensure that the ApplicationSet reconciler provides an idempotent list of resources, ensuring objects are not updated. Fixes: #19757 Signed-off-by: Thibault Jamet <thibault.jamet@adevinta.com> Signed-off-by: Fabián Sellés <fabian.selles@adevinta.com> Co-authored-by: Thibault Jamet <tjamet@users.noreply.github.com> Co-authored-by: Fabian Selles <fabian.sellesrosa@gmail.com> Co-authored-by: Ariadna Rouco <ariadna.rouco@adevinta.com>
3 tasks
adriananeci
pushed a commit
to adriananeci/argo-cd
that referenced
this pull request
Dec 4, 2024
Golang maps do not guarantee the order of the application resources from the applicationset which causes rapid sync activity for the applicationset as the objects and hence their resourceVersions are updated after each reconcile loop. This then triggers reconciliation of all objects watching the ApplicationSet. In order to prevent this behaviour, ensure that the ApplicationSet reconciler provides an idempotent list of resources, ensuring objects are not updated. Fixes: argoproj#19757 Signed-off-by: Thibault Jamet <thibault.jamet@adevinta.com> Signed-off-by: Fabián Sellés <fabian.selles@adevinta.com> Co-authored-by: Fabian Selles <fabian.sellesrosa@gmail.com> Co-authored-by: Ariadna Rouco <ariadna.rouco@adevinta.com> Signed-off-by: Adrian Aneci <aneci@adobe.com>
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.
ScmProvider does not guarantee order of the application resources from the applicationset which causes rapid sync activity for the applicationset as the objects and hence their resourceVersions are updated after each reconcile loop.
This then triggers reconciliation of all objects watching the ApplicationSet.
In order to prevent this behaviour, ensure that the ApplicationSet reconciler provides an idempotent list of resources, ensuring objects are not updated.
Fixes: #19757
This PR is an alternate approach to #19676.
In #19676, the approach is to only reconcile based on generation changes, i.e.
specchanges as defined by the generation implementation in CRDs.This means that, with this PR, any change of metadata (labels, annotations, ...) or status will be taken into consideration on the next run (triggered by requeueAfter, 3mn by default in my trials), which is the way new SCM repos or folders are discovered from my understanding.
This PR takes a different approach, ensuring that status updates are idempotent across reconcile loops and hence prevents from triggering any reconciliation in other reconcilers unless there is an actual change on the ApplicationSet.
Checklist: