Skip to content

Settings: Stopped flagging gateway.recover_after_time as a difference #521

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

amotl
Copy link
Member

@amotl amotl commented Aug 19, 2025

About

... when gateway.expected_nodes and gateway.expected_data_nodes are not defined.

References

Copy link

coderabbitai bot commented Aug 19, 2025

Walkthrough

Adds a gateway-specific guard in compare_cluster_settings to skip flagging gateway.recover_after_time when gateway.expected_nodes and gateway.expected_data_nodes are unset (-1) and the value is "0ms". Changes non_default_settings from a list to a set. Adds an Unreleased CHANGES.md entry.

Changes

Cohort / File(s) Change summary
Changelog update
CHANGES.md
Documented the new behavior: do not report gateway.recover_after_time differences when gateway.expected_nodes and gateway.expected_data_nodes are not defined (-1).
Settings compare logic
cratedb_toolkit/settings/compare.py
Added a guard to skip gateway.recover_after_time when expected node counts are -1 and value is "0ms"; changed non_default_settings from a list to a set; preserved existing comparison logic otherwise.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Caller
  participant Comparator as SettingsComparator
  participant Flat as flat_settings

  Caller->>Comparator: compare_cluster_settings(flat_settings)
  Comparator->>Flat: read "gateway.recover_after_time"
  alt key == "gateway.recover_after_time"
    Comparator->>Flat: read "gateway.expected_nodes", "gateway.expected_data_nodes"
    alt value == "0ms" and both == -1
      note right of Comparator #DFF2E1: Skip reporting this key (default scenario)
      Comparator-->>Caller: continue loop (no diff)
    else
      note right of Comparator #FFF4D6: Apply standard comparisons
      Comparator->>Comparator: add to non_default_settings (set)
    end
  else
    Comparator->>Comparator: apply existing time/memory/other comparisons
    Comparator->>Comparator: add to non_default_settings (set)
  end
  Comparator-->>Caller: return non_default_settings (deduped)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers

  • WalBeh

Poem

A hop, a skip—no false alarms today,
I sniff the gateway’s clock, then bounce away.
When nodes aren’t set, I twitch my ear—
“No difference here,” I cheer.
Thump-thump! Duplicates gone, comparisons clear. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between aa10402 and e0565a9.

📒 Files selected for processing (2)
  • CHANGES.md (1 hunks)
  • cratedb_toolkit/settings/compare.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • CHANGES.md
  • cratedb_toolkit/settings/compare.py
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ctk-settings-compare-gateway-recover_after_time

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

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

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

Copy link

@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: 1

🧹 Nitpick comments (1)
CHANGES.md (1)

4-6: Tighten wording; clarify semantics and reference the issue

Clarify that "not defined" means both settings are at their unset sentinel (-1), and add the issue reference for traceability.

-- Settings: Stopped flagging `gateway.recover_after_time` as a difference
-  when `gateway.expected_nodes` and `gateway.expected_data_nodes` are not
-  defined.
+- Settings: Stop flagging `gateway.recover_after_time` as a difference
+  when both `gateway.expected_nodes` and `gateway.expected_data_nodes` are
+  unset (-1). See GH-520.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f6cd246 and aa10402.

📒 Files selected for processing (2)
  • CHANGES.md (1 hunks)
  • cratedb_toolkit/settings/compare.py (1 hunks)

... when `gateway.expected_nodes` and `gateway.expected_data_nodes`
are not defined.
@amotl amotl force-pushed the ctk-settings-compare-gateway-recover_after_time branch from aa10402 to e0565a9 Compare August 19, 2025 22:04
@amotl amotl requested review from mfussenegger and WalBeh August 19, 2025 22:13
@amotl amotl marked this pull request as ready for review August 19, 2025 22:13
@amotl amotl requested a review from kneth August 20, 2025 11:05
@amotl amotl requested review from seut and removed request for mfussenegger August 21, 2025 14:17
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