Skip to content

Mongo pool upgrade#1698

Merged
naveenpaul1 merged 1 commit intonoobaa:masterfrom
naveenpaul1:mongo_pool_upgrade
Sep 12, 2025
Merged

Mongo pool upgrade#1698
naveenpaul1 merged 1 commit intonoobaa:masterfrom
naveenpaul1:mongo_pool_upgrade

Conversation

@naveenpaul1
Copy link
Contributor

@naveenpaul1 naveenpaul1 commented Sep 10, 2025

Explain the changes

  1. Change default pool.ResourceType name to backingstores

Issues: Fixed #xxx / Gap #xxx

Testing Instructions:

  • Doc added/updated
  • Tests added

Summary by CodeRabbit

  • Bug Fixes
    • Improved cleanup when deleting BackingStores and NamespaceStores by correctly identifying the internal pool by name, ensuring accounts’ default resources are updated before removal.
    • Reduces errors and inconsistencies during teardown, improving reliability and predictability of resource finalization.

@coderabbitai
Copy link

coderabbitai bot commented Sep 10, 2025

Walkthrough

Updated internal pool detection in deletion reconciliation flows to check pool name equals "backingstores" instead of checking pool resource type equals "INTERNAL". Applies to backingstore and namespacestore reconcilers; subsequent account updates and deletion flows remain unchanged.

Changes

Cohort / File(s) Summary
Reconciler internal pool identification
pkg/backingstore/reconciler.go, pkg/namespacestore/reconciler.go
Replace condition pool.ResourceType == "INTERNAL" with pool.Name == "backingstores" to set internalPoolName; downstream logic (updating accounts’ DefaultResource/S3Access and deletion/finalization) unchanged.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant R as Reconciler
  participant P as Pools List
  participant A as Accounts
  participant API as NamespaceResourceAPI

  Note over R,P: Changed internal pool detection<br/>from ResourceType == "INTERNAL"<br/>to Name == "backingstores"

  R->>P: List pools
  alt pool named "backingstores" exists
    R->>R: internalPoolName = "backingstores"
  else no match
    R->>R: internalPoolName = ""
  end

  R->>A: Update DefaultResource/S3Access using internalPoolName
  R->>API: Delete resource
  R->>R: Finalize (remove finalizer)
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks (2 passed, 1 warning)

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description follows the repository template but is incomplete: the "Issues" and "Testing Instructions" sections are empty, and the checklist shows documentation and tests unchecked; the "Explain the changes" field is a single-line note without details on scope, migration impacts, or verification steps. Because required template fields are not fully filled and testing guidance is missing, the description does not provide sufficient information for reviewers to validate the change. Populate the "Issues" section (or explicitly state "none"), add detailed testing instructions with step-by-step verification and any migration or rollout notes, and update the checklist by adding or linking relevant docs and tests (or mark why they are not applicable).
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Mongo pool upgrade" is concise and broadly related to the changes in this PR (it addresses pool-related changes, specifically renaming the default pool.ResourceType to "backingstores"), so it correctly signals the general intent. However, it is somewhat generic and does not state the concrete change being made, which may slow reviewers scanning history. Overall it is acceptable but could be clearer.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1572203 and 0817d74.

📒 Files selected for processing (2)
  • pkg/backingstore/reconciler.go (1 hunks)
  • pkg/namespacestore/reconciler.go (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • pkg/namespacestore/reconciler.go
  • pkg/backingstore/reconciler.go
⏰ 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). (13)
  • GitHub Check: run-kms-key-rotate-test
  • GitHub Check: run-kms-kmip-test
  • GitHub Check: run-kms-dev-test
  • GitHub Check: run-cli-tests
  • GitHub Check: cnpg-deployment-test
  • GitHub Check: run-core-config-map-tests
  • GitHub Check: golangci-lint
  • GitHub Check: run-azure-vault-test
  • GitHub Check: run-kms-tls-token-test
  • GitHub Check: run-admission-test
  • GitHub Check: run-kms-tls-sa-test
  • GitHub Check: run-hac-test
  • GitHub Check: run-operator-tests
✨ 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

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: Naveen Paul <napaul@redhat.com>
@naveenpaul1 naveenpaul1 merged commit ffbbd4d into noobaa:master Sep 12, 2025
16 of 18 checks passed
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