-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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(x/group): spin out Go module #17937
Conversation
fd82ae2
to
bff87c1
Compare
42c2ad6
to
4a58bff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left one question but otherwise LGTM
4a58bff
to
4381227
Compare
Thanks for the reviews @tac0turtle and @julienrbrt, updated! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing CHANGELOG.md + UPGRADING.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comments as julien, otherwise lgtm!
4381227
to
90b7b79
Compare
Adds a vanity URL entry for x/group as cosmosdk.io/x/group. Follow-up of PR cosmos/cosmos-sdk#17937
4992f26
to
06d2fa6
Compare
06d2fa6
to
1a2f09c
Compare
1a2f09c
to
184da08
Compare
3073ac4
to
c92fafe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests need to be fixed. I think you need to run go mod tidy
for it.
WalkthroughThe changes primarily involve the migration of the Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this 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
Files ignored due to filter (16)
- go.mod
- go.sum
- simapp/go.mod
- simapp/go.sum
- simapp/gomod2nix.toml
- tests/go.mod
- tests/go.sum
- tests/starship/tests/go.mod
- tests/starship/tests/go.sum
- x/group/events.pb.go
- x/group/genesis.pb.go
- x/group/go.mod
- x/group/go.sum
- x/group/query.pb.go
- x/group/tx.pb.go
- x/group/types.pb.go
Files selected for processing (57)
- .github/workflows/test.yml (1 hunks)
- CHANGELOG.md (1 hunks)
- api/cosmos/group/module/v1/module.pulsar.go (2 hunks)
- go.work.example (1 hunks)
- proto/cosmos/group/module/v1/module.proto (1 hunks)
- proto/cosmos/group/v1/events.proto (1 hunks)
- proto/cosmos/group/v1/genesis.proto (2 hunks)
- proto/cosmos/group/v1/query.proto (1 hunks)
- proto/cosmos/group/v1/tx.proto (1 hunks)
- proto/cosmos/group/v1/types.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/group/suite.go (2 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)
- x/group/CHANGELOG.md (1 hunks)
- x/group/client/cli/tx.go (1 hunks)
- x/group/client/cli/tx_test.go (2 hunks)
- x/group/client/cli/util.go (1 hunks)
- x/group/internal/math/dec.go (1 hunks)
- x/group/internal/orm/auto_uint64_test.go (1 hunks)
- x/group/internal/orm/index.go (1 hunks)
- x/group/internal/orm/index_test.go (1 hunks)
- x/group/internal/orm/indexer.go (1 hunks)
- x/group/internal/orm/indexer_test.go (1 hunks)
- x/group/internal/orm/iterator.go (1 hunks)
- x/group/internal/orm/iterator_property_test.go (1 hunks)
- x/group/internal/orm/iterator_test.go (1 hunks)
- x/group/internal/orm/key_codec.go (1 hunks)
- x/group/internal/orm/orm_scenario_test.go (1 hunks)
- x/group/internal/orm/primary_key_test.go (1 hunks)
- x/group/internal/orm/sequence.go (1 hunks)
- x/group/internal/orm/sequence_test.go (1 hunks)
- x/group/internal/orm/table.go (1 hunks)
- x/group/internal/orm/table_test.go (1 hunks)
- x/group/internal/orm/types.go (1 hunks)
- x/group/internal/orm/types_test.go (1 hunks)
- x/group/keeper/genesis.go (1 hunks)
- x/group/keeper/genesis_test.go (2 hunks)
- x/group/keeper/grpc_query.go (1 hunks)
- x/group/keeper/grpc_query_test.go (2 hunks)
- x/group/keeper/invariants.go (1 hunks)
- x/group/keeper/invariants_test.go (1 hunks)
- x/group/keeper/keeper.go (1 hunks)
- x/group/keeper/keeper_test.go (2 hunks)
- x/group/keeper/migrations.go (1 hunks)
- x/group/keeper/msg_server.go (1 hunks)
- x/group/keeper/msg_server_test.go (1 hunks)
- x/group/keeper/proposal_executor.go (1 hunks)
- x/group/keeper/tally.go (1 hunks)
- x/group/keeper/tally_test.go (1 hunks)
- x/group/migrations/v2/gen_state_test.go (1 hunks)
- x/group/migrations/v2/migrate.go (1 hunks)
- x/group/migrations/v2/migrate_test.go (2 hunks)
Files not processed due to max files limit (15)
- x/group/module/abci.go
- x/group/module/abci_test.go
- x/group/module/module.go
- x/group/proposal_test.go
- x/group/simulation/decoder.go
- x/group/simulation/decoder_test.go
- x/group/simulation/genesis.go
- x/group/simulation/genesis_test.go
- x/group/simulation/operations.go
- x/group/simulation/operations_test.go
- x/group/sonar-project.properties
- x/group/testutil/app_config.go
- x/group/testutil/expected_keepers.go
- x/group/types.go
- x/group/types_test.go
Files skipped from review due to trivial changes (34)
- proto/cosmos/group/v1/events.proto
- proto/cosmos/group/v1/genesis.proto
- proto/cosmos/group/v1/query.proto
- proto/cosmos/group/v1/tx.proto
- proto/cosmos/group/v1/types.proto
- tests/e2e/group/suite.go
- tests/integration/rapidgen/rapidgen.go
- tests/integration/tx/aminojson/aminojson_test.go
- x/group/CHANGELOG.md
- x/group/client/cli/tx.go
- x/group/internal/math/dec.go
- x/group/internal/orm/auto_uint64_test.go
- x/group/internal/orm/index.go
- x/group/internal/orm/index_test.go
- x/group/internal/orm/indexer.go
- x/group/internal/orm/indexer_test.go
- x/group/internal/orm/key_codec.go
- x/group/internal/orm/orm_scenario_test.go
- x/group/internal/orm/sequence.go
- x/group/internal/orm/table.go
- x/group/internal/orm/table_test.go
- x/group/internal/orm/types.go
- x/group/internal/orm/types_test.go
- x/group/keeper/genesis.go
- x/group/keeper/grpc_query_test.go
- x/group/keeper/invariants_test.go
- x/group/keeper/keeper.go
- x/group/keeper/msg_server.go
- x/group/keeper/msg_server_test.go
- x/group/keeper/proposal_executor.go
- x/group/keeper/tally.go
- x/group/keeper/tally_test.go
- x/group/migrations/v2/migrate.go
- x/group/migrations/v2/migrate_test.go
Additional comments (Suppressed): 31
CHANGELOG.md (1)
- 173-173: The changelog entry correctly reflects the changes made in the PR. It's clear and concise, providing the necessary information about the changes to the
x/group
module.go.work.example (1)
- 23-23: The
./x/group
module has been added to thego.work.example
file. This change is consistent with the PR summary, which mentions that thegroup
module has been refactored to be its own Go module. Ensure that the new path./x/group
is correct and that the module is properly set up at this location.proto/cosmos/group/module/v1/module.proto (1)
- 13-13: The import path for the group module has been updated to reflect its new location. Ensure that the new path "cosmossdk.io/x/group" is accessible and correctly points to the intended module.
- go_import: "github.com/cosmos/cosmos-sdk/x/group" + go_import: "cosmossdk.io/x/group"x/group/internal/orm/sequence_test.go (1)
- 9-10: The import paths for
storetypes
anderrors
have been updated to reflect the new location of thegroup
module. Ensure that the new paths are correct and the necessary packages are available at these locations.x/group/client/cli/util.go (1)
- 8-8: The import path for the
group
module has been updated to reflect its new location. Ensure that the new module atcosmossdk.io/x/group
is correctly set up and accessible.x/group/internal/orm/iterator_property_test.go (1)
- 10-11: The import path for the
errors
package has been updated to reflect its new location. Ensure that all references to this package in the codebase have been updated accordingly.- "github.com/cosmos/cosmos-sdk/x/group/errors" + "cosmossdk.io/x/group/errors"x/group/internal/orm/iterator.go (1)
- 9-10: The import paths for the
errors
package have been updated to reflect the new location of thegroup
module. Ensure that the new paths are correct and that all references to these packages in the code have been updated accordingly.x/group/internal/orm/primary_key_test.go (1)
- 9-11: The import paths for
errorsmod
andstoretypes
have been updated to reflect the new location of these packages. Theerrors
package fromx/group
has also been imported. Ensure that these changes do not break any dependencies and that all references to these packages in the code have been updated.x/group/internal/orm/iterator_test.go (1)
- 12-12: The import path for the
errors
package has been updated to reflect its new location. Ensure that all references to this package in the codebase have been updated accordingly.- "github.com/cosmos/cosmos-sdk/x/group/errors" + "cosmossdk.io/x/group/errors"x/group/keeper/migrations.go (1)
- 4-4: The import path for the
v2
package has been updated to reflect the new location of thegroup
module. Ensure that the new pathcosmossdk.io/x/group/migrations/v2
is correct and the package is accessible at this location.simapp/app.go (2)
24-32: The import paths for the
group
module have been updated to reflect its new location. Ensure that the new module atcosmossdk.io/x/group
is correctly set up and accessible.95-100: The import statements for the
group
module have been removed from this section. This is consistent with the changes in the new hunk at lines 24-32 where thegroup
module is now imported from its new location.tests/integration/tx/decode_test.go (2)
- 13-16: The import path for the
group
module has been updated to reflect its new location. Ensure that the new path is correct and accessible.- groupmodule "github.com/cosmos/cosmos-sdk/x/group/module" + groupmodule "cosmossdk.io/x/group/module"
- 34-39: The import statement for the
group
module has been removed from this section. This change is consistent with the update to the import path for thegroup
module in lines 13-16.x/group/client/cli/tx_test.go (2)
14-22: The import paths for the
group
,group/client/cli
, andgroup/module
packages have been updated to reflect the new location of thegroup
module atcosmossdk.io/x/group
. Ensure that the new module location is correctly set up and accessible.29-32: No changes have been made to these import paths. Ensure that these packages are still compatible with the updated
group
module.simapp/app_config.go (2)
35-42: The import paths for the
group
module have been updated to reflect its new location atcosmossdk.io/x/group
. Ensure that the new location is accessible and the module is correctly installed at this path. Also, verify that all dependencies of thegroup
module are correctly handled in the new location.65-71: The import statement for the
group
module has been removed from this section. This change is consistent with the update in the previous hunk where thegroup
module is now imported from its new location. No action is required here as long as the new import path is correctly set up and accessible.api/cosmos/group/module/v1/module.pulsar.go (1)
- 582-589: > Note: This review was outside of the patch, so it was mapped to the patch with the greatest overlap. Original lines [573-589]
The changes in these lines reflect the updated import paths for the
group
module and theerrors
package. The import paths have been updated fromgithub.com/cosmos/cosmos-sdk/x/group
andgithub.com/cosmos/cosmos-sdk/x/group/errors
tocosmossdk.io/x/group
andcosmossdk.io/x/group/errors
respectively. This is in line with the PR summary which mentions that thegroup
module has been refactored to be its own Go module atcosmossdk.io/x/group
. Ensure that all references to thegroup
module and theerrors
package in the codebase have been updated to reflect these new import paths.simapp/app_v2.go (2)
15-21: The import path for the
groupkeeper
has been updated to reflect the new location of thegroup
module. Ensure that the new module atcosmossdk.io/x/group/keeper
is functionally equivalent to the old one atgithub.com/cosmos/cosmos-sdk/x/group/keeper
. Also, verify that the new module is available and accessible at the specified location.42-47: The
groupkeeper
import has been removed from this section. This change is consistent with the addition of thegroupkeeper
import in the new hunk at lines 15-21. No action is needed as long as the newgroupkeeper
module is functionally equivalent to the old one and is available at the new location.x/group/keeper/grpc_query.go (1)
- 8-17: The import paths have been updated to reflect the new location of the
group
module and itserrors
package. Ensure that the new paths are correct and that all dependencies are properly managed in the new module.simapp/app_test.go (2)
- 18-24: The import path for the
group
module has been updated to reflect its new location. Ensure that the new path is accessible and the module is correctly installed at the new location.- group "github.com/cosmos/cosmos-sdk/x/group/module" + group "cosmossdk.io/x/group/module"
- 38-43: The import statement for the
group
module has been removed from this section. This change is consistent with the updated import path for thegroup
module in the previous hunk. Ensure that this does not affect any dependencies in the code.- group "github.com/cosmos/cosmos-sdk/x/group/module"
x/group/keeper/keeper_test.go (2)
13-22: The import paths for the
group
module and its sub-packages have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module and its sub-packages are accessible at these locations.27-31: The import paths for the
group
module and its sub-packages have been removed from this section, as they have been updated and moved to lines 13-22. This change is consistent with the PR summary and appears to be correct.x/group/keeper/invariants.go (1)
- 8-17: The import paths have been updated to reflect the new location of the
group
module and its sub-packages. Ensure that the new paths are correct and the packages are available at these locations.x/group/migrations/v2/gen_state_test.go (1)
- 9-10: The import paths for the
group
module and thev2
package have been updated to reflect their new locations. Ensure that the new paths are correct and accessible..github/workflows/test.yml (1)
- 948-977: The new job
test-x-group
is added to test thex/group
module. It checks for changes in thex/group
directory and runs tests if there are any. It also includes SonarCloud integration for code analysis and coverage reporting. Ensure that the secretsGITHUB_TOKEN
andSONAR_TOKEN
are set correctly in the GitHub secrets for this repository. Also, verify that the Go version "1.21" is compatible with the rest of the codebase.x/group/keeper/genesis_test.go (2)
12-20: The import paths for the
group
module and its sub-packages have been updated to reflect the new location of the module. Ensure that the new paths are correct and that the module and its sub-packages are accessible at these locations.25-28: The import paths for the
group
module and its sub-packages have been removed as they are now imported fromcosmossdk.io/x/group
and its sub-packages. This change is consistent with the PR summary.
There was a problem hiding this 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
Files selected for processing (3)
- tests/integration/tx/aminojson/aminojson_test.go (3 hunks)
- x/group/proposal_test.go (1 hunks)
- x/group/simulation/decoder_test.go (1 hunks)
Files skipped from review due to trivial changes (3)
- tests/integration/tx/aminojson/aminojson_test.go
- x/group/proposal_test.go
- x/group/simulation/decoder_test.go
[Cosmos SDK - x/group] Kudos, SonarCloud Quality Gate passed! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
@@ -170,6 +170,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ | |||
* (types) [#17885](https://github.com/cosmos/cosmos-sdk/pull/17885) `InitGenesis` & `ExportGenesis` now take `context.Context` instead of `sdk.Context` | |||
* (x/auth) [#17985](https://github.com/cosmos/cosmos-sdk/pull/17985) Remove `StdTxConfig` | |||
* Remove depreacted `MakeTestingEncodingParams` from `simapp/params` | |||
* (x/group) [#17937](https://github.com/cosmos/cosmos-sdk/pull/17937) Groups module was moved to its own go.mod `cosmossdk.io/x/group` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should add an upgrading.md as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change carves out cosmossdk.io/x/group as
an own Go module.
Updates #11899
Fixes #17936
Summary by CodeRabbit
group
module has been moved to its owngo.mod
file, improving the modularity and maintainability of the codebase. The new import path iscosmossdk.io/x/group
.test-x-group
has been added to the workflow, enhancing the testing process by running tests and analysis on thex/group
directory.x/consensus
package now returns an error in theToProtoConsensusParams()
function, improving error handling.x/slashing
package'sNewValidatorSigningInfo
function now takes strings instead ofsdk.AccAddress
, simplifying the function's usage.x/group
module, providing a structured way to document changes.group
module in the test files enhances the testing coverage of the codebase.group
module have been updated across multiple files, reflecting the module's new location.