Skip to content

fix(deploy): migrate dev public config bindings - #9693

Merged
Git-on-my-level merged 1 commit into
mainfrom
fix/dev-public-config-binding-migration
Jul 14, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
fix/dev-public-config-binding-migration

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • migrate the legacy development Cloud Run GOOGLE_CLIENT_ID Secret Manager binding before the normal candidate deploy applies the public literal
  • preserve serving traffic during the type transition with --no-traffic
  • add a tested development-only preflight migration contract, including idempotency and multi-container fail-closed behavior

Root cause

GOOGLE_CLIENT_ID was intentionally reclassified as public configuration in #9670, but the existing dev backend and backend-sync services still hold Secret Manager bindings. Cloud Run rejects changing that binding type in the same gcloud run deploy command as --update-env-vars.

The dev auto-deploy now invokes the existing Cloud Run preflight helper before the usual candidate deployment. It refuses non-dev projects, detects only the exact legacy binding, and creates a no-traffic transition revision before the normal no-traffic candidate deployment and validation/traffic-shift gates. No production workflow or service is changed.

Verification

  • RED: the migration contract test failed before the implementation existed
  • selected Cloud Run deployment-contract suite: 121 passed
  • YAML parse of .github/workflows/gcp_backend_auto_dev.yml — passed
  • git diff --check — passed
  • gcloud run services update --help verified --no-traffic; read-only dev inspection confirmed both affected services currently bind GOOGLE_CLIENT_ID from Secret Manager

Scope

Development-only migration. No production deployment, configuration write, traffic shift, or secret deletion is included.

Review in cubic

@Git-on-my-level
Git-on-my-level merged commit d42fa69 into main Jul 14, 2026
22 of 25 checks passed
@Git-on-my-level
Git-on-my-level deleted the fix/dev-public-config-binding-migration branch July 14, 2026 07:13
Git-on-my-level added a commit that referenced this pull request Jul 14, 2026
## Summary
- complete the development-only Cloud Run migration of public
configuration that remains legacy Secret Manager-bound
- derive eligible public names from the checked-in dev runtime manifest
rather than a hand-maintained one-variable list
- cover `backend`, `backend-sync`, `backend-sync-backfill`, and
`backend-integration` before their canonical no-traffic redeploys

## Root cause
PR #9693 safely migrated `GOOGLE_CLIENT_ID` for two services, but dev
rollout `29313849625` then exposed the next legacy type mismatch:
`STT_PRERECORDED_MODEL` remained Secret Manager-bound while the runtime
manifest declares it public. Read-only inventory showed remaining type
transitions across four dev services.

This change removes only bindings where the environment variable is
declared public for that exact dev service **and** the legacy secret
reference is self-referential. The helper rejects non-dev/project
targets and multi-container service shapes, then uses `gcloud run
services update --no-traffic` before the normal candidate deploy.

## Verification
- RED: regression test required both public bindings to be removed
together before implementation
- selected Cloud Run deployment-contract suite: **121 passed**
- focused preflight + deployment-contract tests: **14 passed**
- `actionlint .github/workflows/gcp_backend_auto_dev.yml` — passed
- YAML parse using backend virtualenv — passed
- `git diff --check` — passed
- independent review — approved

## Scope
Development-only workflow and helper. No production workflow, Cloud Run
service, secret deletion, or traffic change is included.

<!-- This is an auto-generated description by cubic. -->
<a
href="https://cubic.dev/pr/BasedHardware/omi/pull/9694?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>
<!-- End of auto-generated description by cubic. -->
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.

1 participant