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: overrides should not appear in the manifest cache key #9601
Conversation
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
@@ -985,7 +989,7 @@ func mergeSourceParameters(source *v1alpha1.ApplicationSource, path, appName str | |||
overrides = append(overrides, filepath.Join(path, fmt.Sprintf(appSourceFile, appName))) | |||
} | |||
|
|||
var merged v1alpha1.ApplicationSource = *source.DeepCopy() | |||
var merged = *source.DeepCopy() |
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.
The explicit type was redundant.
Codecov Report
@@ Coverage Diff @@
## master #9601 +/- ##
=======================================
Coverage 45.83% 45.83%
=======================================
Files 222 222
Lines 26405 26406 +1
=======================================
+ Hits 12102 12103 +1
Misses 12652 12652
Partials 1651 1651
Continue to review full report at Codecov.
|
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
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
Cherry-picked onto release-2.4 for release with 2.4.3. |
* fix: overrides should not appear in the manifest cache key Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix Helm regression Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix test Signed-off-by: Michael Crenshaw <michael@crenshaw.dev> * fix test again Signed-off-by: Michael Crenshaw <michael@crenshaw.dev>
I think the plugin environment modification should invalidate the cache too. (e.g. |
@arloliu I'm surprised that plugin env vars aren't breaking the cache. They're part of the |
It's the problem I met these days.
the CMP will receive the And if we use the following steps.
The cache will be invalidated in step 2, and step 3 will use the manifest that CMP generated, but the problem is, step 2 also cleans the BTW, the step 2 invokes CMP |
Can you create an issue with those reprod. steps?
Can you create an additional issue for this? :-) |
sure, I'll create a issue for it.
|
That's exceptionally strange. Definitely something we want to sort out. |
Thanks for your help, I fill the info. and created a issue here: |
Currently, git-based parameter overrides appear in the manifest cache key.
That's a problem, because parameter overrides aren't known when the cache
get
occurs. Overrides shouldn't be in the cache key, because getting parameter overrides is a repo operation, and the entire point of the cache is to avoid repo operations.So this change makes sure that overrides do not become part of the cache key. Changes to overrides will still bust the cache, because the changes will cause a change in the
revision
component of the key.Case for cherry-picking: we have a 2.4 user who's spending a lot of money on
git fetches
. I think this is a fairly safe change, and it would help them out.