Skip to content

[codex] Guard backend runtime env drift - #8623

Merged
Git-on-my-level merged 1 commit into
mainfrom
codex/backend-runtime-env-drift
Jun 29, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
codex/backend-runtime-env-drift

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Jun 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • extend the backend runtime env validator to compare manifest Cloud Run env expectations against checked-in deploy workflow env_vars blocks
  • add lint CI coverage for the runtime env manifest, backend-listen Helm values, and backend deploy workflows
  • run live Cloud Run runtime env validation after deploy secret sync, and move dev secret sync after all Cloud Run revisions are deployed

Issue

Refs #8515

Validation

  • python3 backend/scripts/validate-backend-runtime-env.py --env dev --check-workflows
  • python3 backend/scripts/validate-backend-runtime-env.py --env prod
  • python3 -m pytest backend/tests/unit/test_backend_runtime_env_validator.py -q
  • black --check --line-length 120 --skip-string-normalization backend/scripts/validate-backend-runtime-env.py backend/tests/unit/test_backend_runtime_env_validator.py
  • actionlint -shellcheck "" .github/workflows/gcp_backend.yml .github/workflows/gcp_backend_auto_dev.yml .github/workflows/lint.yml
  • backend/test-preflight.sh passed with optional dependency/service warnings

Notes

  • Full backend/test.sh was stopped because the local runner used system Python 3.9.6 while backend/.python-version requires 3.11.15; unrelated collection failures hit Python 3.10+ type syntax and missing optional packages.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94a40ebc89

ℹ️ 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".

Comment on lines +142 to +146
- name: Sync Cloud Run secrets from backend-secrets chart
run: |
curl -sL https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /usr/local/bin/yq
chmod +x /usr/local/bin/yq
bash backend/scripts/sync_cloudrun_secrets_from_chart.sh dev backend backend-sync backend-integration

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Sync Cloud Run secrets before dev deploys

When a push adds a new backend-secrets key that the new image reads, this dev workflow now deploys backend-sync and backend-integration before the chart-to-Cloud Run sync runs; for services routing latest revisions, those new revisions can serve without the newly declared secret until this step finally adds it. The old ordering synced before those revisions, so keep a pre-deploy sync (or sync both before and after) to avoid dev Cloud Run requests/jobs reading None during the rollout.

Useful? React with 👍 / 👎.

@Git-on-my-level
Git-on-my-level merged commit de925ff into main Jun 29, 2026
4 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/backend-runtime-env-drift branch June 29, 2026 22:16
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