Include build args in cache hash generation#2926
Include build args in cache hash generation#2926priyawadhwa merged 4 commits intoGoogleContainerTools:masterfrom
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.
tejal29
left a comment
There was a problem hiding this comment.
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 |
|
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.