Repository navigation
fix(deploy): centralize public build release contract - #9845
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74880d4868
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| service: ${{ steps.contract.outputs.service }} | ||
| region: ${{ steps.contract.outputs.region }} | ||
| image: ${{ steps.candidate.outputs.image }} | ||
| no_traffic: true |
There was a problem hiding this comment.
Overwrite secrets from the contract
When a runtime secret is removed from config/public-build-contract.json (or for a target like app where the contract declares none), this deploy still leaves the old Cloud Run secret bindings in place because google-github-actions/deploy-cloudrun defaults secrets_update_strategy to merge and ignores an empty secrets input. That makes the new deployment contract non-authoritative for exactly the cleanup path it is meant to centralize; stale secrets remain available to the service until manually removed. Pass an overwrite strategy (and {} for empty secret maps) so Cloud Run matches the checked-in contract.
Useful? React with 👍 / 👎.
…9845) ## Summary - centralize all four public-browser deployments in one checked-in composite action - extend the public-build contract with each target's Cloud Run region, build context, resource flags, and runtime secret references - run a JIT control-plane preflight before image builds: enabled Secret Manager versions plus existing Cloud Run binding type/reference checks - remove the scheduled reconciliation job; keep reviewed-source validation on PRs and deployments - prevent direct per-workflow build/deploy/promotion bypasses, and teach the deployment-lock policy to recognize the shared writer ## Failure class and durable guard The four browser workflows independently owned deploy settings, while the existing build contract only covered browser inputs. That allowed missing secret versions and literal-versus-secret binding conflicts to reach no-traffic deployment and produced divergent behavior by target. The deployment shape now has one authoritative contract and reusable path: `reviewed contract → live preflight → immutable image → no-traffic candidate → browser acceptance → promotion` Static checks reject bypasses; the JIT preflight rejects known runtime-binding failures before build. A failed candidate never changes serving traffic. Relates to BasedHardware#9820. ## Verification - `python3 .github/scripts/check_public_build_contract.py` - `python3 .github/scripts/test_check_public_build_contract.py` — 14 passed - `python3 .github/scripts/check-deployment-concurrency.py --self-test` - `python3 .github/scripts/check-deployment-concurrency.py` - `actionlint -shellcheck='' .github/workflows/gcp_{admin,app,frontend,personas}.yml .github/workflows/public-build-config-preflight.yml` - `make preflight` — 12 selected checks passed No live deployment was run; that would create Cloud Run revisions and use production deployment credentials. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/BasedHardware/omi/pull/9845?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. -->
Summary
Failure class and durable guard
The four browser workflows independently owned deploy settings, while the existing build contract only covered browser inputs. That allowed missing secret versions and literal-versus-secret binding conflicts to reach no-traffic deployment and produced divergent behavior by target. The deployment shape now has one authoritative contract and reusable path:
reviewed contract → live preflight → immutable image → no-traffic candidate → browser acceptance → promotionStatic checks reject bypasses; the JIT preflight rejects known runtime-binding failures before build. A failed candidate never changes serving traffic.
Relates to #9820.
Verification
python3 .github/scripts/check_public_build_contract.pypython3 .github/scripts/test_check_public_build_contract.py— 14 passedpython3 .github/scripts/check-deployment-concurrency.py --self-testpython3 .github/scripts/check-deployment-concurrency.pyactionlint -shellcheck='' .github/workflows/gcp_{admin,app,frontend,personas}.yml .github/workflows/public-build-config-preflight.ymlmake preflight— 12 selected checks passedNo live deployment was run; that would create Cloud Run revisions and use production deployment credentials.