Skip to content

Conversation

@Pricstas
Copy link
Contributor

@Pricstas Pricstas commented Mar 10, 2025

  • Updated panic messages in SetCMS and SetCheckTxHandler to correctly reflect function names.
  • Added a missing if app.sealed check in SetStreamingManager to prevent modifications after sealing.

Why?

  • Ensures panic messages match function names, making debugging more straightforward.
  • Aligns SetStreamingManager with the behavior of other setter methods that enforce sealing checks.

Author Checklist

I have...

  • included the correct type prefix in the PR title (fix)
  • 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

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

  • Bug Fixes
    • Updated panic messages to accurately reflect method names when the BaseApp is sealed, ensuring clearer error notifications during unauthorized operations.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 10, 2025

📝 Walkthrough

Walkthrough

The pull request modifies panic messages in the BaseApp methods within baseapp/options.go. Specifically, the panic messages in the SetCMS and SetCheckTxHandler methods have been updated to reflect the correct method names when the BaseApp is sealed. Additionally, a new method, SetStreamingManager, has been introduced with a panic check to ensure consistency when operations are performed on a sealed BaseApp.

Changes

File Summary of Changes
baseapp/options.go - Updated panic message in SetCMS (from "SetEndBlocker() on sealed BaseApp" to "SetCMS() on sealed BaseApp")
- Updated panic message in SetCheckTxHandler (from "SetCheckTx() on sealed BaseApp" to "SetCheckTxHandler() on sealed BaseApp")
- Added SetStreamingManager with a panic check for sealed BaseApp

Possibly related PRs

Suggested labels

C:server/v2, C:server/v2 stf

Suggested reviewers

  • tac0turtle
  • kocubinski

Tip

⚡🧪 Multi-step agentic review comment chat (experimental)
  • We're introducing multi-step agentic chat in review comments. This experimental feature enhances review discussions with the CodeRabbit agentic chat by enabling advanced interactions, including the ability to create pull requests directly from comments.
    - To enable this feature, set early_access to true under in the settings.

📜 Recent review details

Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e83c93b and 253916d.

📒 Files selected for processing (1)
  • CHANGELOG.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.md`: "Assess the documentation for misspellings, grammatical errors, missing documentation and correctness"

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

  • CHANGELOG.md
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Summary
🔇 Additional comments (1)
CHANGELOG.md (1)

87-87: Entry looks good and matches the PR objectives.

The changelog entry accurately describes the changes made in PR #23951: correcting panic messages in SetCMS and SetCheckTxHandler functions and adding a missing sealed check in SetStreamingManager. The improvement is properly categorized and includes the appropriate PR reference.


🪧 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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 generate docstrings to generate docstrings for this 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.

@aljo242
Copy link
Contributor

aljo242 commented Mar 10, 2025

@Pricstas was there an error you encountered regarding the streaming manager call and the app being sealed?

@Pricstas
Copy link
Contributor Author

@aljo242
No, I didn’t encounter an error. I added the if app.sealed check to align SetStreamingManager with other setter methods that enforce sealing checks. This is more of a consistency fix rather than a bug fix, ensuring uniform behavior across the codebase.

@aljo242
Copy link
Contributor

aljo242 commented Mar 19, 2025

can we get a changelog for this?

@Pricstas
Copy link
Contributor Author

@aljo242
I've added the changelog entry under the Improvements section

@aljo242 aljo242 merged commit a9e7d5b into cosmos:main Mar 20, 2025
68 of 71 checks passed
mergify bot pushed a commit that referenced this pull request Mar 20, 2025
…Manager (#23951)

(cherry picked from commit a9e7d5b)

# Conflicts:
#	CHANGELOG.md
#	baseapp/options.go
github-merge-queue bot pushed a commit that referenced this pull request Mar 25, 2025
Co-authored-by: Tristav <124001124+Pricstas@users.noreply.github.com>
Co-authored-by: aljo242 <alex@interchainlabs.io>
Co-authored-by: Tyler <48813565+technicallyty@users.noreply.github.com>
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.

2 participants