-
Notifications
You must be signed in to change notification settings - Fork 1.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
Include build args in cache hash generation #2926
Include build args in cache hash generation #2926
Conversation
Include build args in cache hash generation. This should fix the bug described in GoogleContainerTools#2922, where changing buildArgs resulted in the same cache key, causing incorrect deployments.
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.
Add 2 more test cases. Rest LGTM
Would it make sense to cover build args that use things like environment variables as well? |
Codecov Report
|
Hey @Multiply so build args actually don't support environment variable substitution right now in the skaffold config. |
@priyawadhwa I'm using them locally at the moment. (using buildkit) |
@Multiply ah gotcha, I'll add that in |
Lets not do 2 things in one PR. Can we please move the environment substitution to another PR? Thanks |
So we need to
I don't think it makes sense to split these up, because I can't write tests for the former without the code for the latter (since I'm testing that the hash at the end is correct. The environment substitution itself is a function in a different package which I'm reusing) |
Ah fair enough, you haven't written any extra logic for testing the environment solution. just 1 line change
|
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.
test nit.
Failed due to |
Fixes #2922
Description
Include build args in cache hash generation. This should fix the bug
described in #2922, where changing buildArgs resulted in the same
cache key, causing incorrect deployments.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
Reviewer Notes
Release Notes
Describe any user facing changes here so maintainer can include it in the release notes, or delete this block.
Include build args in cache hash generation. This should fix the bug
described in #2922, where changing buildArgs resulted in the same
cache key, causing incorrect deployments.