api: Directly indicate credentials revocation in cluster#4796
Open
api: Directly indicate credentials revocation in cluster#4796
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mbarnes 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 |
31693fb to
cd0badc
Compare
Collaborator
Author
|
/test e2e-parallel |
geoberle
reviewed
Apr 9, 2026
backend/pkg/controllers/operationcontrollers/operation_revoke_credentials.go
Outdated
Show resolved
Hide resolved
backend/pkg/controllers/operationcontrollers/operation_revoke_credentials.go
Show resolved
Hide resolved
added 2 commits
April 9, 2026 17:40
This adds service provider property "RevokeCredentialsOperationID". It works like "ActiveOperationID" but specifically tracks credential revocation operations. Revocation operations are per-cluster, and there can only be one in progress at a time. POST handlers already fetch the cluster document from Cosmos DB, so this saves an extra Cosmos DB query to determine whether a credential revocation is in progress. It also inches us closer to being able to drop the subscription lock.
cd0badc to
cb9bfad
Compare
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.
Loosely related to ARO-24384 - Move Cluster Service CRUD calls to ARO-HCP backend
What
This adds service provider property
RevokeCredentialsOperationID. It works likeActiveOperationID— frontend sets it when the operation starts, backend clears it when the operation finishes — but it specifically tracks credential revocation operations.Credential revocation operations are per-cluster, and there can only be one in progress at a time. They're submitted via POST request to an endpoint under the cluster resource. They don't change the provisioning state of the cluster — and thus don't block cluster updates — but they do block other POST requests until the revocation is complete.
Why
POST handlers already fetch the cluster document from Cosmos DB, so this will save an extra Cosmos DB query to determine whether a credential revocation is in progress.
It also inches us closer to being able to drop the subscription lock.
Testing
Updated existing unit tests.
Special notes for your reviewer
This is a two-step change. Once the backend changes in this PR reach production, the POST handlers in the frontend can start relying on the new field and stop querying Cosmos DB.
Database migration for existing clusters is not needed because of the transient nature of this new field.