Skip to content

Fix staging cache test environment - #3795

Merged
anth-volk merged 1 commit into
masterfrom
agent/fix-staging-cache-test-env
Aug 19, 2026
Merged

Fix staging cache test environment#3795
anth-volk merged 1 commit into
masterfrom
agent/fix-staging-cache-test-env

Conversation

@anth-volk

Copy link
Copy Markdown
Collaborator

Fixes #3794

Summary

  • run the post-merge predeployment test suite against the local Redis service that the staging job already starts
  • clear inherited managed-cache Secret Manager references only for that test step
  • require an explicit test namespace and service name
  • add regression coverage for the complete cache environment expected by the workflow

Root cause

The staging App Engine job defined managed-cache Secret Manager references at job scope. Its earlier make test step inherited those references without selecting a cache mode, so the cache loader selected disabled mode and rejected the inconsistent secret configuration during collection. The workflow stopped before image construction or deployment.

Impact

The correction affects only the predeployment test process. Actual App Engine and Cloud Run revisions continue to receive deployed-mode managed Redis configuration. Cloud SQL, API routes, compute selection, and the dormant v2 database remain unchanged.

Verification

  • uv run pytest tests/unit/test_cloud_run_deploy_scripts.py -q — 94 passed
  • .venv/bin/python3 -m pytest tests/unit/test_cloud_run_deploy_scripts.py tests/unit/runtime_cache/test_settings.py -q — 111 passed
  • corrected release environment with the full make test scope and --collect-only — 1,191 tests collected successfully
  • python3 scripts/run_quality_guards.py — passed
  • python3 scripts/export_migration_contracts.py — generated artifacts unchanged
  • uv run ruff format . — unchanged
  • uv run ruff check tests/unit/test_cloud_run_deploy_scripts.py — passed

@anth-volk
anth-volk marked this pull request as ready for review August 19, 2026 18:21
@anth-volk
anth-volk merged commit 2d13e06 into master Aug 19, 2026
10 checks passed
@anth-volk
anth-volk deleted the agent/fix-staging-cache-test-env branch August 19, 2026 18:22
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.11%. Comparing base (a0190f2) to head (e3384bd).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3795   +/-   ##
=======================================
  Coverage   85.11%   85.11%           
=======================================
  Files         109      109           
  Lines        6290     6290           
  Branches     1093     1093           
=======================================
  Hits         5354     5354           
  Misses        630      630           
  Partials      306      306           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 staging predeployment tests inheriting managed-cache secrets

1 participant