Skip to content

🌱 Fix user-provided namespace ownership e2e assertion - #2996

Open
nader-ziada wants to merge 2 commits into
operator-framework:mainfrom
nader-ziada:fix/user-provided-namespace-ownership
Open

nader-ziada wants to merge 2 commits into
operator-framework:mainfrom
nader-ziada:fix/user-provided-namespace-ownership

Conversation

@nader-ziada

@nader-ziada nader-ziada commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

  • check that the namespace has no owner references after successful installation instead of asserting that PSA labels are absent.

Reviewer Checklist

  • API Go Documentation
  • Tests: Unit Tests (and E2E Tests, if appropriate)
  • Comprehensive Commit Messages
  • Links to related GitHub Issue(s)

Summary by CodeRabbit

  • Tests
    • Expanded end-to-end checks to confirm that OLM-managed namespaces are associated with the active extension revision and have the expected Pod Security Admission and template labels.
    • Updated checks for user-provided namespaces to confirm they lack the template label and have no owner references, without relying on the absence of a Pod Security Admission label.
    • Added clearer error reporting when a namespace cannot be fetched or has owner references.

@openshift-ci
openshift-ci Bot requested review from fgiudici and pedjak October 9, 2026 15:36
@netlify

netlify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for olmv1 ready!

Name Link
🔨 Latest commit c13da80
🔍 Latest deploy log https://app.netlify.com/projects/olmv1/deploys/6ac91185d0153e000885483c
😎 Deploy Preview https://deploy-preview-2996--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@nader-ziada

Copy link
Copy Markdown
Contributor Author

/cc @perdasilva

@openshift-ci
openshift-ci Bot requested a review from perdasilva October 9, 2026 15:36
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 8e50893a-03b5-44f8-8c3d-71bc5c40516d

📥 Commits

Reviewing files that changed from the base of the PR and between a43150b and c13da80.


📒 Files selected for processing (2)
  • test/e2e/features/namespace.feature
  • test/internal/catalog/bundle.go

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review.



📝 Walkthrough

Walkthrough

Namespace end-to-end scenarios check OLM ownership for managed namespaces and check that user-provided namespaces have no owner references. The generated namespace template adds a custom label used by these scenarios.

Changes

Namespace ownership assertions

Layer / File(s) Summary
Mark and assert namespace ownership
test/internal/catalog/bundle.go, test/e2e/features/namespace.feature
The generated namespace template adds a custom label. The managed-namespace scenario checks for that label and OLM ownership. The user-provided-namespace scenario checks that the label and owner references are absent.
Register and implement ownership checks
test/e2e/steps/steps.go
New registered steps check whether a namespace’s controller owner matches the active ClusterExtension revision or whether the namespace has owner references.

Priority: ⬇️ Low

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

Change: Bug fix


Merge Risk: ⚪ Minimal · up to c13da

The namespace scenarios check their distinct marker and ownership expectations. No concrete merge-blocking issue was identified; merge after normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: fixing the end-to-end assertion for user-provided namespace ownership. The 🌱 prefix matches the repository template.
Description check Passed The description summarizes the assertion change and includes the required Reviewer Checklist. The checklist items remain unchecked, but the description is sufficiently complete for review.
Docstring Coverage Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 2 files. (1 skipped: 1 u…
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 a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@nader-ziada
nader-ziada force-pushed the fix/user-provided-namespace-ownership branch from 22a96c1 to f14cb24 Compare October 9, 2026 15:44
Comment thread test/e2e/features/namespace.feature
check that the namespace has no owner references after successful
installation instead of asserting that PSA labels are absent.

Signed-off-by: Nader Ziada <nziada@redhat.com>
@nader-ziada
nader-ziada force-pushed the fix/user-provided-namespace-ownership branch from f14cb24 to a43150b Compare October 9, 2026 15:51
Add a custom label to the test bundle's namespace template.
Verify it is applied to the OLM-managed namespace and remains
absent from the user-provided namespace, alongside ownership checks.

Signed-off-by: Nader Ziada <nziada@redhat.com>
@tmshort

tmshort commented Oct 9, 2026

Copy link
Copy Markdown
Member

/approve

@openshift-ci

openshift-ci Bot commented Oct 9, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tmshort

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

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 9, 2026

This branch has not been deployed

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants