Frontend: Handle metadata CAS in Secret Manager UI
Summary
Update the existing Secret Manager UI to use the new metadata versioning by capturing metadata_version
from queries and passing metadata_cas
to update mutations. This prevents concurrent update conflicts by ensuring users are working with the latest version.
Prerequisites: This implementation requires the backend CAS support to be completed first.
Proposal
Update the existing secret management components to capture metadata versions and pass CAS parameters to update mutations.
Key Changes:
- Update GraphQL queries to fetch
metadata_version
- Update GraphQL update mutation to pass required
metadata_cas
parameter - Handle CAS error responses with user-friendly messages
Implementation Table
Group | Issue Link |
---|---|
backend | Backend: Secret Rotation API Implementation #537059 |
frontend |
|
Technical Implementation Details
-
Update the following queries to include metadataVersion
field:get_project_secrets.query.graphql
get_secret_details.query.graphql
-
Pass the metadataCas
parameter to the following mutations:update_secret.mutation.graphql
-
Handle CAS error responses in the UI - Display user-friendly error messages when version conflicts occur
- Provide guidance for users to refresh and retry their updates
Edited by 🤖 GitLab Bot 🤖