Skip to content

Change the kubecheck of standaloneDBPod to be quiet#1677

Merged
liranmauda merged 1 commit intonoobaa:masterfrom
liranmauda:liran-fix-log
Aug 17, 2025
Merged

Change the kubecheck of standaloneDBPod to be quiet#1677
liranmauda merged 1 commit intonoobaa:masterfrom
liranmauda:liran-fix-log

Conversation

@liranmauda
Copy link
Contributor

@liranmauda liranmauda commented Aug 17, 2025

Explain the changes

Change the kubecheck of standaloneDBPod to be quiet

Issues: Fixed #xxx / Gap #xxx

  1. https://issues.redhat.com/browse/DFBUGS-2869

Change the kubecheck of standaloneDBPod to be quiet

Signed-off-by: liranmauda <liran.mauda@gmail.com>
@coderabbitai
Copy link

coderabbitai bot commented Aug 17, 2025

Walkthrough

Reconciler condition for scaling down the standalone DB pod switches from util.KubeCheck to util.KubeCheckQuiet, altering how the presence/readiness of the pod is evaluated before setting NooBaaPostgresDB replicas to 0. No public interfaces changed.

Changes

Cohort / File(s) Change Summary
DB Reconciler scaling gate
pkg/system/db_reconciler.go
Replaced util.KubeCheck(...) with util.KubeCheckQuiet(...) in the conditional that gates scaling NooBaaPostgresDB replicas to 0; logging and scaling logic unchanged.

Sequence Diagram(s)

sequenceDiagram
  participant Reconciler
  participant KubeUtil as util.KubeCheckQuiet
  participant K8s as Kubernetes API

  Reconciler->>KubeUtil: Check standalone DB pod
  KubeUtil->>K8s: Get pod status
  K8s-->>KubeUtil: Pod info (quiet semantics)
  KubeUtil-->>Reconciler: Result (exists/ready or not)
  alt Condition met
    Reconciler->>K8s: Scale NooBaaPostgresDB replicas=0
  else Condition not met
    Reconciler-->>Reconciler: Do nothing
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

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.yaml
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 de1d328 and 589e89c.

📒 Files selected for processing (1)
  • pkg/system/db_reconciler.go (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
pkg/system/db_reconciler.go (1)
pkg/util/util.go (1)
  • KubeCheckQuiet (617-630)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: run-kms-tls-token-test
  • GitHub Check: run-azure-vault-test
  • GitHub Check: run-admission-test
  • GitHub Check: run-operator-tests
  • GitHub Check: run-kms-dev-test
  • GitHub Check: cnpg-deployment-test
  • GitHub Check: run-kms-tls-sa-test
  • GitHub Check: run-kms-kmip-test
  • GitHub Check: run-kms-key-rotate-test
  • GitHub Check: run-cli-tests
  • GitHub Check: run-hac-test
  • GitHub Check: run-core-config-map-tests
🔇 Additional comments (1)
pkg/system/db_reconciler.go (1)

80-91: Switching to KubeCheckQuiet achieves the goal without changing behavior.

KubeCheckQuiet returns true only when the Pod exists and suppresses logs for not-found and other benign conditions (per util.KubeCheckQuiet), so the scaling decision remains the same while reducing noisy logs. Looks good.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • 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.
  • 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.

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.

@liranmauda liranmauda merged commit 01497d5 into noobaa:master Aug 17, 2025
16 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Aug 20, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants