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

refactor: move gov into own go.mod #18197

Merged
merged 16 commits into from
Oct 23, 2023
Merged

refactor: move gov into own go.mod #18197

merged 16 commits into from
Oct 23, 2023

Conversation

tac0turtle
Copy link
Member

@tac0turtle tac0turtle commented Oct 21, 2023

Description

ref #11899

spinout the governance module


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: The 'gov' module has been modularized and moved to its own go.mod file, improving the organization of the codebase.
  • New Feature: A new job test-x-gov has been added to the GitHub Actions workflow, enhancing the testing process by running tests and analysis when changes are made to specific Go files.
  • Refactor: The NewValidatorSigningInfo function in the slashing module now takes strings instead of sdk.AccAddress, simplifying its usage.
  • Refactor: Import paths in various files have been updated to reflect the new location of the gov module, ensuring consistency across the codebase.
  • Chore: The .github/workflows/test.yml and .golangci.yml files have been updated to accommodate the changes in the gov module.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2023

Walkthrough

The changes primarily involve the modularization of the gov package in the Cosmos SDK codebase. The package has been moved to its own go.mod file and the import paths have been updated across multiple files to reflect this change. Additionally, the GitHub Actions workflow has been updated to include a new job for testing changes in the gov package.

Changes

Files Summary
.github/workflows/test.yml Added a new job test-x-gov to the GitHub Actions workflow to handle changes in the gov package.
CHANGELOG.md, UPGRADING.md, go.work.example Documented the modularization of the gov package and updated the import paths.
proto/cosmos/gov/... Updated the go_package option in the protocol buffer files to reflect the new import path for the gov package.
simapp/..., tests/..., x/gov/... Updated the import statements across multiple files to use the new import path for the gov package.
store/storage/rocksdb/comparator.go Simplified the function signatures in the compareTS and compare functions.
.golangci.yml Added a new file to the list of skipped files in the run configuration.

"Hop, hop, hop, 🐇
Code changes non-stop. 🔄
Modularization on top, 📦
Making our codebase hop non-stop! 🎉"


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.

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

@tac0turtle tac0turtle marked this pull request as ready for review October 21, 2023 15:09
@tac0turtle tac0turtle requested a review from a team as a code owner October 21, 2023 15:09
@github-prbot github-prbot requested review from a team, samricotta and atheeshp and removed request for a team October 21, 2023 15:09
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

Commits Files that changed from the base of the PR and between 2fbc547 and 8d0ceb9.
Files ignored due to filter (23)
  • client/v2/go.mod
  • go.mod
  • simapp/go.mod
  • tests/go.mod
  • tests/starship/tests/go.mod
  • x/circuit/go.mod
  • x/evidence/go.mod
  • x/feegrant/go.mod
  • x/gov/go.mod
  • x/gov/go.sum
  • x/gov/types/v1/genesis.pb.go
  • x/gov/types/v1/gov.pb.go
  • x/gov/types/v1/query.pb.go
  • x/gov/types/v1/tx.pb.go
  • x/gov/types/v1beta1/genesis.pb.go
  • x/gov/types/v1beta1/gov.pb.go
  • x/gov/types/v1beta1/query.pb.go
  • x/gov/types/v1beta1/tx.pb.go
  • x/group/go.mod
  • x/nft/go.mod
  • x/params/go.mod
  • x/protocolpool/go.mod
  • x/upgrade/go.mod
Files selected for processing (57)
  • .github/workflows/test.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • UPGRADING.md (1 hunks)
  • go.work.example (1 hunks)
  • proto/cosmos/gov/module/v1/module.proto (2 hunks)
  • proto/cosmos/gov/v1/genesis.proto (1 hunks)
  • proto/cosmos/gov/v1/gov.proto (1 hunks)
  • proto/cosmos/gov/v1/query.proto (1 hunks)
  • proto/cosmos/gov/v1/tx.proto (1 hunks)
  • proto/cosmos/gov/v1beta1/genesis.proto (1 hunks)
  • proto/cosmos/gov/v1beta1/gov.proto (1 hunks)
  • proto/cosmos/gov/v1beta1/query.proto (1 hunks)
  • proto/cosmos/gov/v1beta1/tx.proto (1 hunks)
  • simapp/app.go (2 hunks)
  • simapp/app_config.go (2 hunks)
  • simapp/app_test.go (2 hunks)
  • simapp/app_v2.go (2 hunks)
  • tests/e2e/auth/suite.go (2 hunks)
  • tests/e2e/authz/tx.go (2 hunks)
  • tests/e2e/client/grpc/cmtservice/service_test.go (2 hunks)
  • tests/e2e/gov/cli_test.go (1 hunks)
  • tests/e2e/gov/deposits.go (1 hunks)
  • tests/e2e/gov/grpc.go (1 hunks)
  • tests/e2e/gov/tx.go (1 hunks)
  • tests/integration/auth/client/cli/suite_test.go (2 hunks)
  • tests/integration/bank/app_test.go (2 hunks)
  • tests/integration/gov/common_test.go (1 hunks)
  • tests/integration/gov/genesis_test.go (2 hunks)
  • tests/integration/gov/keeper/common_test.go (1 hunks)
  • tests/integration/gov/keeper/grpc_query_test.go (1 hunks)
  • tests/integration/gov/keeper/keeper_test.go (2 hunks)
  • tests/integration/gov/keeper/tally_test.go (1 hunks)
  • tests/integration/gov/module_test.go (1 hunks)
  • tests/integration/rapidgen/rapidgen.go (1 hunks)
  • tests/integration/tx/aminojson/aminojson_test.go (2 hunks)
  • tests/integration/tx/decode_test.go (2 hunks)
  • types/mempool/mempool_test.go (2 hunks)
  • x/authz/client/cli/tx_test.go (2 hunks)
  • x/authz/migrations/v2/store_test.go (2 hunks)
  • x/authz/simulation/genesis.go (1 hunks)
  • x/authz/testutil/app_config.go (1 hunks)
  • x/crisis/keeper/msg_server.go (1 hunks)
  • x/crisis/module.go (2 hunks)
  • x/feegrant/client/cli/tx_test.go (2 hunks)
  • x/gov/CHANGELOG.md (1 hunks)
  • x/gov/abci.go (1 hunks)
  • x/gov/abci_test.go (1 hunks)
  • x/gov/client/cli/prompt.go (1 hunks)
  • x/gov/client/cli/prompt_test.go (1 hunks)
  • x/gov/client/cli/tx.go (1 hunks)
  • x/gov/client/cli/tx_test.go (2 hunks)
  • x/gov/client/cli/util.go (1 hunks)
  • x/gov/client/cli/util_test.go (1 hunks)
  • x/gov/client/testutil/helpers.go (1 hunks)
  • x/gov/client/utils/query.go (1 hunks)
  • x/gov/client/utils/query_test.go (1 hunks)
  • x/gov/client/utils/utils.go (1 hunks)
Files not processed due to max files limit (60)
  • x/gov/client/utils/utils_test.go
  • x/gov/common_test.go
  • x/gov/genesis.go
  • x/gov/genesis_test.go
  • x/gov/keeper/common_test.go
  • x/gov/keeper/deposit.go
  • x/gov/keeper/deposit_test.go
  • x/gov/keeper/grpc_query.go
  • x/gov/keeper/grpc_query_test.go
  • x/gov/keeper/hooks_test.go
  • x/gov/keeper/internal_test.go
  • x/gov/keeper/invariants.go
  • x/gov/keeper/keeper.go
  • x/gov/keeper/keeper_test.go
  • x/gov/keeper/migrations.go
  • x/gov/keeper/msg_server.go
  • x/gov/keeper/msg_server_test.go
  • x/gov/keeper/proposal.go
  • x/gov/keeper/proposal_test.go
  • x/gov/keeper/tally.go
  • x/gov/keeper/tally_test.go
  • x/gov/keeper/vote.go
  • x/gov/keeper/vote_test.go
  • x/gov/migrations/v3/convert.go
  • x/gov/migrations/v3/convert_test.go
  • x/gov/migrations/v5/store.go
  • x/gov/migrations/v5/store_test.go
  • x/gov/module.go
  • x/gov/simulation/genesis.go
  • x/gov/simulation/genesis_test.go
  • x/gov/simulation/operations.go
  • x/gov/simulation/operations_test.go
  • x/gov/simulation/proposals.go
  • x/gov/simulation/proposals_test.go
  • x/gov/sonar-project.properties
  • x/gov/testutil/expected_keepers.go
  • x/gov/types/v1/content.go
  • x/gov/types/v1/genesis_test.go
  • x/gov/types/v1/msgs.go
  • x/gov/types/v1/msgs_test.go
  • x/gov/types/v1/proposals_test.go
  • x/gov/types/v1beta1/proposal.go
  • x/gov/types/v1beta1/proposals_test.go
  • x/group/client/cli/prompt.go
  • x/group/keeper/msg_server.go
  • x/params/client/cli/tx.go
  • x/params/client/proposal_handler.go
  • x/params/module.go
  • x/params/proposal_handler.go
  • x/params/types/proposal/codec.go
  • x/params/types/proposal/proposal.go
  • x/protocolpool/testutil/app_config.go
  • x/slashing/keeper/keeper_test.go
  • x/slashing/keeper/msg_server.go
  • x/slashing/module.go
  • x/upgrade/abci_test.go
  • x/upgrade/client/cli/tx.go
  • x/upgrade/keeper/grpc_query_test.go
  • x/upgrade/keeper/keeper_test.go
  • x/upgrade/module.go
Files skipped from review due to trivial changes (37)
  • proto/cosmos/gov/module/v1/module.proto
  • proto/cosmos/gov/v1/genesis.proto
  • proto/cosmos/gov/v1/gov.proto
  • proto/cosmos/gov/v1/query.proto
  • proto/cosmos/gov/v1/tx.proto
  • proto/cosmos/gov/v1beta1/genesis.proto
  • proto/cosmos/gov/v1beta1/gov.proto
  • proto/cosmos/gov/v1beta1/query.proto
  • proto/cosmos/gov/v1beta1/tx.proto
  • simapp/app.go
  • simapp/app_test.go
  • tests/e2e/auth/suite.go
  • tests/e2e/authz/tx.go
  • tests/e2e/client/grpc/cmtservice/service_test.go
  • tests/e2e/gov/deposits.go
  • tests/e2e/gov/grpc.go
  • tests/e2e/gov/tx.go
  • tests/integration/gov/keeper/tally_test.go
  • tests/integration/rapidgen/rapidgen.go
  • tests/integration/tx/aminojson/aminojson_test.go
  • tests/integration/tx/decode_test.go
  • types/mempool/mempool_test.go
  • x/authz/client/cli/tx_test.go
  • x/authz/migrations/v2/store_test.go
  • x/authz/simulation/genesis.go
  • x/authz/testutil/app_config.go
  • x/crisis/keeper/msg_server.go
  • x/crisis/module.go
  • x/feegrant/client/cli/tx_test.go
  • x/gov/CHANGELOG.md
  • x/gov/abci.go
  • x/gov/client/cli/prompt.go
  • x/gov/client/cli/prompt_test.go
  • x/gov/client/cli/tx_test.go
  • x/gov/client/cli/util.go
  • x/gov/client/utils/query.go
  • x/gov/client/utils/utils.go
Additional comments (Suppressed): 33
go.work.example (1)
  • 23-23: The ./x/gov module has been added to the go.work.example file. Ensure that all dependencies and imports in the codebase have been updated to reflect this change. Also, verify that the new module does not introduce any circular dependencies or conflicts with existing modules.
tests/e2e/gov/cli_test.go (1)
  • 12-12: The import path for gov types has been updated from github.com/cosmos/cosmos-sdk/x/gov/types/v1 to cosmossdk.io/x/gov/types/v1. Ensure that the new path is correct and the package is available at this location.
tests/integration/gov/common_test.go (1)
  • 8-16: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that the new paths are correct and that all dependencies are properly managed in the new go.mod file for the gov module. Also, verify that the new module is correctly imported in all other parts of the codebase where it's used.
CHANGELOG.md (3)
  • 173-176: The changes to the x/group and x/gov modules, moving them to their own go.mod files, are well documented here. This will help users understand the new import paths.

  • 176-176: Ensure that all instances of github.com/cosmos/cosmos-sdk/x/gov have been replaced with cosmossdk.io/x/gov in the codebase to avoid import errors.

  • 178-178: The change in the NewValidatorSigningInfo function's signature is well documented. Make sure that all calls to this function have been updated to pass strings instead of sdk.AccAddress.

tests/integration/gov/module_test.go (1)
  • 12-12: The import path for the gov/types package has been updated from github.com/cosmos/cosmos-sdk/x/gov/types to cosmossdk.io/x/gov/types. Ensure that the new path is correct and accessible, and that all references to this package in the codebase have been updated to reflect this change.
tests/integration/gov/keeper/grpc_query_test.go (1)
  • 12-13: The import paths have been updated to reflect the new location of the gov module. Ensure that the new paths are correct and that all dependencies are properly managed in the new go.mod file for the gov module.
tests/integration/gov/keeper/common_test.go (1)
  • 7-17: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that the new paths are correct and that all dependencies are properly managed in the new go.mod file for the gov module.
UPGRADING.md (2)
  • 38-44: The changes in the import paths for the group and gov modules are clearly stated. Ensure that all instances of these import paths in the codebase have been updated to reflect these changes.

  • 45-47: The creation of a standalone Go module for params is well documented. Make sure that all references to this module in the codebase are updated to use the new import path.

tests/integration/bank/app_test.go (2)
  • 13-20: The import paths for the gov module have been updated to reflect the new location. Ensure that the new paths are correct and that all dependencies are properly resolved.

  • 32-36: The import statement for the gov module has been removed from this section. This change is consistent with the update in the previous hunk. Ensure that this does not affect any functionality that depends on the gov module.

tests/integration/gov/genesis_test.go (2)
  • 12-18: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module is correctly isolated in its own go.mod file.

  • 28-33: The import paths for the bank, consensus, and staking modules have not been updated. If these modules have also been moved to their own go.mod files, their import paths should be updated to reflect their new locations.

simapp/app_v2.go (1)
  • 24-24: The import path for govkeeper has been updated from github.com/cosmos/cosmos-sdk/x/gov/keeper to cosmossdk.io/x/gov/keeper. Ensure that the new path is correct and the package at this location provides the expected functionality. Also, verify that all references to govkeeper in the codebase have been updated to reflect this change.
x/gov/client/cli/util_test.go (1)
  • 18-19: The import paths for the gov module have been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that the new paths are correct and the new module location is accessible. Also, verify that all references to these packages in the codebase have been updated to reflect this change.
tests/integration/gov/keeper/keeper_test.go (2)
  • 14-18: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module is correctly located at the new path. Also, verify that all dependencies of the gov module have been updated to use the new import paths.

  • 29-34: The import paths for the gov module have been removed from this section. This is consistent with the changes in the previous hunk where the gov module was imported using the new paths. This change is acceptable as long as the new paths are correct and the module is correctly located at the new path.

tests/integration/auth/client/cli/suite_test.go (2)
  • 14-22: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module is accessible at the new location. Also, verify that all dependencies of the gov module have been updated to use the new import paths.

  • 36-39: The import paths for the gov module have been removed from this section. This change is consistent with the update to the import paths in lines 14-22.

simapp/app_config.go (2)
  • 44-49: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that the new module location is accessible and the import paths are correct. Also, verify that all dependencies of the gov module are correctly handled in the new location.

  • 65-70: The import statements for the gov module have been removed in this hunk. This change is consistent with the update in the previous hunk where the gov module was imported from its new location.

x/gov/client/cli/tx.go (2)
  • 10-13: The import paths for govutils, types, v1, and v1beta1 have been updated to reflect the new location of the gov module. Ensure that the new paths are correct and that the gov module has been properly moved to its new location. Also, verify that all dependencies of these packages have been updated to use the new import paths.

  • 14-18: The import paths for the client, flags, tx, types, and version packages from the cosmos/cosmos-sdk repository remain unchanged. Ensure that these packages have not been moved or refactored in a way that would require their import paths to be updated.

x/gov/client/utils/query_test.go (1)
  • 14-16: The import paths for the gov, utils, and v1 packages have been updated to reflect the new module structure. Ensure that the new paths are correct and that the packages are correctly set up in their new locations. Also, verify that all other references to these packages in the codebase have been updated to use the new paths.
x/gov/client/testutil/helpers.go (1)
  • 8-8: The import path for govcli has been updated from github.com/cosmos/cosmos-sdk/x/gov/client/cli to cosmossdk.io/x/gov/client/cli. Ensure that the new path is correct and the package is accessible at this location.
x/gov/abci_test.go (1)
  • 13-16: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module is correctly located at the new path. Also, verify that all other references to the gov module in the codebase have been updated to use the new import paths.
.github/workflows/test.yml (5)
  • 975-978: The new job test-x-gov is introduced to test the gov module. It runs on the latest Ubuntu environment and uses Go version 1.21. The job checks out the repository, sets up the Go environment, and checks for changes in the gov module. If there are changes, it runs tests and performs SonarCloud analysis. The job is well-structured and follows the pattern of the other jobs in the workflow.

  • 985-987: The Go version is set to 1.21 and the check-latest option is set to true. This means that the workflow will always use the latest patch version of Go 1.21. The cache option is set to true, which will cache the Go dependencies to speed up future runs. The cache-dependency-path is set to x/gov/go.sum, which means that the cache will be updated whenever the go.sum file in the gov module changes. This is a good practice for improving the performance of the workflow.

  • 991-994: The PATTERNS option is set to include all Go files, the go.mod file, and the go.sum file in the gov module. This means that the job will run if there are changes in any of these files. This is a good practice for ensuring that the tests are run when necessary.

  • 996-1000: The tests are run in the gov module with a timeout of 30 minutes. The -mod=readonly option is used, which means that the go.mod file will not be modified during the tests. The -coverprofile option is used to generate a coverage report, and the -covermode=atomic option is used to ensure accurate coverage counts when running tests in parallel. The -tags option is used to include specific build tags. These are good practices for running tests and generating coverage reports.

  • 1001-1007: The SonarCloud analysis is run if there are changes in the gov module, the pull request is not a draft, and the SONAR_TOKEN is not null. The GITHUB_TOKEN and SONAR_TOKEN are set as environment variables, and the projectBaseDir is set to x/gov/. This is a good practice for running SonarCloud analysis on the relevant parts of the codebase.

@tac0turtle
Copy link
Member Author

leaving some extra replaces in here but only till i spin out the rest of the modules then ill clean it up

@tac0turtle
Copy link
Member Author

tac0turtle commented Oct 22, 2023

We need to find a way for modules that import only gov for the default authority to keep that behavior but not import gov, otherwise adding a gov dep just for that reason is quite inconvenient.

I believe some module just have a variable called GovModuleName and they use that in the module.go

im going with a spin out everything quickly then do a few prs reducing interdependence

lots of the deps are from app_config for simulation testing which will be removed soon as well

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.

lgtm! one nit.

client/v2/go.mod Show resolved Hide resolved
types/mempool/mempool_test.go Outdated Show resolved Hide resolved
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

Commits Files that changed from the base of the PR and between 47fd75b and 3eae41b.
Files selected for processing (57)
  • simapp/app_config.go (2 hunks)
  • simapp/app_test.go (2 hunks)
  • simapp/app_v2.go (2 hunks)
  • tests/e2e/auth/suite.go (2 hunks)
  • tests/e2e/authz/tx.go (2 hunks)
  • tests/e2e/gov/deposits.go (1 hunks)
  • tests/e2e/gov/grpc.go (1 hunks)
  • tests/e2e/gov/tx.go (1 hunks)
  • tests/integration/auth/client/cli/suite_test.go (2 hunks)
  • tests/integration/bank/app_test.go (2 hunks)
  • tests/integration/gov/common_test.go (1 hunks)
  • tests/integration/gov/genesis_test.go (2 hunks)
  • tests/integration/gov/keeper/common_test.go (1 hunks)
  • tests/integration/gov/keeper/grpc_query_test.go (1 hunks)
  • tests/integration/gov/keeper/keeper_test.go (2 hunks)
  • tests/integration/gov/keeper/tally_test.go (1 hunks)
  • tests/integration/gov/module_test.go (1 hunks)
  • tests/integration/rapidgen/rapidgen.go (2 hunks)
  • tests/integration/tx/aminojson/aminojson_test.go (2 hunks)
  • tests/integration/tx/decode_test.go (2 hunks)
  • types/mempool/mempool_test.go (2 hunks)
  • x/authz/client/cli/tx_test.go (2 hunks)
  • x/authz/migrations/v2/store_test.go (2 hunks)
  • x/authz/simulation/genesis.go (1 hunks)
  • x/authz/testutil/app_config.go (1 hunks)
  • x/crisis/keeper/msg_server.go (1 hunks)
  • x/crisis/module.go (2 hunks)
  • x/feegrant/client/cli/tx_test.go (2 hunks)
  • x/gov/abci.go (1 hunks)
  • x/gov/abci_test.go (1 hunks)
  • x/gov/client/cli/prompt.go (1 hunks)
  • x/gov/client/cli/tx.go (1 hunks)
  • x/gov/client/cli/tx_test.go (2 hunks)
  • x/gov/client/cli/util.go (1 hunks)
  • x/gov/client/cli/util_test.go (2 hunks)
  • x/gov/client/testutil/helpers.go (1 hunks)
  • x/gov/client/utils/query.go (1 hunks)
  • x/gov/client/utils/query_test.go (1 hunks)
  • x/gov/common_test.go (2 hunks)
  • x/gov/genesis.go (1 hunks)
  • x/gov/genesis_test.go (1 hunks)
  • x/gov/keeper/common_test.go (2 hunks)
  • x/gov/keeper/deposit.go (1 hunks)
  • x/gov/keeper/deposit_test.go (1 hunks)
  • x/gov/keeper/grpc_query.go (1 hunks)
  • x/gov/keeper/grpc_query_test.go (1 hunks)
  • x/gov/keeper/hooks_test.go (1 hunks)
  • x/gov/keeper/invariants.go (1 hunks)
  • x/gov/keeper/keeper.go (1 hunks)
  • x/gov/keeper/keeper_test.go (1 hunks)
  • x/gov/keeper/migrations.go (1 hunks)
  • x/gov/keeper/msg_server.go (1 hunks)
  • x/gov/keeper/msg_server_test.go (1 hunks)
  • x/gov/keeper/proposal.go (1 hunks)
  • x/gov/keeper/proposal_test.go (1 hunks)
  • x/gov/keeper/tally.go (1 hunks)
  • x/gov/keeper/tally_test.go (1 hunks)
Files not processed due to max files limit (36)
  • x/gov/keeper/vote.go
  • x/gov/keeper/vote_test.go
  • x/gov/migrations/v3/convert.go
  • x/gov/migrations/v3/convert_test.go
  • x/gov/migrations/v5/store.go
  • x/gov/migrations/v5/store_test.go
  • x/gov/module.go
  • x/gov/simulation/genesis.go
  • x/gov/simulation/genesis_test.go
  • x/gov/simulation/operations.go
  • x/gov/simulation/operations_test.go
  • x/gov/simulation/proposals.go
  • x/gov/simulation/proposals_test.go
  • x/gov/testutil/expected_keepers.go
  • x/gov/types/v1/content.go
  • x/gov/types/v1/genesis_test.go
  • x/gov/types/v1/msgs.go
  • x/gov/types/v1/msgs_test.go
  • x/gov/types/v1/proposals_test.go
  • x/gov/types/v1beta1/proposal.go
  • x/group/client/cli/prompt.go
  • x/group/keeper/msg_server.go
  • x/params/client/cli/tx.go
  • x/params/client/proposal_handler.go
  • x/params/module.go
  • x/params/proposal_handler.go
  • x/params/types/proposal/codec.go
  • x/protocolpool/testutil/app_config.go
  • x/slashing/keeper/keeper_test.go
  • x/slashing/keeper/msg_server.go
  • x/slashing/module.go
  • x/upgrade/abci_test.go
  • x/upgrade/client/cli/tx.go
  • x/upgrade/keeper/grpc_query_test.go
  • x/upgrade/keeper/keeper_test.go
  • x/upgrade/module.go
Files skipped from review due to trivial changes (36)
  • simapp/app_test.go
  • tests/e2e/auth/suite.go
  • tests/e2e/gov/deposits.go
  • tests/e2e/gov/grpc.go
  • tests/e2e/gov/tx.go
  • tests/integration/gov/common_test.go
  • tests/integration/gov/genesis_test.go
  • tests/integration/gov/keeper/common_test.go
  • tests/integration/gov/keeper/keeper_test.go
  • tests/integration/gov/module_test.go
  • tests/integration/rapidgen/rapidgen.go
  • tests/integration/tx/aminojson/aminojson_test.go
  • tests/integration/tx/decode_test.go
  • types/mempool/mempool_test.go
  • x/authz/migrations/v2/store_test.go
  • x/authz/simulation/genesis.go
  • x/crisis/keeper/msg_server.go
  • x/crisis/module.go
  • x/feegrant/client/cli/tx_test.go
  • x/gov/abci_test.go
  • x/gov/client/cli/prompt.go
  • x/gov/client/testutil/helpers.go
  • x/gov/client/utils/query.go
  • x/gov/genesis_test.go
  • x/gov/keeper/common_test.go
  • x/gov/keeper/deposit.go
  • x/gov/keeper/deposit_test.go
  • x/gov/keeper/invariants.go
  • x/gov/keeper/keeper.go
  • x/gov/keeper/keeper_test.go
  • x/gov/keeper/migrations.go
  • x/gov/keeper/msg_server.go
  • x/gov/keeper/proposal.go
  • x/gov/keeper/proposal_test.go
  • x/gov/keeper/tally.go
  • x/gov/keeper/tally_test.go
Additional comments (Suppressed): 29
x/authz/testutil/app_config.go (1)
  • 4-4: The import path for the gov module has been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that the new path is correct and accessible, and that the module at this path has the expected functionality. This change is part of the larger effort to modularize the codebase, as mentioned in the PR summary.
tests/integration/gov/keeper/tally_test.go (1)
  • 9-9: The import path for the gov module has been updated from github.com/cosmos/cosmos-sdk/x/gov/types/v1 to cosmossdk.io/x/gov/types/v1. Ensure that the new path is correct and accessible, and that all references to the gov module in the codebase have been updated to use the new path.
x/gov/client/cli/util.go (1)
  • 11-12: The import paths for govutils and govv1 have been updated to reflect the new location of the gov module. Ensure that the new paths are correct and that the module at the new location has all the necessary functions and types that are used in this file.
x/gov/common_test.go (2)
  • 14-17: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module is correctly located at the new paths. Also, verify that all other references to these packages in the codebase have been updated to use the new paths.

  • 29-34: The import paths for the bank, consensus, and staking modules have not been updated. If these modules have also been moved to their own go.mod files, their import paths should be updated to reflect their new locations. If they have not been moved, disregard this comment.

x/gov/client/cli/tx.go (1)
  • 10-13: The import paths for govutils, types, v1, and v1beta1 have been updated to reflect the new module location. Ensure that the new paths are correct and that the module at cosmossdk.io/x/gov is properly set up to be imported.
x/gov/abci.go (1)
  • 10-12: The import paths for the keeper, types, and v1 packages have been updated to reflect the new module structure. Ensure that these packages are correctly located at the new paths and that all references to these packages in the codebase have been updated to use the new import paths.
tests/integration/gov/keeper/grpc_query_test.go (1)
  • 11-12: The import paths for the gov module have been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that the new paths are correct and that the module is accessible at the new location. Also, verify that all other references to the gov module in the codebase have been updated to reflect this change.
tests/e2e/authz/tx.go (2)
  • 13-16: The import paths for govcli, govtestutil, govv1, and govv1beta1 have been updated to reflect the new location of the gov module. Ensure that these changes do not break any dependencies in the codebase.

  • 27-31: The old import paths for govcli, govtestutil, govv1, and govv1beta1 have been removed. This is consistent with the changes in the new hunk.

tests/integration/auth/client/cli/suite_test.go (2)
  • 16-18: The import paths for the gov module have been updated to reflect its new location. Ensure that the new paths are correct and that the module is correctly isolated in its own go.mod file. Also, verify that the new import paths are updated everywhere in the codebase where the gov module is used.

  • 36-39: The import statements for the gov module have been removed from this section. This change is consistent with the new import paths for the gov module in lines 16-18.

x/gov/client/cli/util_test.go (2)
  • 17-18: The import paths for the gov module have been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that the new paths are correct and that the module is correctly located at the new URL. Also, verify that all references to these packages in the codebase have been updated to reflect the new paths.

  • 24-28: The import paths for the gov module have been removed from this section. If this is intentional and the gov module is no longer needed in this file, this change is fine. However, if the gov module is still required, ensure that it is imported correctly.

simapp/app_v2.go (2)
  • 18-18: The import path for the govkeeper has been updated from github.com/cosmos/cosmos-sdk/x/gov/keeper to cosmossdk.io/x/gov/keeper. Ensure that the new path is correct and the module at this location is accessible. Also, verify that all references to govkeeper in the codebase have been updated to use the new import path.

  • 42-47: The govkeeper import has been removed from this section. This change is consistent with the update in the new hunk at line 18 where govkeeper is now imported from cosmossdk.io/x/gov/keeper. No action is needed if this was the intended change.

x/authz/client/cli/tx_test.go (2)
  • 16-20: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module is correctly located at the new path. Also, verify that all dependencies that rely on this module have been updated to use the new import paths.

  • 37-37: The typeMsgVote variable is now using the govv1.MsgVote type from the new gov module location. Ensure that this type is correctly defined in the new module location and that it has the same structure and behavior as the old type.

x/gov/client/utils/query_test.go (1)
  • 13-15: The import paths for the gov module, gov client utilities, and gov types have been updated to reflect the new location of the gov module. Ensure that the new paths are correct and that the module is correctly set up at the new location.
-	"github.com/cosmos/cosmos-sdk/x/gov"
-	"github.com/cosmos/cosmos-sdk/x/gov/client/utils"
-	v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1"
+	"cosmossdk.io/x/gov"
+	"cosmossdk.io/x/gov/client/utils"
+	v1 "cosmossdk.io/x/gov/types/v1"
simapp/app_config.go (2)
  • 38-40: The import paths for the gov module have been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that the new import paths are correct and that the gov module is available at the new location. Also, verify that all references to the gov module in the codebase have been updated to use the new import paths.

  • 65-70: The import statements for the gov module have been removed. This is consistent with the changes in lines 38-40 where the gov module is now imported from cosmossdk.io/x/gov. Ensure that this change does not affect any functionality that depends on the gov module.

tests/integration/bank/app_test.go (2)
  • 14-15: The import paths for the gov module have been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that the new import paths are correct and that the gov module is now located at cosmossdk.io/x/gov.

  • 34-36: The import statement for the gov module has been removed from this section. This change is consistent with the update in the import paths for the gov module. Ensure that this does not affect any dependencies in the code.

x/gov/genesis.go (1)
  • 8-10: The import paths have been updated to reflect the new location of the gov module. Ensure that the new paths are correct and the necessary files are available at these locations.
x/gov/keeper/grpc_query.go (1)
  • 12-14: The import paths for the v3, v1, and v1beta1 packages have been updated to reflect the new location of the gov module. Ensure that these packages are correctly relocated and that all dependencies are properly managed in the new go.mod file for the gov module.
x/gov/client/cli/tx_test.go (1)
  • 14-19: The import paths for the gov module have been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that the new import paths are correct and that the gov module is correctly modularized and importable using the new paths.
x/gov/keeper/hooks_test.go (1)
  • 10-13: The import paths have been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov to reflect the modularization of the gov package. Ensure that the new import paths are correctly configured and accessible. Also, verify that all references to these packages in the codebase have been updated to use the new import paths.
x/gov/keeper/msg_server_test.go (1)
  • 8-9: The import paths for the gov module have been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that the new paths are correct and that the gov module is correctly modularized and importable using the new paths.
x/gov/keeper/grpc_query_test.go (1)
  • 9-11: The import paths for the gov module have been updated to reflect the new location of the module. Ensure that these changes do not break any dependencies in the rest of the codebase.

go.mod Show resolved Hide resolved
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 3eae41b and 6354193.
Files ignored due to filter (6)
  • client/v2/go.mod
  • client/v2/go.sum
  • x/circuit/go.sum
  • x/evidence/go.sum
  • x/nft/go.sum
  • x/params/go.sum
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)

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 3eae41b and b5e96b5.
Files ignored due to filter (6)
  • client/v2/go.mod
  • client/v2/go.sum
  • x/circuit/go.sum
  • x/evidence/go.sum
  • x/nft/go.sum
  • x/params/go.sum
Files selected for processing (1)
  • tests/e2e/client/grpc/cmtservice/service_test.go (2 hunks)
Files skipped from review due to trivial changes (1)
  • tests/e2e/client/grpc/cmtservice/service_test.go

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 b5e96b5 and a1163aa.
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
Additional comments (Suppressed): 1
CHANGELOG.md (1)
  • 177-177: The gov module has been moved to its own go.mod file, changing its import path from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that all references to this module in the codebase have been updated to reflect this change. This includes import statements, documentation, and any string references to the old import path.

@sonarcloud
Copy link

sonarcloud bot commented Oct 23, 2023

[Cosmos SDK - x/gov] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

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 a1163aa and 3070786.
Files selected for processing (2)
  • store/storage/rocksdb/comparator.go (2 hunks)
  • tests/e2e/client/grpc/cmtservice/service_test.go (2 hunks)
Files skipped from review due to trivial changes (1)
  • store/storage/rocksdb/comparator.go
Additional comments (Suppressed): 2
tests/e2e/client/grpc/cmtservice/service_test.go (2)
  • 12-12: The import path for the governance module has been updated from github.com/cosmos/cosmos-sdk/x/gov to cosmossdk.io/x/gov. Ensure that the new path is correct and accessible. Also, verify that all references to the governance module in the codebase have been updated to use the new import path.

  • 21-24: The import for the governance module github.com/cosmos/cosmos-sdk/x/gov has been removed. If the governance module is not used in this file, this change is fine. However, if it is used, this could lead to compilation errors. Please verify.

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 3070786 and ac2956e.
Files selected for processing (2)
  • go.work.example (1 hunks)
  • x/gov/client/cli/util_test.go (2 hunks)
Files skipped from review due to trivial changes (1)
  • go.work.example
Additional comments (Suppressed): 2
x/gov/client/cli/util_test.go (2)
  • 17-18: The import paths for the governance module types have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module is correctly located at the new path. Also, verify that all references to these types in the codebase have been updated to use the new import paths.

  • 24-28: The import paths for the bank and staking types remain unchanged, indicating that these modules have not been moved. Ensure that these modules are still located at the specified paths and that all references to these types in the codebase are still valid.

@github-actions github-actions bot removed the C:Store label Oct 23, 2023
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 ac2956e and 135578f.
Files selected for processing (1)
  • .golangci.yml (1 hunks)
Files skipped from review due to trivial changes (1)
  • .golangci.yml

@tac0turtle tac0turtle added this pull request to the merge queue Oct 23, 2023
Merged via the queue into main with commit 388ff4f Oct 23, 2023
57 of 65 checks passed
@tac0turtle tac0turtle deleted the marko/spinout_gov branch October 23, 2023 14:20
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.

None yet

3 participants