Repository navigation
🌱 add ClusterObjectSet CRD validation unit tests for probes and immutability - #3024
Merged
openshift-merge-bot[bot] merged 1 commit intoOct 19, 2026
Conversation
✅ Deploy Preview for olmv1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
|
/hold until group PR merges |
…ability Fill gaps in the ClusterObjectSet CRD validation coverage: - Immutability: lifecycleState cannot be un-archived. - Progression probe union rules: ObjectSelector and Assertion discriminator requirements, ConditionEqual status enum, field-path syntax, and the at-least-one-assertion requirement, plus valid baselines. - Phase and ObjectSourceRef bounds: phase-name length and uniqueness, ref name/key/namespace bounds, and the progressionProbes item cap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Per G. da Silva <pegoncal@redhat.com>
perdasilva
force-pushed
the
cos-crd-validation-tests
branch
from
October 19, 2026 15:00
9c9ec0e to
5546f1c
Compare
Contributor
Author
|
/unblock |
Contributor
Author
|
/unhold |
Member
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fao89, tmshort The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
openshift-merge-bot
Bot
merged commit Oct 19, 2026
7cbc3e5
into
operator-framework:main
41 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fills gaps in the ClusterObjectSet CRD validation test coverage. These are additive, test-only changes that exercise CEL and OpenAPI schema rules against the envtest API server, complementing the existing table-driven validation tests in
api/v1.Immutability (
TestClusterObjectSetImmutability,TestClusterObjectSetDigestImmutable)spec.lifecycleStatecannot be un-archived (Archived→Active rejected; Active→Archived allowed)status.observedPhases[].digestis immutable once set (settable from empty, rejected on change)This completes immutability coverage for every immutable field in the CRD (
revision,phases,collisionProtection,lifecycleState,completedAt,observedPhases[].digest).Progression probe union rules (
TestClusterObjectSetValidity)ObjectSelector: GroupKind requiresgroupKind/ forbidslabel; Label requireslabel; Label requires exactly one ofmatchLabels/matchExpressions; invalid selector type rejectedAssertion: invalid type rejected;ConditionEqualrequiresconditionEqual; mismatched union member rejected;ConditionEqual.statusenum enforced;FieldValue/FieldsEqualfield-path syntax enforced; at-least-one-assertion requiredNotes
errors.IsInvalidon rejection rather than matching specific messages.metav1.LabelSelectorisomitzero, so the typed client omits it and the request is caught by the "label required" rule before reaching the exactly-one rule. The "both" case covers that rule's reject path.Testing
make test-unit(orgo test ./api/v1/...with envtest assets) — all cases pass.🤖 Generated with Claude Code
Summary by CodeRabbit