[codex] reconcile cloud runtime drift#305
Conversation
Co-Authored-By: Codex <noreply@openai.com>
|
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f121122eff
ℹ️ 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".
| raw_services = str(env.get("CLOUD_RUN_SERVICES") or env.get("CLOUD_RUN_SERVICE") or "").strip() | ||
| for chunk in raw_services.replace(";", ",").replace("\n", ",").split(","): | ||
| service_name = chunk.strip() | ||
| if service_name: | ||
| targets.append(RuntimeTarget(service_name=service_name)) |
There was a problem hiding this comment.
Do not reconcile services outside the resolved sync plan
When both SYNC_PLAN_JSON and a legacy CLOUD_RUN_SERVICE/CLOUD_RUN_SERVICES value are set, this falls through and appends the legacy services even though the workflow has already resolved the authoritative plan. In .github/workflows/sync-cloud-run-env.yml the new reconciler is invoked with SYNC_PLAN_JSON while those job-level legacy env vars are still present, so a stale fallback service that is not in the plan can still have traffic moved by --ensure-latest-traffic and its legacy scheduler jobs deleted.
Useful? React with 👍 / 👎.
| python3 scripts/reconcile_cloud_runtime.py \ | ||
| --platform=ibkr \ | ||
| --project="${GCP_PROJECT_ID}" \ | ||
| --region="${CLOUD_RUN_REGION}" \ | ||
| --ensure-latest-traffic |
There was a problem hiding this comment.
Verify plugin mounts before shifting traffic
When a service's traffic is pinned to an older revision—the drift this step is meant to repair—this command moves 100% traffic to the latest revision before the immediately following Verify strategy plugin mounts step has checked that the synced IBKR_STRATEGY_PLUGIN_MOUNTS_JSON is present, valid, and allowed. If that verification then fails, the workflow stops only after the potentially bad latest revision has already been made live, so the traffic reconciliation should run after the verifier succeeds.
Useful? React with 👍 / 👎.
Summary
Validation