Skip to content

fix(argo): replace a token that Argo CD refuses - #3121

Merged
dan-petty merged 2 commits into
mainfrom
claude/project-thread-6qv581
Nov 1, 2026
Merged

dan-petty merged 2 commits into
mainfrom
claude/project-thread-6qv581

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Requested by D · project thread

devops argo cd apps list, sync and status send their Argo CD API request through the new helper argocd_api_request. On HTTP 401 with a stored argocd.password, the helper mints a new token, stores it as argocd_token, and sends the request again one time. Before, an expired token stayed in the keyring until a person deleted it, and sync ended in a traceback.

With no stored password, or when Argo CD refuses the new token, the helper raises ArgoError. The message names argocd.token and devops k8s sync-secrets. Another HTTP status is an ArgoError with the status. The exit seam reports each error as one line. HTTP 403 does not mint a token, because it is an RBAC denial of a valid session.

Closes #2576

Change: openspec/changes/archive/2026-11-01-2576-a-token-that-argo-cd-refuses/


Generated by Claude Code

…s in one line

On HTTP 401, `devops argo cd apps list`, `sync` and `status` mint a new token with the stored admin password, store it, and send the request again one time. With no stored password, or when Argo CD refuses the new token, the command stops with one error line. Another HTTP status is one error line with the status. `sync` no longer ends in a traceback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PeiMDn96Fdt8EMfwmHTxXs

Copy link
Copy Markdown
Owner Author

Fail-to-pass: the Fail-to-Pass Check passed (job 125005470880). Its base replay also fails unchanged tests on the worktree HEAD guard, so it is weak evidence; I filed #3124 for that.

A direct run gives the real evidence. Before the change to src/, with only the new tests applied, uv run pytest tests/commands/test_argo.py tests/commands/test_argo_apps_status.py gave 7 failed, 49 passed. The 7 failures are the new sync, list and status tests of #2576. The helper tests in tests/argo/test_argo_credentials.py failed with ImportError (no argocd_api_request). With the fix, tests/argo, tests/commands/test_argo.py, tests/commands/test_argo_apps_status.py, tests/commands/test_argo_dry_run.py and tests/http/test_k8s_credentials.py gave 255 passed.


Generated by Claude Code

@dan-petty
dan-petty marked this pull request as ready for review November 1, 2026 23:02
@dan-petty
dan-petty merged commit b4955b4 into main Nov 1, 2026
20 checks passed
@dan-petty
dan-petty deleted the claude/project-thread-6qv581 branch November 1, 2026 23:02
dan-petty-release Bot added a commit that referenced this pull request Nov 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.38.0](v0.37.4...v0.38.0)
(2026-11-01)


### Features

* **review:** osv-scanner toolrun records its database digest
([#3120](#3120))
([5731fac](5731fac))
* **roadmap:** add gate tools to the runner, one shell policy
([#3111](#3111))
([7735d8b](7735d8b)),
closes [#3072](#3072)
* **roadmap:** give the step AGENTS.md and routed rules
([#3107](#3107))
([80a22eb](80a22eb)),
closes [#3097](#3097)
* **roadmap:** run the project hooks and scoped CI in the Job
([#3112](#3112))
([b7ab211](b7ab211)),
closes [#3043](#3043)


### Bug Fixes

* **ai:** send the per-call sampling of LLMClient.chat
([#3126](#3126))
([8207bdc](8207bdc))
* **argo:** replace a token that Argo CD refuses
([#3121](#3121))
([b4955b4](b4955b4))
* **devcontainer:** remove CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC
([#3125](#3125))
([295c32c](295c32c))
* **k8s:** set q8_0 KV cache on every Ollama tier
([#3101](#3101))
([aad0115](aad0115))
* **rag:** raise EmbeddingsError for an empty Ollama URL list
([#3118](#3118))
([111a031](111a031))
* **security:** refuse PYTEST_ADDOPTS and npm_config_logs_dir overrides
([#3119](#3119))
([9fe2af5](9fe2af5))


### Code Refactoring

* **security:** read legacy numeric hosts with getaddrinfo
([#3128](#3128))
([41779f9](41779f9))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(argo): a token that Argo CD refuses ends each argo API command in a traceback, and devops never mints a new one

2 participants