Skip to content

Fix backward compatibility for MaaS DB config namespace detection#2991

Merged
FedeAlonso merged 5 commits into
red-hat-data-services:masterfrom
FedeAlonso:RHOAIENG-76264
Jul 14, 2026
Merged

Fix backward compatibility for MaaS DB config namespace detection#2991
FedeAlonso merged 5 commits into
red-hat-data-services:masterfrom
FedeAlonso:RHOAIENG-76264

Conversation

@FedeAlonso

@FedeAlonso FedeAlonso commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Problem

PR #2987 unconditionally placed maas-db-config in a separate infra namespace (redhat-ai-gateway-infra), assuming all operators have INFRA_NAMESPACE=AUTO
(added by MaaS PR #1051, merged July 7). Operators built before that date — including all EA2 FBC images prior to the July 13 rebuild — expect
maas-db-config in the applications namespace. This caused MaaS DB secret not-found errors on older operator versions.

How it works

detect_infra_namespace() queries the maas-controller deployment for its INFRA_NAMESPACE env var:

  • AUTO → derives the infra namespace (e.g. redhat-ai-gateway-infra for RHOAI, odh-ai-gateway-infra for ODH)
  • Non-empty custom value → uses that namespace as-is
  • Empty or absent → falls back to the applications namespace (pre-infra-separation behavior)
  • maas-controller not deployed → safe fallback to applications namespace

Testing:
dashboard-e2e-tests/1814
Using: quay.io/rhoai/rhoai-fbc-fragment@sha256:6f8c6350ec16320668c7977c12219b2170432fff4d3626ca82dfc4ed909b7405 (Same that failed in ob/rhoai/job/3.5-ea.2/job/selfmanaged/job/cli/job/aws/job/rhoai-smoke/6/)
Before this change:

image

Build dashboard-e2e-tests/1815
Using the same operater image
After this change:
image

dashboard-e2e-tests/1817
Using: Latest 3.5 GA
With this fix running:
WIP

  Detect INFRA_NAMESPACE from the deployed maas-controller instead of
  unconditionally deriving the infra namespace. Operators without
  INFRA_NAMESPACE support (pre-3.5, EA2 before July 13 rebuild) place
  maas-db-config in the applications namespace; new operators with
  INFRA_NAMESPACE=AUTO use the separate infra namespace.
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: ab6ff050-3a3c-4be2-8e80-533150517bf2

📥 Commits

Reviewing files that changed from the base of the PR and between e99c5af and 3c6acb5.

📒 Files selected for processing (1)
  • ods_ci/tasks/Resources/Database/configure_maas_postgres.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • ods_ci/tasks/Resources/Database/configure_maas_postgres.sh

📝 Walkthrough

Walkthrough

The PostgreSQL configuration script detects INFRA_NS from the maas-controller deployment, supports AUTO and explicit namespace values, and falls back to the applications namespace.

Changes

Maas PostgreSQL Namespace Configuration

Layer / File(s) Summary
Infrastructure namespace detection
ods_ci/tasks/Resources/Database/configure_maas_postgres.sh
Adds detect_infra_namespace() to wait for the controller, read INFRA_NAMESPACE, resolve AUTO, preserve explicit values, and default to APPS_NS before setting INFRA_NS.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: antowaddle

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: restoring backward-compatible namespace detection for MaaS DB config.
Description check ✅ Passed The description is directly related to the changes and accurately explains the compatibility fix and behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

bdattoma
bdattoma previously approved these changes Jul 13, 2026
apodhrad
apodhrad previously approved these changes Jul 14, 2026
bdattoma
bdattoma previously approved these changes Jul 14, 2026
@FedeAlonso
FedeAlonso dismissed stale reviews from bdattoma and apodhrad via 3c6acb5 July 14, 2026 09:09
@openshift-ci openshift-ci Bot removed the lgtm label Jul 14, 2026
@FedeAlonso
FedeAlonso enabled auto-merge (squash) July 14, 2026 09:51
@sonarqubecloud

Copy link
Copy Markdown

@antowaddle antowaddle left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

/lgtm

@FedeAlonso
FedeAlonso merged commit 2ba30b3 into red-hat-data-services:master Jul 14, 2026
10 checks passed
@openshift-ci

openshift-ci Bot commented Jul 14, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: antowaddle, bdattoma, FedeAlonso

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants