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

chore(upgrade): remove extra gov deps #18316

Merged
merged 1 commit into from
Oct 31, 2023
Merged

chore(upgrade): remove extra gov deps #18316

merged 1 commit into from
Oct 31, 2023

Conversation

tac0turtle
Copy link
Member

@tac0turtle tac0turtle commented Oct 31, 2023

Description

this pr removes extra gov deps, but does not remove it fully due to gov cmd flags needed


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

Refactor:

  • Removed direct dependencies on the "cosmossdk.io/x/gov/types" package in several files, replacing them with a local constant "govModuleName". This change simplifies the codebase and reduces the reliance on external packages.

Tests:

  • Updated test files to reflect the refactoring changes, ensuring that the tests remain accurate and reliable.

Please note that these changes do not introduce new features or fix bugs, but they improve the maintainability and readability of the codebase.

@tac0turtle tac0turtle marked this pull request as ready for review October 31, 2023 09:37
@tac0turtle tac0turtle requested a review from a team as a code owner October 31, 2023 09:37
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 31, 2023

Walkthrough

The changes across the three files primarily revolve around the removal of the "cosmossdk.io/x/gov/types" package import and the replacement of "govtypes.ModuleName" with a constant variable "govModuleName". This refactoring does not affect any function signatures or global data structures.

Changes

File Path Summary
x/upgrade/keeper/.../grpc_query_test.go
x/upgrade/keeper/.../keeper_test.go
x/upgrade/module.go
The import statement for the package "cosmossdk.io/x/gov/types" is removed. The usage of "govtypes.ModuleName" is replaced with a constant variable "govModuleName". No alterations to function signatures or global data structures are made.

🐇🍂

In the season of fall, when the leaves gently sway,

CodeRabbit hopped along, making changes today.

No more "govtypes", in the code it won't show,

"govModuleName" is the star, stealing the show.

So here's to the code, may it run smooth and fine,

Celebrating with carrots, and a glass of dandelion wine! 🥕🍷


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 help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

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.json

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 5c456e6 and f260a73.
Files selected for processing (3)
  • x/upgrade/keeper/grpc_query_test.go (2 hunks)
  • x/upgrade/keeper/keeper_test.go (3 hunks)
  • x/upgrade/module.go (3 hunks)
Files skipped from review due to trivial changes (2)
  • x/upgrade/keeper/grpc_query_test.go
  • x/upgrade/module.go
Additional comments: 3
x/upgrade/keeper/keeper_test.go (3)
  • 12-17: The removal of the "govtypes" package is consistent with the pull request's goal of reducing government dependencies. The remaining imports appear to be necessary for the code to function correctly.

  • 30-30: The introduction of the "govModuleName" constant is a good practice as it improves code readability and maintainability. It also aligns with the pull request's goal of replacing the "govtypes" package.

  • 68-73: The replacement of "govtypes.ModuleName" with "govModuleName" when creating the authority address is consistent with the pull request's goal. Ensure that the "govModuleName" constant is correctly defined and used throughout the codebase.

@github-prbot github-prbot requested review from a team, facundomedica and atheeshp and removed request for a team October 31, 2023 09:46
@tac0turtle tac0turtle added this pull request to the merge queue Oct 31, 2023
Merged via the queue into main with commit 16c2abf Oct 31, 2023
59 of 60 checks passed
@tac0turtle tac0turtle deleted the marko/upgrade_deps branch October 31, 2023 10:32
atheeshp pushed a commit that referenced this pull request Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants