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(client/keys): don't return when key not found in keys delete #18562

Merged
merged 5 commits into from
Nov 27, 2023

Conversation

JulianToledano
Copy link
Contributor

@JulianToledano JulianToledano commented Nov 27, 2023

Description

Closes:
#18561


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
  • run make lint and make test
  • 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)

Summary by CodeRabbit

  • Bug Fixes
    • Improved the keys delete command to continue processing when a non-existent key is specified, providing an error message instead of terminating.
    • Resolved a configuration issue that caused a panic when setting minimum gas prices.
    • Corrected the public key usage during transaction simulation for accurate results.
    • Ensured that FinalizeBlock calls are now correctly passed to ABCIListeners for consistent block finalization.

@JulianToledano JulianToledano requested a review from a team as a code owner November 27, 2023 10:41
Copy link
Contributor

coderabbitai bot commented Nov 27, 2023

Walkthrough

Walkthrough

The changes involve updates to the cosmos/cosmos-sdk project, focusing on error handling and bug fixes. The keys delete command in the CLI has been modified to handle cases where a key is not found by printing an error message and continuing with the next keys. Additionally, the changelog indicates fixes for a panic issue related to gas configuration, improvements in transaction simulation using the correct public key, and ensuring that FinalizeBlock calls are correctly passed to ABCIListeners.

Changes

File Summary
client/keys/delete.go Modified error handling to continue key deletion process even if a key is not found, instead of terminating.
CHANGELOG.md Documented bug fixes including the keys delete command behavior, gas config panic resolution, correct public key usage in transaction simulation, and FinalizeBlock calls handling.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@github-actions github-actions bot added C:CLI C:Keys Keybase, KMS and HSMs labels Nov 27, 2023

This comment has been minimized.

@JulianToledano JulianToledano linked an issue Nov 27, 2023 that may be closed by this pull request
1 task
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 44e5bec and cca4105.
Files selected for processing (2)
  • CHANGELOG.md (1 hunks)
  • client/keys/delete.go (1 hunks)
Files skipped from review due to trivial changes (1)
  • client/keys/delete.go
Additional comments: 1
CHANGELOG.md (1)
  • 72-72: The changelog entries are clear and provide direct links to the associated pull requests, which is good for traceability.

client/keys/delete.go Outdated Show resolved Hide resolved
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

utACK!

@julienrbrt julienrbrt changed the title fix: don't return when key not found in keys delete fix(clientḱeys): don't return when key not found in keys delete Nov 27, 2023
@julienrbrt julienrbrt changed the title fix(clientḱeys): don't return when key not found in keys delete fix(client/keys): don't return when key not found in keys delete Nov 27, 2023
@julienrbrt
Copy link
Member

julienrbrt commented Nov 27, 2023

Can you have a look at Test_runDeleteCmd?

@julienrbrt julienrbrt added this pull request to the merge queue Nov 27, 2023
Merged via the queue into main with commit 7d5c2db Nov 27, 2023
58 of 59 checks passed
@julienrbrt julienrbrt deleted the julian/fix-delete-key-list branch November 27, 2023 12:10
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.

[Bug]: delete key error if key not found in list
3 participants