Repository navigation
fix(k8s): hermetically resolve cluster secrets fixture - #6959
Merged
Merged
Conversation
In `tests/k8s/test_cluster_secrets_file.py`, `test_resolve_fixture_secrets_file_variants` tests `_resolve_fixture_secrets_file()` by asserting that it equals `cs._FIXTURE_SECRETS_FILE`. When `devops_cli` is installed in a container image, `_FIXTURE_SECRETS_FILE` does not exist on disk, causing the test to fail with an `AssertionError` in `Service Image Tests (shard 1 of 6)`. Use monkeypatch to test primary resolution with an existing file in `tmp_path`, and permit `load_cluster_secrets_table()` to fall back to the fixture when `k8s_dir` lacks a local `cluster-secrets.toml`. Closes #6957 Change: `openspec/changes/archive/2026-11-24-6957-hermetic-cluster-secrets-fixture/`
dan-petty
marked this pull request as ready for review
November 24, 2026 03:56
dan-petty-release Bot
added a commit
that referenced
this pull request
Nov 24, 2026
🤖 I have created a release *beep* *boop* --- ## [0.206.2](v0.206.1...v0.206.2) (2026-11-24) ### Bug Fixes * **k8s:** hermetically resolve cluster secrets fixture ([#6959](#6959)) ([c5f5bfd](c5f5bfd)) ### Code Refactoring * **k8s:** take helper pod and harbor task images from manifests ([#6958](#6958)) ([f96dc6b](f96dc6b)) --- 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>
2 tasks
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.
In
tests/k8s/test_cluster_secrets_file.py,test_resolve_fixture_secrets_file_variantstests_resolve_fixture_secrets_file()by assertingassert cs._resolve_fixture_secrets_file() == cs._FIXTURE_SECRETS_FILE. Whendevops_cliruns from site-packages (such as in/app/.venvinside the Service test image),_FIXTURE_SECRETS_FILEdoes not exist on disk, so_resolve_fixture_secrets_file()falls back to_FALLBACK_FIXTURE_SECRETS_FILE(tests/fixtures/cluster-secrets.toml). This causestest_resolve_fixture_secrets_file_variantsto fail withAssertionError, breakingService Image Tests (shard 1 of 6)in CI. Additionally,src/devops_cli/k8s/cluster_secrets.pyrestricts fallback fixture loading withif env_file is None and k8s_dir is None:, preventing fallback whenk8s_diris passed without a local cluster-secrets file.Closes #6957
Change:
openspec/changes/archive/2026-11-24-6957-hermetic-cluster-secrets-fixture/