kaniko icon indicating copy to clipboard operation
kaniko copied to clipboard

refactor: Make CLI argument names consistent

Open gabyx opened this issue 2 years ago • 3 comments

  • Rename --snapshotMode and --customPlatform.

Description

Small refactor to make CLI arguments consistent.

Reviewer Notes

  • [ ] The code flow looks good.

Release Notes

Describe any changes here so maintainer can include it in the release notes, or delete this block.

Examples of user facing changes:
- Flag `--snapshotMode` is now called `--snapshot-mode`.
- Flag `--customPlatform` is now called `--custom-platform`.

gabyx avatar May 10 '22 08:05 gabyx

Ah did not know about this, in cobra.

gabyx avatar May 10 '22 19:05 gabyx

@imjasonh: I guess now the PR should be good to go.

gabyx avatar May 17 '22 17:05 gabyx

@imjasonh Lets see if the tests run through. They should... Didnt change anything...

gabyx avatar Jul 01 '22 15:07 gabyx

Is there a reason the --tarPath option wasn't changed to --tar-path?

glennakamura avatar Aug 13 '22 02:08 glennakamura

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.

imjasonh avatar Aug 13 '22 02:08 imjasonh

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.

gabyx avatar Aug 13 '22 04:08 gabyx

@imjasonh: Its fixed now.

Also: I formatted the Readme markdown with prettier. Which is now 80 lines and consistent. Also: I made the argument section a bit nicer.

gabyx avatar Aug 13 '22 17:08 gabyx

@imjasonh: I have no idea why the executor crashes saying --customPlatform is deprecated?? We are not using this argument...? Do you see it?

gabyx avatar Aug 19 '22 14:08 gabyx

@imjasonh: This can be merged now, thanks :)

I formatted all markdowns, to better have diffs when people add documentation.

gabyx avatar Aug 19 '22 17:08 gabyx

@imjasonh Jeah totally right, we just map the values.

gabyx avatar Aug 20 '22 08:08 gabyx

@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 true and check all places and refactor them.

gabyx avatar Aug 22 '22 06:08 gabyx

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 true and check all places and refactor them.

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!

imjasonh avatar Aug 22 '22 13:08 imjasonh

README still lists the deprecated parameter. Can this be fixed? https://github.com/GoogleContainerTools/kaniko#flag---snapshotmode

acohenOT avatar Oct 08 '22 18:10 acohenOT