Repository navigation
✨ ClusterObjectDeployment - List Only Owned Revisions #3091
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
Closed
Closed
Changes from all commits
Commits
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
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
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.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Script executed:
Repository: operator-framework/operator-controller
Length of output: 5679
Script executed:
Repository: operator-framework/operator-controller
Length of output: 42060
Script executed:
Repository: operator-framework/operator-controller
Length of output: 4661
Prevent foreign revisions from blocking revision creation.
If an unowned or foreign-owned
ClusterObjectSetalready has the next name,listRevisionsexcludes it,nextRevisionNumberselects the occupied revision, andcreateRevisionreturnsAlreadyExistson each retry. The API enforces the name-to-group/revision relationship, but it does not make the foreign object invalid or provide a separate uniqueness check that lets this create succeed. Keep foreign sets out of rollout and pruning, but account for occupied names when allocating a new revision.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.
Leaving this here for the moment to get a clarification - what should the behavior be in this case?
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.
@dtfranz I recommend leaving the foreign
ClusterObjectSetunchanged and skipping the occupied revision name. Keep the ownership filter for rollout, status, and pruning.For example, if deployment
exampleowns revision 1 and a foreign object occupiesexample-2:example-2.example-3.ClusterObjectSetMaxRevision.An
AlreadyExistsresponse can also result from a successful earlier create that the cache has not observed yet. That case needs a separate check so a retry does not create an unnecessary revision.The supplied code currently retries the same occupied name.
nextRevisionNumbersees only owned revisions, andcreateRevisionreturnsAlreadyExistswithout changing the next allocation.Skipping is my recommendation, not an established requirement in the PR description. If the intended policy is instead to stop on a name collision, that is a valid design choice. In that case, report the conflicting name clearly and document that the user must remove the collision before rollout can continue. The behavior to avoid is an unexplained, indefinite “waiting for new revision to be created” state.
Learnings used
You are interacting with an AI system.
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.
[P1] Preserve whole-group revision allocation
I reproduced this on the current head. With an archived ownerless or foreign-owned
example-1in groupexampleand no owned revisions, the new filter excludes it from the list passed tonextRevisionNumber. Every reconciliation then attemptsexample-1again and returnsAlreadyExists. A foreign set occupying the next revision name similarly blocks an upgrade.docs/designs/object-controller/clusterobjectdeployment.mdexplicitly requires allocation above the maximum group revision, including archived and foreign members. Use the whole group for revision-number allocation, while retaining ownership filtering for rollout, status, deadlines, and pruning.The first-name and next-name regression cases pass on base
a4d3af99and fail on head01548d9b, returning the sameAlreadyExistserror over three consecutive reconciliations.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.