-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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: Change condition for the behaviour when --no-push=true without setting --destinations #2676
Fix: Change condition for the behaviour when --no-push=true without setting --destinations #2676
Conversation
941ef6a
to
f0c2ff4
Compare
In testing with this PR, it seems that when test command:
output @ HEAD (w/o this PR)
output w/ this PR
This makes sense as with this change, we short circuit Line 210 in f0c2ff4
Which means we don't get to the tarPath logic here: Lines 213 to 227 in f0c2ff4
Fixing this is somewhat non-trivial as currently the tarPath logic requires usage of a map that is empty when no destination is set: Line 221 in f0c2ff4
While the logic here could be tweaked to not require a manifest.json in the resulting filename.tar file (eg: --tar-path=filename.tar)
From this, the simplest fix would likely be to modify the kaniko logic s.t. when |
Thanks @aaron-prindle , I'm trying to get a better understanding of different combinations of opts here, wondering if the following makes sense:
|
Yes +1, the behaviour for the three cases you outlined is exactly what is desired |
f0c2ff4
to
2643a7c
Compare
Just tried it and it works great! I left one small comment regarding a test case name being a dupe. After that is resolved we should be good to merge! 🎊 As expected the dummy value is present in the manifest.json
and as discussed the dummy value existing in the tar should not be an issue for users ommitting the |
…nations This commit changes the condition check for the behavior when no-push is set to true while destinations are needed. Prior this change, users would have to set destinations even when noPush option is set to true. More specifically, a workaround for tar files to be generated when --no-push is true and destinations is empty is provided where a dummy destination would be set.
2643a7c
to
ec0d89e
Compare
Thanks for the review @aaron-prindle . Updated. |
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! Thanks for the PR @JeromeJu! 🎊
Fixes #1613
Description
This commit changes the condition check for the behavior when
--no-push
is set to true while destinations are needed. Prior this change, users would have to set destinations even when noPush option is set to true.Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Reviewer Notes