OPCT-353: fix: add UserAPI groups test to known failures filter - #229
OPCT-353: fix: add UserAPI groups test to known failures filter#229rvanderp3 wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe known-failure filter now recognizes the UserAPI groups conformance test signature. Unit tests verify filtering, retained failures, exclusion counts, and the expected known-failure list. ChangesKnown failure filtering
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
/kind bug |
|
Hello @rvanderp3 ,
I deployed OPCT on a live cluster and checked what I also tested replacing the wildcard opct-scc-privileged ClusterRole with a narrow, scoped role — users/~ output was identical. These groups are SA token claims injected by the API server token authenticator, not configurable or removable. RBAC scoping changes what the SA can do, not what it is. This puts it in the same category as the other Filter5 entries ([sig-arch] External binary usage, [sig-mco] MCP complete upgrade) — permanent false-positive caused by the OPCT environment. A fix would require changing the upstream test in openshift/origin to accept SA-based identities. For now, the known-failure filter is the correct interim mitigation. |
|
/assign @bshaw7 |
|
/test all |
|
@bshaw7: No presubmit jobs available for redhat-openshift-ecosystem/opct@main 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 kubernetes-sigs/prow repository. |
Bug: Filter5 string doesn't match actual test name in pipelineI tested this PR against a real OPCT archive from the latest periodic job (periodic-ci-openshift-release-main-nightly-5.0-opct-platform-external-aws-ccm, build 2078077374410264576). FindingThe filter string at consolidated.go:548 does not match the actual test name flowing through the filter pipeline. The filter uses exact hashmap lookup (hashExclusion[v]), so any mismatch = no filtering. Filter entry in PR: Actual test name in sonobuoy results (includes Suite suffix): The YAML parser joins these two lines into one string with the [Suite:openshift/conformance/parallel] suffix. The filter entry is missing this suffix, so the exact match fails. ReproductionBuilt opct-fixed from this PR branch, ran report against the CI archive: 17 in, 17 out, 0 excluded. The UserAPI test was not filtered. It still appears in failures: Unit test gapThe unit test also has this issue -- it uses the same short name (without Suite suffix) for both the input failures and the filter, so the test passes but doesn't reflect the real data shape. Fix options
|
The test [sig-auth][Feature:UserAPI] users can manipulate groups is a permanent false-positive in the OPCT environment. It calls GET users/~ and expects the authenticated identity to belong to system:masters or system:cluster-admins, but OPCT runs tests using a ServiceAccount (sonobuoy-serviceaccount) whose token always carries the groups [system:authenticated, system:serviceaccounts, system:serviceaccounts:opct]. These groups are injected by the API server token authenticator and cannot be changed via RBAC — RBAC controls what the SA can do, not what it is. Adding the test to the known failures filter prevents it from being reported as a provider-side failure, reducing false positives for partners using VCSP and other integration methods. Reference: https://issues.redhat.com/browse/OPCT-353
Add tests to verify the known failures filter correctly excludes the UserAPI groups test and other known OPCT environment failures from the report pipeline. The tests cover: - Excluding all known failures when all are present - Keeping real failures while excluding known ones - Excluding only the UserAPI groups test - Handling empty failure lists - Passing through all failures when none match known entries These tests validate the exact match behavior of the filter against the TestSuiteKnownFailures list and guard against regressions when entries are added or modified.
ed2e844 to
6b66c7f
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
The [sig-auth][Feature:UserAPI] users can manipulate groups test is a
permanent false-positive in OPCT environments. The test checks the
authenticated user's group membership, expecting either system:masters
or system:cluster-admins. OPCT runs tests using a ServiceAccount
(sonobuoy-serviceaccount) whose identity always includes
system:serviceaccounts groups instead.
Group membership is determined by the authentication layer (token
claims), not by RBAC bindings. A ServiceAccount can never be a member
of system:masters even though it has equivalent API permissions via
the opct-scc-privileged ClusterRole with wildcard rules.
Adding this test to the Filter5 (Known Failures) list prevents it
from appearing as a failure in partner reviews and CI results, reducing
false-positive noise for the Cert-Ops team and partners.
Reference: https://issues.redhat.com/browse/OPCT-353
Checklist