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: remove accounts replaces #21504

Merged
merged 4 commits into from
Sep 2, 2024
Merged

chore: remove accounts replaces #21504

merged 4 commits into from
Sep 2, 2024

Conversation

tac0turtle
Copy link
Member

@tac0turtle tac0turtle commented Sep 2, 2024

Description

this pr removes accounts module replaces in all modules


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, you can find examples of the prefixes below:
  • confirmed ! in 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
  • reviewed "Files changed" and left comments if necessary
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • updated the relevant documentation or specification, including comments for documenting Go code
  • 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.

Please see Pull Request Reviewer section in the contributing guide for more information on how to review a pull request.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic, API design and naming, documentation is accurate, tests and test coverage

Summary by CodeRabbit

  • Dependency Management Updates
    • Removed local replacements for the cosmossdk.io/x/accounts module across multiple modules, indicating a shift towards using the upstream version for dependency resolution.
    • Simplified the dependency structure by eliminating unnecessary local paths, which may enhance build efficiency and compatibility.
    • Removed several indirect dependencies related to the Cosmos SDK, further refining the module's dependency management.

Copy link
Contributor

coderabbitai bot commented Sep 2, 2024

Walkthrough

Walkthrough

The changes involve the removal of local replace directives for the cosmossdk.io/x/accounts module across multiple go.mod files in various directories. This indicates a shift away from using local versions of the accounts module, with dependencies now expected to resolve from the upstream source. Additionally, several indirect dependencies related to the Cosmos SDK have been removed, streamlining the dependency management.

Changes

Files Change Summary
client/v2/go.mod, go.mod, server/v2/cometbft/go.mod, x/auth/go.mod, x/authz/go.mod, x/bank/go.mod, x/circuit/go.mod, x/consensus/go.mod, x/distribution/go.mod, x/epochs/go.mod, x/evidence/go.mod, x/feegrant/go.mod, x/gov/go.mod, x/mint/go.mod, x/nft/go.mod, x/params/go.mod, x/protocolpool/go.mod, x/slashing/go.mod, x/staking/go.mod, x/upgrade/go.mod Removed replace directive for cosmossdk.io/x/accounts pointing to local paths.
x/group/go.mod Removed several indirect dependencies including cosmossdk.io/x/accounts and related modules.

Possibly related issues


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.
Early access features: disabled

We are currently testing the following features in early access:

  • Anthropic claude-3-5-sonnet for code reviews: Anthropic claims that the new Claude model has stronger code understanding and code generation capabilities than their previous models. Note: Our default code review model was also updated late last week. Please compare the quality of the reviews between the two models by toggling the early access feature.

Note:

  • You can enable or disable early access features from the CodeRabbit UI or by updating the CodeRabbit configuration file.
  • Please join our Discord Community to provide feedback and report issues on the discussion post.

@tac0turtle tac0turtle marked this pull request as ready for review September 2, 2024 14:50
@tac0turtle tac0turtle requested a review from a team as a code owner September 2, 2024 14:50
@tac0turtle tac0turtle enabled auto-merge September 2, 2024 14:56
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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 496cd0d and e8c8447.

Files ignored due to path filters (1)
  • x/group/go.sum is excluded by !**/*.sum
Files selected for processing (21)
  • client/v2/go.mod (1 hunks)
  • go.mod (1 hunks)
  • server/v2/cometbft/go.mod (1 hunks)
  • x/auth/go.mod (1 hunks)
  • x/authz/go.mod (1 hunks)
  • x/bank/go.mod (1 hunks)
  • x/circuit/go.mod (1 hunks)
  • x/consensus/go.mod (1 hunks)
  • x/distribution/go.mod (1 hunks)
  • x/epochs/go.mod (1 hunks)
  • x/evidence/go.mod (1 hunks)
  • x/feegrant/go.mod (1 hunks)
  • x/gov/go.mod (1 hunks)
  • x/group/go.mod (2 hunks)
  • x/mint/go.mod (1 hunks)
  • x/nft/go.mod (1 hunks)
  • x/params/go.mod (1 hunks)
  • x/protocolpool/go.mod (1 hunks)
  • x/slashing/go.mod (1 hunks)
  • x/staking/go.mod (1 hunks)
  • x/upgrade/go.mod (1 hunks)
Files skipped from review due to trivial changes (17)
  • go.mod
  • server/v2/cometbft/go.mod
  • x/authz/go.mod
  • x/circuit/go.mod
  • x/consensus/go.mod
  • x/distribution/go.mod
  • x/epochs/go.mod
  • x/evidence/go.mod
  • x/feegrant/go.mod
  • x/gov/go.mod
  • x/mint/go.mod
  • x/nft/go.mod
  • x/params/go.mod
  • x/protocolpool/go.mod
  • x/slashing/go.mod
  • x/staking/go.mod
  • x/upgrade/go.mod
Additional comments not posted (7)
x/auth/go.mod (1)

Line range hint 1-137: Approve the removal of the replace directive for the accounts module.

The change removes the local replacement for the cosmossdk.io/x/accounts module:

-replace cosmossdk.io/x/accounts => ../accounts

This indicates a shift towards using the official version of the accounts module instead of a local copy. The removal may affect how dependencies are resolved and could have implications for the functionality and integration of the x/auth module with other components.

To verify the impact of this change, run the following script:

Verification successful

Verification Successful: No Issues Found with accounts Module Imports

The removal of the replace directive for the cosmossdk.io/x/accounts module in the go.mod file is consistent with the rest of the codebase. All imports of the accounts module are from the official source, confirming that the transition is complete and correct. No issues were found.

  • All imports are from cosmossdk.io/x/accounts.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the usage of the `accounts` module in the `x/auth` module.

# Test: Search for import statements of the `accounts` module. Expect: Only imports from the official `cosmossdk.io/x/accounts` module.
rg --type go -A 5 $'cosmossdk.io/x/accounts'

Length of output: 41785

client/v2/go.mod (1)

Line range hint 1-1: Removed replace directive for the accounts module.

The removal of the replace directive for the cosmossdk.io/x/accounts module is in line with the PR objective of eliminating the use of the accounts module replacements across the Cosmos SDK.

x/group/go.mod (5)

Line range hint 1-1: Verify the impact of removing the cosmossdk.io/core/testing package on existing tests.

Ensure that removing this testing package doesn't break any existing tests for the x/group module.

Run the following script to verify the impact:


Line range hint 1-1: Verify the impact of removing the cosmossdk.io/x/distribution package on existing functionality and tests.

Ensure that removing this distribution package doesn't break any existing functionality or tests for the x/group module.

Run the following script to verify the impact:


Line range hint 1-1: Verify the impact of removing the cosmossdk.io/x/accounts/defaults/lockup package on existing functionality and tests.

Ensure that removing this lockup package doesn't break any existing functionality or tests for the x/group module.

Run the following script to verify the impact:

Verification successful

Verification Successful: No Impact from Removal of lockup Package

The x/group module does not contain any references to the cosmossdk.io/x/accounts/defaults/lockup package, indicating that its removal from the require section does not impact the module's functionality.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that removing the `cosmossdk.io/x/accounts/defaults/lockup` package doesn't break existing functionality and tests.

# Test: Search for import statements of the removed package. Expect: No occurrences.
rg --type go $'cosmossdk.io/x/accounts/defaults/lockup'

# Test: Run the tests for the `x/group` module. Expect: All tests pass.
go test ./x/group/...

Length of output: 2390


Script:

#!/bin/bash
# Description: Verify that there are no references to the `cosmossdk.io/x/accounts/defaults/lockup` package in the `x/group` module.

# Search for any references to the `lockup` package within the `x/group` module.
rg --type go 'lockup' ./x/group

Length of output: 31


Line range hint 1-1: Verify the impact of removing the cosmossdk.io/x/accounts/defaults/multisig package on existing functionality and tests.

Ensure that removing this multisig package doesn't break any existing functionality or tests for the x/group module.

Run the following script to verify the impact:

Verification successful

No Impact on x/group Module from Removing multisig Package

The removal of the cosmossdk.io/x/accounts/defaults/multisig package from the require section in the x/group module's go.mod file does not affect the module's functionality or tests, as there are no references to this package within the module.

  • No references to cosmossdk.io/x/accounts/defaults/multisig were found in the x/group module.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify that removing the `cosmossdk.io/x/accounts/defaults/multisig` package doesn't break existing functionality and tests.

# Test: Search for import statements of the removed package. Expect: No occurrences.
rg --type go $'cosmossdk.io/x/accounts/defaults/multisig'

# Test: Run the tests for the `x/group` module. Expect: All tests pass.
go test ./x/group/...

Length of output: 794


Script:

#!/bin/bash
# Description: Search for references to the removed package within the `x/group` module's test files.

# Find all test files in the `x/group` module and search for the removed package.
fd --type f --extension go --exec rg 'cosmossdk.io/x/accounts/defaults/multisig' {}

Length of output: 446


Script:

#!/bin/bash
# Description: Search for references to the removed package within the `x/group` module's test files and include file paths in the output.

# Find all test files in the `x/group` module and search for the removed package, including file paths in the output.
fd --type f --extension go --exec rg --with-filename 'cosmossdk.io/x/accounts/defaults/multisig' {}

Length of output: 759


Line range hint 1-1: Verify the impact of removing the replace directive for cosmossdk.io/x/accounts on version compatibility and existing functionality and tests.

Ensure that removing this replace directive doesn't introduce any version incompatibilities or break any existing functionality or tests for the x/group module.

Run the following script to verify the impact:

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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 496cd0d and e8c8447.

Files ignored due to path filters (1)
  • x/group/go.sum is excluded by !**/*.sum
Files selected for processing (21)
  • client/v2/go.mod (1 hunks)
  • go.mod (1 hunks)
  • server/v2/cometbft/go.mod (1 hunks)
  • x/auth/go.mod (1 hunks)
  • x/authz/go.mod (1 hunks)
  • x/bank/go.mod (1 hunks)
  • x/circuit/go.mod (1 hunks)
  • x/consensus/go.mod (1 hunks)
  • x/distribution/go.mod (1 hunks)
  • x/epochs/go.mod (1 hunks)
  • x/evidence/go.mod (1 hunks)
  • x/feegrant/go.mod (1 hunks)
  • x/gov/go.mod (1 hunks)
  • x/group/go.mod (2 hunks)
  • x/mint/go.mod (1 hunks)
  • x/nft/go.mod (1 hunks)
  • x/params/go.mod (1 hunks)
  • x/protocolpool/go.mod (1 hunks)
  • x/slashing/go.mod (1 hunks)
  • x/staking/go.mod (1 hunks)
  • x/upgrade/go.mod (1 hunks)
Files skipped from review due to trivial changes (21)
  • client/v2/go.mod
  • go.mod
  • server/v2/cometbft/go.mod
  • x/auth/go.mod
  • x/authz/go.mod
  • x/bank/go.mod
  • x/circuit/go.mod
  • x/consensus/go.mod
  • x/distribution/go.mod
  • x/epochs/go.mod
  • x/evidence/go.mod
  • x/feegrant/go.mod
  • x/gov/go.mod
  • x/group/go.mod
  • x/mint/go.mod
  • x/nft/go.mod
  • x/params/go.mod
  • x/protocolpool/go.mod
  • x/slashing/go.mod
  • x/staking/go.mod
  • x/upgrade/go.mod

@julienrbrt
Copy link
Member

looks like group needs it. Let's backport too.

@julienrbrt julienrbrt added the backport/v0.52.x PR scheduled for inclusion in the v0.52's next stable release label Sep 2, 2024
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.

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e8c8447 and 2de5996.

Files selected for processing (1)
  • x/group/go.mod (1 hunks)
Files skipped from review due to trivial changes (1)
  • x/group/go.mod

@julienrbrt
Copy link
Member

@github-actions github-actions bot removed the C:x/group label Sep 2, 2024
@tac0turtle tac0turtle added this pull request to the merge queue Sep 2, 2024
Merged via the queue into main with commit 9197f54 Sep 2, 2024
89 checks passed
@tac0turtle tac0turtle deleted the marko/accounts_replaces branch September 2, 2024 20:01
mergify bot pushed a commit that referenced this pull request Sep 2, 2024
(cherry picked from commit 9197f54)

# Conflicts:
#	client/v2/go.mod
#	go.mod
#	server/v2/cometbft/go.mod
#	x/auth/go.mod
#	x/authz/go.mod
#	x/bank/go.mod
#	x/circuit/go.mod
#	x/consensus/go.mod
#	x/distribution/go.mod
#	x/epochs/go.mod
#	x/evidence/go.mod
#	x/feegrant/go.mod
#	x/gov/go.mod
#	x/mint/go.mod
#	x/nft/go.mod
#	x/params/go.mod
#	x/protocolpool/go.mod
#	x/slashing/go.mod
#	x/staking/go.mod
#	x/upgrade/go.mod
julienrbrt added a commit that referenced this pull request Sep 2, 2024
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.

4 participants