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

fix: Migrate key names correctly #10328

Merged
merged 35 commits into from
Oct 26, 2021
Merged

fix: Migrate key names correctly #10328

merged 35 commits into from
Oct 26, 2021

Conversation

likhita-809
Copy link
Contributor

Description

Closes: #10219

Migrate key names correctly when migrating from v0.42.9 to master keyring


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #10328 (0d375f1) into master (1326fa2) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10328   +/-   ##
=======================================
  Coverage   64.19%   64.19%           
=======================================
  Files         575      575           
  Lines       54919    54923    +4     
=======================================
+ Hits        35254    35257    +3     
- Misses      17662    17663    +1     
  Partials     2003     2003           
Impacted Files Coverage Δ
client/keys/delete.go 71.79% <ø> (ø)
client/keys/rename.go 69.76% <ø> (ø)
crypto/keyring/types.go 100.00% <ø> (ø)
server/init.go 55.55% <ø> (ø)
crypto/keyring/keyring.go 62.01% <100.00%> (+0.02%) ⬆️
crypto/keyring/legacy_info.go 62.36% <100.00%> (+0.40%) ⬆️

@github-actions github-actions bot added C:CLI C:Keys Keybase, KMS and HSMs labels Oct 13, 2021
@amaury1093 amaury1093 self-assigned this Oct 18, 2021
Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

I think it's better to not expose InfoKey everywhere, just inside the relevant functions in crypto/keyring package

crypto/keyring/types.go Outdated Show resolved Hide resolved
crypto/keyring/legacy_info.go Outdated Show resolved Hide resolved
crypto/keyring/keyring_test.go Outdated Show resolved Hide resolved
client/keys/add_ledger_test.go Show resolved Hide resolved
client/keys/add_ledger_test.go Show resolved Hide resolved
crypto/keyring/keyring_test.go Outdated Show resolved Hide resolved
crypto/keyring/legacy_info.go Outdated Show resolved Hide resolved
crypto/keyring/keyring.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

utACK

Copy link
Contributor

@aleem1314 aleem1314 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

tACK. I tested the repro described in the original issue. Thanks @likhita-809!

Some small nits.

crypto/keyring/keyring.go Outdated Show resolved Hide resolved
crypto/keyring/keyring.go Outdated Show resolved Hide resolved
@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Oct 26, 2021
@mergify mergify bot merged commit 3cc5658 into master Oct 26, 2021
@mergify mergify bot deleted the likhita/fix-keyring-migration branch October 26, 2021 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:CLI C:Keys Keybase, KMS and HSMs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyring migration doesn't migrate key names correctly
4 participants