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

docs: reword upgrading.md #19900

Merged
merged 3 commits into from
Apr 8, 2024
Merged

docs: reword upgrading.md #19900

merged 3 commits into from
Apr 8, 2024

Conversation

julienrbrt
Copy link
Member

@julienrbrt julienrbrt commented Mar 28, 2024

Description

ref: #19869 (comment)


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

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

  • Documentation
    • Updated UPGRADING.md with instructions for relocating codectypes.Any and deprecating the Amino JSON codec.

@julienrbrt julienrbrt requested a review from a team as a code owner March 28, 2024 20:03
Copy link
Contributor

coderabbitai bot commented Mar 28, 2024

Walkthrough

Walkthrough

This update involves the relocation of codectypes.Any to a new package and deprecates the Amino JSON codec, guiding users towards the new annotations documentation. Additionally, it enhances the go-mod-tidy-all.sh script by checking for the presence of nix before attempting to use gomod2nix, ensuring the necessary tools are available for operation.

Changes

File(s) Change Summary
UPGRADING.md Moved codectypes.Any, deprecated Amino JSON codec, added annotations doc link
scripts/.../go-mod-tidy-all.sh Added nix presence check before running gomod2nix

Possibly related issues

  • #16593: [Docs] update docs to 0.50 - The changes, especially the documentation updates and deprecations, could directly contribute to the documentation upgrade efforts mentioned in this issue.

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-tests 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 tests 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 tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

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

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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: 4

Configuration used: .coderabbit.yml

Commits Files that changed from the base of the PR and between b9c8d60 and 62ba3b2.
Files selected for processing (2)
  • UPGRADING.md (2 hunks)
  • scripts/go-mod-tidy-all.sh (1 hunks)
Path instructions used (1)
UPGRADING.md (1)

**/*.md
Assess the documentation for misspellings, grammatical errors, missing documentation and correctness

Additional comments (24)
scripts/go-mod-tidy-all.sh (2)
  • 17-17: The addition of a check for nix before running gomod2nix is a good practice. It ensures that the necessary tools are available, enhancing the script's reliability.
  • 13-20: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [17-25]

When installing gomod2nix if it's not found, consider verifying that go is available and properly configured. This can prevent potential issues for users who might not have go set up correctly. A simple check before attempting the installation could be beneficial:

if ! command -v go &> /dev/null; then
    echo "Go is not installed or not in PATH, which is required for installing gomod2nix."
    exit 1
fi
UPGRADING.md (22)
  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [4-4]

The term "SimApp" might be unfamiliar to some readers. Consider adding a brief explanation or a link to more information about SimApp for clarity.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [15-15]

The sentence structure here is a bit unclear. Consider rephrasing for better readability.

Suggestion: "This refactoring is part of the effort to abstract the SDK from the global bech32 config."

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [19-19]

It's generally a good practice to avoid using terms like "usually" without further explanation. If root.go is the common location for the application client, consider stating it more definitively.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [30-30]

The term "depinject" might not be clear to all readers. Consider adding a brief explanation or a link to more information about dependency injection in the Cosmos SDK.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [48-48]

The phrase "For depinject users" could be more inclusive by mentioning "For users utilizing dependency injection," making it clearer to those unfamiliar with the term "depinject."

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [52-52]

The term "non depinject users" could be confusing. Consider rephrasing to "For users not utilizing dependency injection" for clarity.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [62-62]

The phrase "as explained in the genesis interface update" lacks a direct link or further explanation. Ensure that readers can easily find the referenced section.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [72-72]

The term "nonces" might not be familiar to all readers. Consider adding a brief explanation or a link to more information about nonces in the context of transactions.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [94-94]

The phrase "as early as possible" is somewhat vague. Consider specifying where in the AnteHandler chain this decorator should ideally be placed.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [108-108]

The term "SnapshotManager" might not be clear to all readers. Consider adding a brief explanation or a link to more information about the SnapshotManager and its role.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [120-120]

The phrase "Note, this is critical" could be emphasized for importance. Consider using a stronger statement like "It is crucial to note that closing the unordered tx manager is essential for ensuring..."

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [146-146]

The transition from hosting Tendermint protos to using buf.build for CometBFT might not be clear to all readers. Consider adding a brief explanation of the significance of this change.

  • 151-151: The phrase "This change is optional" could be misleading. Clarify under what circumstances a module developer might choose not to make this change.
  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [159-159]

The change in MsgSimulatorFn could impact existing simulations. Consider advising readers to review their simulation setups for compatibility.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [169-169]

The introduction of the Core API is a significant change. Recommend providing examples or links to documentation for modules to transition smoothly.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [188-188]

The change in HasRegisterInterfaces could impact module interoperability. Suggest providing a template or example implementation for clarity.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [196-196]

The move of dependency injection functions could lead to import errors. Recommend providing a migration guide or script to update imports automatically.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [202-202]

The requirement to migrate to v0.50 before upgrading to v0.51 could be emphasized more strongly to prevent migration issues.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [206-206]

The changes to genesis interfaces are critical for module developers. Suggest providing detailed examples of how to implement these changes.

  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [223-223]

The migration to collections is a significant change. Recommend providing a detailed guide or examples for modules to transition smoothly.

  • 445-445: The link to annotations documentation is crucial for developers. Ensure that the link is accessible and up-to-date.
  • 148-155: > 📝 NOTE

This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [449-449]

The removal of gogoproto.goproto_stringer = false could impact logging and debugging. Advise reviewing the usage of String() methods in critical paths.

Comment on lines 13 to 20
# automatically.
cd simapp
if command -v nix &> /dev/null
nix develop .. -c gomod2nix
then
nix develop .. -c gomod2nix
if ! command -v gomod2nix &> /dev/null
then
echo "gomod2nix could not be found in PATH, installing..."
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [5-5]

Consider using a while read loop or find -exec for more robust handling of filenames, especially those containing spaces or newlines. For example:

find . -name go.mod -exec sh -c 'echo "Updating $1"; DIR=$(dirname "$1"); (cd "$DIR"; go mod tidy)' _ {} \;

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [7-7]

Variables should be double-quoted to prevent globbing and word splitting. This is particularly important for paths that might contain spaces. For example:

DIR=$(dirname "$modfile")

📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [8-8]

To ensure the script handles directory paths correctly, especially those with spaces, wrap $DIR in double quotes:

(cd "$DIR"; go mod tidy)

UPGRADING.md Outdated Show resolved Hide resolved
UPGRADING.md 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.

Actionable comments posted: 0

Review Status

Configuration used: .coderabbit.yml

Commits Files that changed from the base of the PR and between 62ba3b2 and 9134738.
Files selected for processing (1)
  • UPGRADING.md (2 hunks)
Additional Context Used
Path-based Instructions (1)
UPGRADING.md (1)

**/*.md:
Assess the documentation for misspellings, grammatical errors, missing documentation and correctness

Additional comments not posted (2)
UPGRADING.md (2)

151-151: The relocation of codectypes.Any to a new package is correctly documented. However, it's important to ensure that all references to codectypes.Any throughout the project are updated to reflect this change.


445-445: The link to the annotations documentation is a valuable resource for developers. It's crucial to verify that all module developers are aware of this change and update their protobuf files accordingly.

@julienrbrt julienrbrt added this pull request to the merge queue Apr 8, 2024
Merged via the queue into main with commit e5b0e0e Apr 8, 2024
54 of 55 checks passed
@julienrbrt julienrbrt deleted the julien/reword branch April 8, 2024 15:59
alpe added a commit to alpe/cosmos-sdk that referenced this pull request Apr 9, 2024
* main:
  fix(simapp): use correct store keys for upgrade (cosmos#19987)
  build(ci): Remove staticmajor due to false positives (cosmos#19989)
  build(deps): Bump google.golang.org/grpc from 1.63.0 to 1.63.2 (cosmos#19982)
  chore: linting fixes (cosmos#19978)
  docs: reword upgrading.md (cosmos#19900)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants