Skip to content
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

Use cobra cli for docker-generate command #250

Merged
merged 7 commits into from
Jul 19, 2022

Conversation

chloeyin
Copy link
Contributor

Signed-off-by: zaihaoyin zaihaoyin@microsoft.com

What

Fix #183 by using github.com/spf13/cobra to replace github.com/urfave/cli/v2, which is a cli package also used by oras-cli.

Notice

The whole PR will update about 50 files, which is too difficult to review. I will split them into 4 PRs.
I expect these 4 PRs will do different jobs:

  1. The first PR will update the docker-generate command to use cobra and add some common flags whichcobra will use in later PRs.
  2. The second PR will update the docker-notation command to use cobra.
  3. The third PR will update the notation command to use cobra.
  4. The forth PR will do some clean up jobs, including remoing unused functions and variables, etc.

This is the first PR of the series.

Signed-off-by: zaihaoyin <zaihaoyin@microsoft.com>
@chloeyin chloeyin changed the title Use cobra cli for docker-generate command Use cobra cli for notation command Jul 15, 2022
cmd/docker-generate/metadata.go Outdated Show resolved Hide resolved
cmd/docker-generate/manifest.go Outdated Show resolved Hide resolved
internal/cmd/flags.go Show resolved Hide resolved
cmd/docker-generate/manifest_test.go Outdated Show resolved Hide resolved
Signed-off-by: zaihaoyin <zaihaoyin@microsoft.com>
cmd/docker-generate/metadata.go Show resolved Hide resolved
cmd/docker-generate/generate.go Show resolved Hide resolved
cmd/docker-generate/main.go Show resolved Hide resolved
cmd/docker-generate/manifest.go Show resolved Hide resolved
cmd/docker-generate/manifest.go Outdated Show resolved Hide resolved
cmd/docker-generate/manifest.go Show resolved Hide resolved
cmd/docker-generate/manifest_test.go Show resolved Hide resolved
internal/cmd/flags.go Outdated Show resolved Hide resolved
Signed-off-by: zaihaoyin <chloeyinbetter@outlook.com>
Signed-off-by: zaihaoyin <chloeyinbetter@outlook.com>
Signed-off-by: zaihaoyin <chloeyinbetter@outlook.com>
Signed-off-by: zaihaoyin <chloeyinbetter@outlook.com>
Signed-off-by: zaihaoyin <chloeyinbetter@outlook.com>
@priteshbandi
Copy link
Contributor

Are we going to support docker plugin in notation? If not then we can get rid of docker-generate and docker-notation packages.

Copy link
Contributor

@SteveLasker SteveLasker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for the move to cobra.

@dtzar
Copy link
Contributor

dtzar commented Jul 18, 2022

@priteshbandi - I created a new discussion for dropping those commands. I believe it is a good thing to consider. I think we should not hold up this PR though on the outcome of the discussion.

However @chloeyin I do think you should skip the docker-notation PR for now unless you already have it effectively completed (I know the request was in a bigger PR earlier).

@chloeyin
Copy link
Contributor Author

@priteshbandi - I created a new discussion for dropping those commands. I believe it is a good thing to consider. I think we should not hold up this PR though on the outcome of the discussion.

However @chloeyin I do think you should skip the docker-notation PR for now unless you already have it effectively completed (I know the request was in a bigger PR earlier).

Yes, I can skip the docker-notation PR and keep the docker-notation pkg using github.com/urfave/cli/v2 for now.

@dtzar dtzar changed the title Use cobra cli for notation command Use cobra cli for docker-generate command Jul 19, 2022
@dtzar
Copy link
Contributor

dtzar commented Jul 19, 2022

Since the plan from the discussion yesterday is to remove this and we have two code reviews/approvals from our side. I'm going to go ahead and merge it.

@dtzar dtzar merged commit 88de7d8 into notaryproject:main Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command flags after arguments are discarded without warning
7 participants