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

crypto/keyring: deprecate lazy keybase #5889

Merged
merged 29 commits into from
Mar 30, 2020
Merged

Conversation

alessio
Copy link
Contributor

@alessio alessio commented Mar 29, 2020

Remove redundant lazy keybase implementation altogether.

Created LegacyKeybase interface to restrict capabilities to
only those required by keys commands that deal with
legacy keybase such as update and migrate.

Rename keyring.New() -> keyring.NewLegacy().

Rename client/keys.NewKeyBaseFromDir -> NewLegacyKeyBaseFromDir.

crypto/keyiring.NewInMemory() now returns a in-memory keyring.
BackendMemory is added yet not exposed via command line
--keyring-backend flag. keys add uses it when --dry-run flag
is on.

Remove the Update method from the Keybase interface.

Code cleanup, removed tons of duplicate test cases.


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)

@codecov
Copy link

codecov bot commented Mar 29, 2020

Codecov Report

Merging #5889 into master will increase coverage by 0.00%.
The diff coverage is 47.91%.

@@           Coverage Diff            @@
##           master    #5889    +/-   ##
========================================
  Coverage   56.77%   56.78%            
========================================
  Files         344      342     -2     
  Lines       20307    20047   -260     
========================================
- Hits        11529    11383   -146     
+ Misses       7896     7815    -81     
+ Partials      882      849    -33     

Alessio Treglia added 4 commits March 30, 2020 03:46
Remove duplicate tests
same flag is provided by flags.FlagDryRun
@alessio alessio changed the title deprecate old keybase crypto/keyring: deprecate lazy keybase Mar 30, 2020
@alessio alessio added the C:Keys Keybase, KMS and HSMs label Mar 30, 2020
@alessio alessio marked this pull request as ready for review March 30, 2020 14:07
client/keys/update.go Outdated Show resolved Hide resolved
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.

ACK

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.

ACK. Plz remove extra files

crypto/keyring/testdata/keys/keys.db/CURRENT Show resolved Hide resolved
client/keys/utils.go Outdated Show resolved Hide resolved
client/keys/utils.go Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
Alessio Treglia and others added 2 commits March 30, 2020 19:04
Co-Authored-By: Federico Kunze <[email protected]>
Co-Authored-By: Federico Kunze <[email protected]>
@alessio alessio requested a review from fedekunze March 30, 2020 17:09
@alessio alessio merged commit 2a7a408 into master Mar 30, 2020
@alessio alessio deleted the alessio/remove-old-keybase branch March 30, 2020 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C:Crypto C:Keys Keybase, KMS and HSMs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants