-
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
refactor: Make CLI argument names consistent #2084
refactor: Make CLI argument names consistent #2084
Conversation
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.
Would it be possible to support both for one release, and log a warning if the old version is set? (And fail if they're both set to different values?)
I think you can do this with:
StringVarP(&opts.SnapshotModeDeprecated, "snapshotMode", "...")
StringVarP(&opts.SnapshotMode, "snapshot-mode", "...")
and validation logic in opts
to warn if SnapshotModeDeprecated
is set, etc.
This might be a better experience for folks using these flags today. With this change, Kaniko will simply fail and they'll have to read the help output and notice the change in order to proceed.
|
@imjasonh: I guess now the PR should be good to go. |
a3edc76
to
20ab9fb
Compare
11d176c
to
00d70af
Compare
661441f
to
7276632
Compare
@imjasonh Lets see if the tests run through. They should... Didnt change anything... |
Is there a reason the |
Probably not. It'd be worth aligning this as well, if anyone's interested in doing it. |
I ll do it! :) Sorry probably a mistake.
BR
Von meinem iPhone gesendet
… Am 13.08.2022 um 04:16 schrieb Jason Hall ***@***.***>:
Is there a reason the --tarPath option wasn't changed to --tar-path?
Probably not.
It'd be worth aligning this as well, if anyone's interested in doing it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
@imjasonh: Its fixed now. Also: I formatted the Readme markdown with prettier. Which is now 80 lines and consistent. |
5826744
to
5cc8564
Compare
@imjasonh: I have no idea why the executor crashes saying |
@imjasonh: This can be merged now, thanks :) I formatted all markdowns, to better have diffs when people add documentation. |
@imjasonh Jeah totally right, we just map the values. |
@imjasonh: I changed the bahv. to warning. Made a note that we should make it deprecated in v2.0.0. Is there a notes file for v2.0.0 to list all things which might be noeted? Maybe there is also a global GO file to make such a variabel, such that we can add checks, and once we are at 2.0.0 we can set it to |
I don't think we need to wait for a full v2, so long as there's ample time to switch, and clear instructions how. I think that's satisfied here. If you want to file an issue to remind us all to complete the migration after the next release (v1.10), that sounds fine. Otherwise I think there's enough context in the code and history to come back and remove it later. Thanks for doing this! |
README still lists the deprecated parameter. Can this be fixed? |
Since GoogleContainerTools#2084, the argument `--snapshotMode` has been deprecated in favor of `--snapshot-mode`. The documentation still contains the old names of the argument.
--snapshotMode
and--customPlatform
and--tarPath
Description
Small refactor to make CLI arguments consistent.
Reviewer Notes
Release Notes
Describe any changes here so maintainer can include it in the release notes, or delete this block.