Skip to content

Reconcile LongBridge target schedulers#339

Merged
Pigbibi merged 6 commits into
mainfrom
codex/reconcile-target-schedulers
Jul 22, 2026
Merged

Reconcile LongBridge target schedulers#339
Pigbibi merged 6 commits into
mainfrom
codex/reconcile-target-schedulers

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • honor the current environment's runtime enabled state for its Cloud Run service
  • replace the shared monitor dispatcher scheduler with direct per-service prechecks
  • pause main and precheck jobs for disabled targets
  • preserve canonical precheck jobs during legacy reconciliation

Verification

  • focused plan/reconcile tests: 8 passed
  • workflow shell contract
  • full ruff, uv lock, actionlint, YAML, and diff checks

Existing test debt

The unrestricted local suite has failures already present on origin/main; all tests covering this change pass.

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

@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: 520893693b

ℹ️ 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 thread .github/workflows/sync-cloud-run-env.yml Outdated
Comment thread .github/workflows/sync-cloud-run-env.yml
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown

🤖 Codex PR Review

Merge allowed: 2 finding(s) reported but none are blocking

ℹ️ Other Findings

1. 🟡 [MEDIUM] Logic in scripts/reconcile_cloud_runtime.py

_legacy_jobs_for_target() no longer returns the canonical ${service}-probe-scheduler and ${service}-precheck-scheduler names. The reconcile workflow still runs --delete-legacy-jobs, and the removed test expectations show those exact jobs already exist in multiple legacy regions today. After this change, any stale copies of the canonical probe/precheck jobs outside the active region will never be deleted and will keep firing, causing duplicate probe or dry-run executions for the same target. (line 280)

Suggestion: Keep deleting the canonical ${service}-probe-scheduler and ${service}-precheck-scheduler in legacy regions, but exempt only the current target region instead of dropping those names from legacy cleanup entirely.

2. 🟡 [MEDIUM] Logic in .github/workflows/sync-cloud-run-env.yml

The new cleanup verifier resolves each replacement job's location from per-target fields like scheduler_location and scheduler.location, but the sync job still creates and updates the probe/precheck jobs only in the global CLOUD_SCHEDULER_LOCATION/CLOUD_RUN_REGION location. For any target that uses a target-specific scheduler location, the verifier will look in a different region than the creator, decide the replacements are missing, and skip deleting the shared dispatcher. That leaves both the shared dispatcher and the new per-service jobs active, producing duplicate prechecks. (line 1292)

Suggestion: Resolve scheduler location once with the same precedence in both places. Either teach the sync step to create/update jobs in the target-specific scheduler location, or make the cleanup verifier use the same global-only location if per-target locations are not actually supported.


Review by Codex PR Review bot • PR

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

@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: 44980d5ece

ℹ️ 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 thread .github/workflows/sync-cloud-run-env.yml Outdated
Co-Authored-By: Codex <noreply@openai.com>

@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: 5885c9b5e3

ℹ️ 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 thread .github/workflows/sync-cloud-run-env.yml
Comment thread .github/workflows/sync-cloud-run-env.yml
@Pigbibi
Pigbibi enabled auto-merge (squash) July 22, 2026 03:12
Co-Authored-By: Codex <noreply@openai.com>

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

ℹ️ 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 thread .github/workflows/sync-cloud-run-env.yml Outdated
Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi

Pigbibi commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

已在 67a3713 处理最新审查:\n- 不再在单个/部分 sync 中删除 MONITOR_DISPATCH_TARGETS_JSON 兼容变量;旧 dispatcher 仍只在 full configured rollout 且全部替代 job 已存在后删除,消除切换空窗。\n- replacement verifier 增加 CLOUD_SCHEDULER_LOCATIONCLOUD_RUN_REGION fallback。\n- 新增 workflow 回归断言;focused pytest、shell contract、actionlint、ruff、diff check 均通过。

Co-Authored-By: Codex <noreply@openai.com>
@Pigbibi
Pigbibi merged commit a2d517c into main Jul 22, 2026
5 checks passed
@Pigbibi
Pigbibi deleted the codex/reconcile-target-schedulers branch July 22, 2026 03:35
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