Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/sync-cloud-run-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,11 @@ jobs:
fi
legacy_candidates+=("${cloud_run_service}-probe-scheduler")
legacy_candidates+=("${cloud_run_service}-precheck-scheduler")
account_suffix="${cloud_run_service#interactive-brokers-quant-live-}"
account_suffix="${account_suffix%-service}"
if [[ "${account_suffix}" == u* ]]; then
legacy_candidates+=("ibkr-${account_suffix}-backup-execution")
Comment on lines +1162 to +1165

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 Handle interactive-brokers-live- backup jobs*

When the sync plan contains the current per-account live service names already used in this repo, such as interactive-brokers-live-u1599-tqqq-service in tests/test_cloud_run_runtime_guard.py, this substitution does not strip the prefix, leaving account_suffix as interactive-brokers-live-u1599-tqqq; the u* guard is then false and the intended ibkr-u1599-tqqq-backup-execution candidate is never deleted. In those live-u* environments the legacy /run scheduler remains and can continue the duplicate close-time execution this change is meant to remove, so the derivation needs to cover the interactive-brokers-live- naming scheme as well.

Useful? React with 👍 / 👎.

fi
for legacy_job in "${legacy_candidates[@]}"; do
if gcloud scheduler jobs describe "${legacy_job}" \
--project="${GCP_PROJECT_ID}" \
Expand Down
1 change: 1 addition & 0 deletions tests/test_sync_cloud_run_env_workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ grep -Fq 'monitor_uri="${monitor_dispatch_base_url}/monitor-dispatch"' "$workflo
grep -Fq -- '--schedule="*/5 * * * *"' "$workflow_file"
grep -Fq 'legacy_candidates+=("${cloud_run_service%-service}-probe-scheduler")' "$workflow_file"
grep -Fq 'legacy_candidates+=("${cloud_run_service%-service}-precheck-scheduler")' "$workflow_file"
grep -Fq 'legacy_candidates+=("ibkr-${account_suffix}-backup-execution")' "$workflow_file"
grep -Fq 'gcloud scheduler jobs delete "${legacy_job}"' "$workflow_file"

grep -Fq '"CRISIS_ALERT_GOOGLE_VOICE_TO"' "$workflow_file"
Expand Down
Loading