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

removed QueryLatestConsensusState #5991

Merged

Conversation

chandiniv1
Copy link
Contributor

@chandiniv1 chandiniv1 commented Mar 14, 2024

closes: #5960

Summary by CodeRabbit

  • Refactor
    • Removed the client CLI command QueryLatestConsensusState in the core/04-channel module, impacting API functionality.
    • Deprecated testing package functions in coordinator.

Copy link
Contributor

coderabbitai bot commented Mar 14, 2024

Walkthrough

Walkthrough

The change involves removing the QueryLatestConsensusState utility function from the IBC Go codebase, impacting the API functionality. Additionally, deprecated testing package functions in the coordinator have been removed, aligning the codebase with current standards and best practices.

Changes

File Path Change Summary
modules/core/04-channel/client/utils/utils.go Removed QueryLatestConsensusState function
testing/coordinator/deprecated_functions.go Removed deprecated testing package functions

Assessment against linked issues

Objective Addressed Explanation
Remove QueryLatestConsensusState utility function (#5960)

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

Configuration used: .coderabbit.yml

Commits Files that changed from the base of the PR and between 743f286 and e86dbe8.
Files selected for processing (1)
  • modules/core/04-channel/client/utils/utils.go (1 hunks)
Additional comments: 1
modules/core/04-channel/client/utils/utils.go (1)
  • 125-130: > 📝 NOTE

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

Overall, the removal of the QueryLatestConsensusState function and any related helper functions appears to have been completed as intended. The file adheres well to the Uber Golang style guide, and the remaining code is consistent and well-structured. One area for potential improvement is the use of context.Background() in gRPC calls. If possible, consider using more specific contexts passed from higher-level calls to better handle cancellations and timeouts.

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

Commits Files that changed from the base of the PR and between e86dbe8 and 1852210.
Files selected for processing (1)
  • modules/core/04-channel/client/utils/utils.go (2 hunks)
Additional comments: 1
modules/core/04-channel/client/utils/utils.go (1)
  • 14-19: > 📝 NOTE

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

Consider passing a context.Context as a parameter to functions making gRPC calls instead of using context.Background() directly. This change would allow for better control over request lifecycles, including timeouts and cancellations, enhancing the maintainability and robustness of the code.

Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

Thanks, @chandiniv1.

Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

Thanks 🙏

@damiannolan
Copy link
Member

should we add a changelog or note in migration doc? cc. @crodriguezvega

@crodriguezvega
Copy link
Contributor

should we add a changelog or note in migration doc? cc. @crodriguezvega

oh, yeah, we definitely should!

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Thank you @chandiniv1

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

Commits Files that changed from the base of the PR and between 1852210 and f45860f.
Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
Additional comments: 1
CHANGELOG.md (1)
  • 44-44: The documentation accurately reflects the removal of the QueryLatestConsensusState client CLI command in the core/04-channel module. This change is correctly categorized under "API Breaking", providing clear information to users about the impact of this change.

@DimitrisJim DimitrisJim enabled auto-merge (squash) March 15, 2024 08:53
@chandiniv1 chandiniv1 requested a review from srdtrk as a code owner March 15, 2024 08:57
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.yml

Commits Files that changed from the base of the PR and between f45860f and 81f7348.
Files selected for processing (1)
  • docs/docs/05-migrations/13-v8-to-v9.md (1 hunks)
Additional comments: 2
docs/docs/05-migrations/13-v8-to-v9.md (2)
  • 37-38: The documentation correctly notes the removal of the QueryLatestConsensusState function from the 04-channel CLI. However, it would enhance clarity to briefly mention the rationale behind this removal or link to the relevant discussion for readers seeking more context.
  • 34-41: > 📝 NOTE

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

The deprecation notice for the testing package functions is clear and provides a good directive for users on the alternatives. It might be beneficial to also include a brief example of how to transition from the deprecated functions to the new ones, aiding users in adapting their existing code more seamlessly.

@DimitrisJim DimitrisJim merged commit a0070b2 into cosmos:main Mar 15, 2024
72 of 73 checks passed
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.

Remove QueryLatestConsensusState utility function
4 participants