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): hermetic cluster secrets fixture resolution in test suite #6957
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it must
In tests/k8s/test_cluster_secrets_file.py, test_resolve_fixture_secrets_file_variants tests _resolve_fixture_secrets_file() by asserting assert cs._resolve_fixture_secrets_file() == cs._FIXTURE_SECRETS_FILE. When devops_cli is installed as a package inside the Service image container (/app/.venv), cs._FIXTURE_SECRETS_FILE does not exist on disk, so _resolve_fixture_secrets_file() falls back to _FALLBACK_FIXTURE_SECRETS_FILE (tests/fixtures/cluster-secrets.toml). This causes test_resolve_fixture_secrets_file_variants to fail with AssertionError: assert PosixPath('tests/fixtures/cluster-secrets.toml') == PosixPath('/app/.venv/lib/python3.14/tests/fixtures/cluster-secrets.toml'), breaking Service Image Tests (shard 1 of 6) across all pull request checks.
Additionally, src/devops_cli/k8s/cluster_secrets.py uses legacy syntax except ConfigurationError, OSError: in load_cluster_secrets_table(), and restricts fallback fixture loading with if env_file is None and k8s_dir is None:, preventing fixture resolution when k8s_dir is passed without a local cluster-secrets file.
Expected vs Actual Behavior
Expected: test_resolve_fixture_secrets_file_variants isolates the primary path using monkeypatch to set an existing dummy fixture, verifying primary, fallback, and absent cases hermetically regardless of whether the test runs in an editable or installed environment. load_cluster_secrets_table() catches both (ConfigurationError, OSError) and falls back to the fixture whenever env_file is None.
Actual: test_resolve_fixture_secrets_file_variants fails in Service Image Tests, breaking CI.
priority/p1-highPriority P1: high-impact work for the next planned milestonescope/k8sKubernetes commands, Helm charts, pods, services, and policiestype/bugType bug: the code does not do what it must
Activity
fix(k8s): Hermetically resolve cluster secrets fixture in test suite
devops-cli-service commentedon Nov 24, 2026
Released in v0.206.2: https://github.com/dan-petty/devops-cli/releases/tag/v0.206.2
devops-cli-service commentedon Nov 24, 2026
Live since 2026-11-24 13:45 UTC