OCPBUGS-115110: Cover non-blocking required-SCC monitor results - #31660
vsolanki12 wants to merge 1 commit into
Conversation
Lock in the existing non-blocking classification for the six namespaces reported in OCPBUGS-115110. Retain pod diagnostics and verify that missing annotations outside the allowlists, disallowed SCCs, and collection errors still fail through the real monitor lifecycle. This is regression coverage, not a change to SCC policy or pod manifests. Refs: OCPBUGS-115110 Signed-off-by: Vimal Solanki <vsolanki@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: automatic mode |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-115110, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review. WalkthroughAdds a new test file for the required-SCC annotation checker. The tests use fake API clients and monitor lifecycles to verify annotation results, namespace aggregation, failure and flake handling, and collection errors. ChangesRequired SCC monitor tests
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Other Merge Risk: ⚪ Minimal · up to The added regression tests exercise the intended monitor lifecycle without bypassing SCC collection or result aggregation, so no merge-blocking risk is identified. 🚥 Pre-merge checks | ✅ 13 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (13 passed)
Full details: Test Structure And QualityExplanation The added tests have several bare error assertions without operation context. In Resolution Add contextual messages to every bare error assertion. For example:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: vsolanki12 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/jira refresh |
|
@vsolanki12: This pull request references Jira Issue OCPBUGS-115110, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/pipeline required |
|
Scheduling tests matching the |
|
/test e2e-gcp-ovn |
|
@vsolanki12: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
Job Failure Risk Analysis for sha: 94fd433
|
Summary
Add regression coverage for the existing required-SCC monitor behavior described
in OCPBUGS-115110.
This implements the issue's verification option: confirm that the existing
namespacesWithPendingSCCPinningandsystemNamespaceshandling makes thereported namespaces non-blocking. It does not change SCC policy, add allowlist
entries, annotate workloads, or change the monitor's production behavior.
The new tests check:
passing companion with exactly the same name, and the real monitor returns
Succeeded.nonstandard SCC remain blocking.
existing behavior; skips are not accepted as passing companions.
kube-systemflake cannot hide a failure in another namespace.The tests use fake Kubernetes objects and execute the production checker and
monitor lifecycle. Only client construction at startup is replaced to retain
the fake client. They require no cluster access and do not test SCC admission.
Before and after
At base
147d29558f3fd344567894152cdf1ee6b9044063, the checker package reported[no test files]. Its runtime behavior already made the reported namespacesnon-blocking. After this change, 21 focused scenarios pass: 16 classification
cases, two mixed-pod cases, one mixed-namespace aggregation case, and two
API-error cases. Validated-but-unpinned pods remain violations; diagnostics for
mixed pods name only the unpinned workload.
Five deliberately broken variants were tested using temporary Go source
overlays, without changing the submitted production source:
Each variant exited 1 with the expected test failures, not a compilation error.
These are injected regressions demonstrating test sensitivity, not a claim that
the original CI build contained those changes.
The final focused tests passed 10 repetitions with race detection and shuffled
order. All 21 scenarios also passed again without overlays after the mutation
checks. Repository unit tests, full
make verify, theopenshift-testsbinarybuild, formatting, and whitespace checks passed. Local CodeRabbit
completed with zero findings on the final diff. All seven deep-review specialists
completed with no unresolved findings; two initial QA suggestions were
incorporated and re-reviewed.
Validation commands
Run from the repository root with Go 1.26.4 and vendored dependencies:
The aggregation test passed all seven existing cases, including skips not
counting as passes. The unit-suite sandbox initially prevented local HTTP test
servers from binding; the unrestricted rerun passed. The build output was
directed to a temporary directory. Verification's APM step also required access
to its tool cache outside the sandbox; its rerun passed with existing warnings
about vendored instruction files, which were left untouched.
No full live conformance or HyperShift
operator-upgrade suite is claimed.
Fresh live evidence gathered before this test-only change
On 2026-09-18, the actual Origin analyzer and monitor lifecycle were run
read-only from source
c4a623c952596ab73581f217f170b94f8bce6d4aagainst twoclusters. The relevant checker, monitor aggregation, and suite failure-counting
files are unchanged between that source and this PR's upstream base.
In the HCP observation, all four reported
kube-systemworkload families hadrunning instances:
kas-connection-checker,konnectivity-agent,global-pull-secret-syncer, andkube-apiserver-proxy. Nine observed pods lackedthe required-SCC annotation; the namespace emitted one failed and one passing
JUnit with the same name. DNS, Multus, network-operator, and OVN also emitted
failure/pass pairs. Observed ingress pods were already annotated; the reported
unannotated ingress case is covered by the deterministic regression test.
The HCP run recorded 67 GET requests and zero rejected write attempts in the
guarded analyzer/inventory transport. Independent JUnit inspection found zero
failing-only names across 67 unique test names, including lifecycle checks.
The IPI run did not cover HyperShift
kube-systemworkloads because thatnamespace was empty there.
Limits and scope
reproduce the originally reported 5.0/5.1 build or prove its job outcome.
original CI test image. The HCP snapshot was taken during rollout.
image-registry reported a failed image-pruner Job. That independent health
failure was neither hidden nor fixed by SCC results.
MachineConfigPool API; SCC collection and lifecycle checks succeeded.
worker rollout need a separate change and upgrade validation.
This PR supplies reproducible regression coverage and fresh evidence for the
existing-allowlist resolution. Acceptance of that evidence for the affected
release remains a maintainer decision.