Skip to content

🐛 (e2e) fix namespaces network-policy test searches in - #2034

Merged
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
anik120:np-test-fix
Jun 23, 2025
Merged

🐛 (e2e) fix namespaces network-policy test searches in#2034
openshift-merge-bot[bot] merged 1 commit into
operator-framework:mainfrom
anik120:np-test-fix

Conversation

@anik120

Copy link
Copy Markdown
Member

The test was previously listing networkpolicies to validate only in the namespace operator-controller is deployed in.
Upstream, that is valid since the namespace that operator-controller is deployed in, is the namespace that all other components are deployed in (and therefore all the network polices we expect to find).

A different distribution of olmv1 (downstream) could decide to deploy the policies in different namespaces, in which case the test will not look into all the namespaces it should look into.

This PR fixes the issue by searching in the namespaces both operator-controller and catalogd is deployed in.

Description

Reviewer Checklist

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

The test was previously listing networkpolicies to validate only in
the namespace operator-controller is deployed in.
Upstream, that is valid since the namespace that operator-controller is
deployed in, is the namespace that all other components are deployed in
(and therefore all the network polices we expect to find).
A different distribution of olmv1 (downstream) could decide to deploy the
policies in different namespaces, in which case the test will not look into
all the namespaces it should look into.
This PR fixes the issue by searching in the namespaces both operator-controller
and catalogd is deployed in.
@anik120
anik120 requested a review from a team as a code ownerJune 23, 2025 14:34
@netlify

netlifyBot commented Jun 23, 2025

Copy link
Copy Markdown

Deploy Preview for olmv1 ready!

NameLink
🔨 Latest commita546efe
🔍 Latest deploy loghttps://app.netlify.com/projects/olmv1/deploys/685965ea377e330008c0d5bb
😎 Deploy Previewhttps://deploy-preview-2034--olmv1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@codecov

codecovBot commented Jun 23, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.83%. Comparing base (d18883d) to head (a546efe).
Report is 1 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #2034 +/- ##
=======================================
Coverage 73.83% 73.83% =======================================
Files 80 80 Lines 7154 7154 =======================================
Hits 5282 5282 Misses 1549 1549 Partials 323 323 
FlagCoverage Δ
e2e44.15% <ø> (+0.04%)⬆️
unit60.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@anik120anik120 changed the title (e2e) fix namespaces network-policy test searches in🐛 (e2e) fix namespaces network-policy test searches inJun 23, 2025

@tmshorttmshort left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ciopenshift-ciBot added the lgtm Indicates that a PR is ready to be merged. label Jun 23, 2025
@openshift-ci

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-ciopenshift-ciBot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 23, 2025
@openshift-merge-bot
openshift-merge-botBot merged commit c8d7c1e into operator-framework:mainJun 23, 2025
anik120 added a commit to anik120/operator-controller that referenced this pull request Jun 23, 2025
Follow up to (2034)[operator-framework#2034]
When there is a dual namespace deployment, the default-deny-all policy
is duplicated in both namespaces.
This PR updates the list of `allowedPolicies` to include both policies
if a dual namespace deployment is detected.
openshift-merge-botBot pushed a commit that referenced this pull request Jun 23, 2025
Follow up to (2034)[#2034]
When there is a dual namespace deployment, the default-deny-all policy
is duplicated in both namespaces.
This PR updates the list of `allowedPolicies` to include both policies
if a dual namespace deployment is detected.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approvedIndicates a PR has been approved by an approver from all required OWNERS files.lgtmIndicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@anik120@tmshort