Repository navigation
🌱 Document COS revision chains and test revision identity #3096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-merge-bot
merged 3 commits into
operator-framework:main
from
fgiudici:fix/oprun-4781-followups
Nov 3, 2026
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| @BoxcutterRuntime | ||
| Feature: Validate ClusterObjectSet revision identity | ||
|
|
||
| A ClusterObjectSet's name must be <group>-<revision>, with the revision in | ||
| decimal and without leading zeros. This lets Kubernetes name uniqueness | ||
| prevent duplicate revision numbers within a group, regardless of ownership. | ||
|
|
||
| Background: | ||
| Given OLM is available | ||
|
|
||
| Scenario Outline: Reject a ClusterObjectSet name with <mismatch> | ||
| When resource apply fails with error msg containing "metadata.name must be <spec.group>-<spec.revision>" | ||
| """ | ||
| apiVersion: olm.operatorframework.io/v1 | ||
| kind: ClusterObjectSet | ||
| metadata: | ||
| name: <name> | ||
| spec: | ||
| group: ${NAME} | ||
| revision: 1 | ||
| lifecycleState: Active | ||
| collisionProtection: Prevent | ||
| """ | ||
| Then resource "clusterobjectset/<name>" is eventually not found | ||
|
|
||
| Examples: | ||
| | mismatch | name | | ||
| | a different group | ${NAME}-other-1 | | ||
| | a different revision | ${NAME}-2 | | ||
| | a revision with leading zeros | ${NAME}-01 | | ||
|
|
||
| Scenario: A group cannot contain duplicate revision numbers | ||
| Given ClusterObjectSet is applied | ||
| """ | ||
| apiVersion: olm.operatorframework.io/v1 | ||
| kind: ClusterObjectSet | ||
| metadata: | ||
| name: ${NAME}-1 | ||
| spec: | ||
| group: ${NAME} | ||
| revision: 1 | ||
| lifecycleState: Active | ||
| collisionProtection: Prevent | ||
| """ | ||
| And resource "clusterobjectset/${NAME}-1" UID is remembered | ||
| # The existing COS is Active. Request Archived in the duplicate so that an | ||
| # accidental update would change its state. After the create is rejected, | ||
| # assert that the existing COS is still Active. | ||
| When resource create fails with error msg containing "already exists" | ||
| """ | ||
| apiVersion: olm.operatorframework.io/v1 | ||
| kind: ClusterObjectSet | ||
| metadata: | ||
| name: ${NAME}-1 | ||
| spec: | ||
| group: ${NAME} | ||
| revision: 1 | ||
| lifecycleState: Archived | ||
| collisionProtection: Prevent | ||
| """ | ||
| Then resource "clusterobjectset/${NAME}-1" keeps its UID | ||
| And resource "clusterobjectset/${NAME}-1" matches | ||
| """ | ||
| spec: | ||
| group: ${NAME} | ||
| revision: 1 | ||
| lifecycleState: Active | ||
| """ |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document the foreign-owner conflict exception.
When the highest active, non-deleting COS has a different controller, the COD controller reports
OwnerConflictand does not create a higher revision. (raw.githubusercontent.com) This sentence currently says that upgrades create a revision whenever foreign-owned COSs exist. Qualify the statement so it distinguishes lower foreign-owned revisions from a foreign-controlled active head.