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

Small non-breaking UX changes to keys {list,delete} commands #5366

Merged
merged 3 commits into from
Dec 5, 2019

Conversation

alessio
Copy link
Contributor

@alessio alessio commented Dec 5, 2019

  • Add --list-names flag to keys command for short listing.
  • Make keys delete accept multiple key names at once.

Usage example:

  • gaiacli keys list -n | xargs gaiacli keys delete

For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

* Add --list-names flag to keys command for short listing.
* Make keys delete accept multiple key names at once.

Usage example:

* gaiacli keys list -n | xargs gaiacli keys delete
@alessio alessio force-pushed the alessio/keyring-delete-all-keys branch from f59b4c8 to 631014b Compare December 5, 2019 11:08
@alessio alessio added the R4R label Dec 5, 2019
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

LGTM, please open a PR on Gaia to test

return cmd
}

func runListCmd(cmd *cobra.Command, args []string) error {
func runListCmd(cmd *cobra.Command, _ []string) error {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we should consider cleaning this in the future

@alessio alessio added C:Keys Keybase, KMS and HSMs C:CLI labels Dec 5, 2019
@codecov
Copy link

codecov bot commented Dec 5, 2019

Codecov Report

Merging #5366 into master will decrease coverage by <.01%.
The diff coverage is 85.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5366      +/-   ##
==========================================
- Coverage   54.64%   54.64%   -0.01%     
==========================================
  Files         311      311              
  Lines       18440    18447       +7     
==========================================
+ Hits        10077    10080       +3     
- Misses       7592     7595       +3     
- Partials      771      772       +1
Impacted Files Coverage Δ
client/keys/list.go 83.33% <80%> (-4.91%) ⬇️
client/keys/delete.go 77.27% <88.23%> (ø) ⬆️
x/mock/app.go 62.83% <0%> (-1.36%) ⬇️

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

testedACK

client/keys/delete.go Outdated Show resolved Hide resolved
@alessio alessio merged commit 0300a6f into master Dec 5, 2019
@alessio alessio deleted the alessio/keyring-delete-all-keys branch December 5, 2019 15:07
xiangjianmeng pushed a commit to xiangjianmeng/cosmos-sdk that referenced this pull request Dec 18, 2019
…5366)

Add --list-names flag to keys command for short listing.

Make keys delete accept multiple key names at once.

Usage example:
 gaiacli keys list -n | xargs gaiacli keys delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:CLI C:Keys Keybase, KMS and HSMs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants