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: multi-source app refresh (#11772) #12217
fix: multi-source app refresh (#11772) #12217
Conversation
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Codecov ReportBase: 47.43% // Head: 47.47% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #12217 +/- ##
==========================================
+ Coverage 47.43% 47.47% +0.03%
==========================================
Files 246 246
Lines 41824 41927 +103
==========================================
+ Hits 19838 19903 +65
- Misses 19990 20022 +32
- Partials 1996 2002 +6
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 at Codecov. |
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@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.
Tested the PR locally and it is working as expected. Just a minor nit.
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@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.
LGTM!!
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.
As discussed with @crenshaw-dev, there is room for improvement in the current PR to avoid adding an additional parameter to an already big method signature in Cache.GetManifests
. The agreement was to add TODO
comments in the code so we can unblock 2.6 release and address this refactoring later.
LGTM
* fix multi-source refresh Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * serialize nil and empty resolvedRevisions the same to avoid cache misses Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * more consistent naming Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * document duplication Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * add todo Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Cherry-picked onto release-2.6 for 2.6.0. |
* fix multi-source refresh Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * serialize nil and empty resolvedRevisions the same to avoid cache misses Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * more consistent naming Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * document duplication Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * add todo Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: schakrad <chakradari.sindhu@gmail.com>
Hi Folks, since this exact commit happened, we cannot upgrade our ArgoCD to more than 2.5.22. Our apps are synced but never (hard)refreshed first. It's happening only on one of our cluster, do you have an explanation? |
Fixes #11772
This turns out to be gnarlier than I'd hoped.
Basically, the manifest cache for a source is currently based on only the commit hash of the source, not any other sources it references.
I'm adding code to inject the other sources' commits in the cache key.
This won't help webhooks. There's currently no way for a webhook from referenced-repo-Y to trigger a refresh on referencing-source-X. I'm leaving that fix for another PR.