You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(k8s): the grafana token mint creates the new token before it revokes the old ones, so a failed create leaves a working token #2208
src/devops_cli/k8s/credentials.py mints a Grafana service-account token by first revoking every token of the devops-cli service account and then creating the new one. If the create fails (a network error, a 5xx, a refused request), the account is left with no token, and every caller that used a stored token loses access until a later sync succeeds. Found by #2156 (2026-10-25).
What should happen
The mint creates the new token first, stores it, and only then revokes the other tokens of the account. A failed create changes nothing; a failed revoke is reported with its cause and leaves the old token, which a later sync revokes.
Acceptance criteria
A test on the HTTP fake shows that a failed create sends no revoke and keeps the stored token.
A test shows the order create, store, revoke on success.
Activity
dan-petty commentedon Oct 25, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate describes a bug in the Grafana token minting process that leads to access loss during failures.This issue affects access control and reliability of the devops-cli tool, but is not critical for system stability or security.The fix improves reliability of token management, affecting all users of the devops-cli tool who interact with Grafana.The change only requires reordering operations in one function and adding tests, which is a small code modification.Both items relate to Kubernetes service account tokens, but the candidate focuses on the order of token creation and revocation while item 1652 addresses mounting unused tokens.fix(k8s): the argo cd and grafana credential sync revokes and mints a…