Skip to content

Commit 4dfc362

Browse files
Pigbibicodex
andcommitted
fix: prune legacy backup execution scheduler
Co-Authored-By: Codex <noreply@openai.com>
1 parent f6114cc commit 4dfc362

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/sync-cloud-run-env.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,6 +1147,11 @@ jobs:
11471147
"${CLOUD_RUN_SERVICE%-service}-precheck-scheduler"
11481148
)
11491149
fi
1150+
legacy_scope="${CLOUD_RUN_SERVICE#longbridge-quant-}"
1151+
legacy_scope="${legacy_scope%-service}"
1152+
if [ -n "${legacy_scope}" ] && [ "${legacy_scope}" != "${CLOUD_RUN_SERVICE}" ]; then
1153+
legacy_jobs+=("lb-${legacy_scope}-backup-execution")
1154+
fi
11501155
for legacy_job in "${legacy_jobs[@]}"; do
11511156
if gcloud scheduler jobs describe "${legacy_job}" \
11521157
--project="${GCP_PROJECT_ID}" \

tests/test_sync_cloud_run_env_workflow.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ grep -Fq 'gcloud scheduler jobs update http "${job_name}"' "$workflow_file"
223223
grep -Fq 'gcloud scheduler jobs create http "${job_name}"' "$workflow_file"
224224
grep -Fq 'monitor_job_name="longbridge-monitor-dispatcher-scheduler"' "$workflow_file"
225225
grep -Fq 'monitor_uri="${service_url}/monitor-dispatch"' "$workflow_file"
226+
grep -Fq 'legacy_jobs+=("lb-${legacy_scope}-backup-execution")' "$workflow_file"
226227
grep -Fq 'gcloud scheduler jobs delete "${legacy_job}"' "$workflow_file"
227228
grep -Fq -- '--schedule="${desired_schedule}"' "$workflow_file"
228229
grep -Fq -- '--time-zone="${market_timezone}"' "$workflow_file"

0 commit comments

Comments
 (0)