Skip to content

[codex] reconcile cloud runtime drift - #302

Merged
Pigbibi merged 1 commit into
mainfrom
codex/cloud-runtime-reconcile-20260707
Jul 6, 2026
Merged

[codex] reconcile cloud runtime drift#302
Pigbibi merged 1 commit into
mainfrom
codex/cloud-runtime-reconcile-20260707

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add Cloud Run traffic reconciler after env sync
  • delete only known LongBridge legacy schedulers across configured regions
  • cover latest-ready revision, commit label, and cross-region cleanup

Validation

  • python3 -m unittest tests/test_reconcile_cloud_runtime.py -v
  • bash tests/test_sync_cloud_run_env_workflow.sh
  • python3 YAML parse for .github/workflows/sync-cloud-run-env.yml
  • git diff --check

Co-Authored-By: Codex <noreply@openai.com>
@cursor

cursor Bot commented Jul 6, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@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: e97c542775

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

SYNC_PLAN_JSON: ${{ steps.strategy_requirements.outputs.sync_plan_json }}
run: |
set -euo pipefail
python3 scripts/reconcile_cloud_runtime.py --platform longbridge --ensure-latest-traffic

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Pass expected commit only when deploy wait is enabled

This new reconciliation step always lets reconcile_cloud_runtime.py default --expected-commit to GITHUB_SHA, so supported env-only runs fail after syncing env when no image for the current commit was deployed. For example, the hk-verify dispatch path sets CLOUD_RUN_ENV_SYNC_WAIT_FOR_COMMIT=false when deploy_image is false, but this step still checks the latest ready revision’s commit-sha against the current workflow SHA and exits before scheduler sync; pass an empty expected commit or skip this step when the deploy/wait is intentionally disabled.

Useful? React with 👍 / 👎.

Comment on lines +98 to +102
for entry in entries:
if isinstance(entry, Mapping):
target = _target_from_entry(entry)
if target:
targets.append(target)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Limit reconciliation to the current service

load_targets now appends every target from SYNC_PLAN_JSON, but the surrounding workflow deploys, waits for, syncs env for, schedules, and prunes only CLOUD_RUN_SERVICE. In per-service configurations where CLOUD_RUN_SERVICE_TARGETS_JSON contains multiple services, a job for one service will also check and potentially shift traffic for the other services (or fail their commit check) even though they were not updated by this run; filter the reconciler to the current service like the existing verification step does.

Useful? React with 👍 / 👎.

@Pigbibi
Pigbibi merged commit b000edd into main Jul 6, 2026
2 checks passed
@Pigbibi
Pigbibi deleted the codex/cloud-runtime-reconcile-20260707 branch July 6, 2026 22:47
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