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

Migrate to spf13/cobra for CLI #11

Merged
merged 2 commits into from
Oct 1, 2020

Conversation

justaugustus
Copy link
Member

@justaugustus justaugustus commented Sep 13, 2020

What type of PR is this?

/kind cleanup feature design

What this PR does / why we need it:

This is somewhat minor change, but enables more contributors to potentially work on zeitgeist, given that all of the Release Engineering in https://github.com/kubernetes/release uses cobra (as well as many other Kubernetes codebases).

Behavior change:
The previous local subcommand has been consolidated into the validate
subcommand. zeitgeist validate now defaults to a local validation unless the
--remote flag is specified (which does both remote and local validation).

/assign @Pluies @saschagrunert @hasheddan @cpanato
cc: @kubernetes-sigs/release-engineering

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

- Migrate to spf13/cobra for CLI
  
  **Behavior change:**
  The previous `local` subcommand has been consolidated into the `validate`
  subcommand. `zeitgeist validate` now defaults to a local validation unless the
  `--remote` flag is specified (which does both remote and local validation).

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
@k8s-ci-robot k8s-ci-robot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Sep 13, 2020
@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. kind/design Categorizes issue or PR as related to design. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Sep 13, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justaugustus

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 13, 2020
Copy link

@hasheddan hasheddan left a comment

Choose a reason for hiding this comment

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

/lgtm
/hold because I imagine @Pluies may want to weigh in :)

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Sep 13, 2020
@justaugustus
Copy link
Member Author

Definitely! Thanks for putting the hold on, Dan!

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Just some nits here and there, otherwise LGTM 👍

.golangci.yml Show resolved Hide resolved
Comment on lines +35 to +40
// Variables set by GoReleaser on release
version = "dev" // nolint: deadcode,unused,varcheck
commit = "none" // nolint: deadcode,unused,varcheck
date = "unknown" // nolint: deadcode,unused,varcheck
Copy link
Member

Choose a reason for hiding this comment

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

I suggest we implement this in a follow-up PR as dedicated sub-command to avoid adding dead-code.

Copy link
Member

Choose a reason for hiding this comment

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

+1

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a TODO for this.

cmd/validate.go Outdated Show resolved Hide resolved
cmd/validate.go Outdated Show resolved Hide resolved
cmd/validate.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 14, 2020
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

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

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 14, 2020
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
Co-authored-by: Sascha Grunert <sgrunert@suse.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 14, 2020
@justaugustus
Copy link
Member Author

Thanks @saschagrunert. Addressed your feedback!

Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Thanks!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 14, 2020
Copy link
Contributor

@Pluies Pluies left a comment

Choose a reason for hiding this comment

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

That looks great! cobra seems to be the most commonly used option, so good all around 👍

@Pluies
Copy link
Contributor

Pluies commented Oct 1, 2020

/hold cancel
🥳

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 1, 2020
@Pluies
Copy link
Contributor

Pluies commented Oct 1, 2020

Hmm, the label is removed but tide is still unhappy... Let's tryyyy
/retest

@k8s-ci-robot k8s-ci-robot merged commit 548bd3d into kubernetes-sigs:master Oct 1, 2020
@Pluies
Copy link
Contributor

Pluies commented Oct 1, 2020

Heyyyy, here we go!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/design Categorizes issue or PR as related to design. kind/feature Categorizes issue or PR as related to a new feature. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/release Categorizes an issue or PR as relevant to SIG Release. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants