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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env:
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 20
timeout-minutes: 35
permissions:
contents: read
id-token: write
Expand Down
29 changes: 19 additions & 10 deletions scripts/wait_for_ib_gateway_ready.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ check_api_handshake() {
import os
import socket
import struct
import sys
import time


Expand All @@ -51,16 +52,24 @@ except ImportError:
if IB is not None:
ib = IB()
try:
ib.connect(host, port, clientId=client_id, timeout=timeout_seconds)
accounts = ib.managedAccounts()
if not accounts:
raise RuntimeError("IB API healthcheck did not receive managed accounts")
print(
"IB API ib_insync healthcheck ready: "
f"server_version={ib.client.serverVersion()} "
f"client_id={client_id} "
f"accounts={','.join(accounts)}"
)
try:
ib.connect(host, port, clientId=client_id, timeout=timeout_seconds)
accounts = ib.managedAccounts()
if not accounts:
raise RuntimeError("IB API healthcheck did not receive managed accounts")
print(
"IB API ib_insync healthcheck ready: "
f"server_version={ib.client.serverVersion()} "
f"client_id={client_id} "
f"accounts={','.join(accounts)}"
)
except Exception as exc:
print(
"IB API ib_insync healthcheck not ready: "
f"{type(exc).__name__}: {exc}",
file=sys.stderr,
)
raise SystemExit(1)
finally:
if ib.isConnected():
ib.disconnect()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_workflow_shared_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ grep -Fq 'GCP_PROJECT_ID: interactivebrokersquant' "$workflow_file"
grep -Fq 'providers/github-ibkr-gateway-main' "$workflow_file"
grep -Fq 'ibkr-gateway-deploy@interactivebrokersquant.iam.gserviceaccount.com' "$workflow_file"
grep -Fq 'id-token: write' "$workflow_file"
grep -Fq 'timeout-minutes: 20' "$workflow_file"
grep -Fq 'timeout-minutes: 35' "$workflow_file"
grep -Fq 'sync_github_secrets_to_secret_manager:' "$workflow_file"
grep -Fq 'deploy_mode:' "$workflow_file"
grep -Fq 'workload_identity_provider: ${{ env.GCP_WORKLOAD_IDENTITY_PROVIDER }}' "$workflow_file"
Expand Down