diff --git a/.github/workflows/mantis-slack-desktop-smoke.yml b/.github/workflows/mantis-slack-desktop-smoke.yml index b35f6ff21609..67cae05c35cc 100644 --- a/.github/workflows/mantis-slack-desktop-smoke.yml +++ b/.github/workflows/mantis-slack-desktop-smoke.yml @@ -266,7 +266,7 @@ jobs: require_var OPENCLAW_QA_CONVEX_SECRET_CI require_var CRABBOX_COORDINATOR_TOKEN if [[ -z "${CRABBOX_LEASE_ID:-}" && "$CRABBOX_PROVIDER" == "aws" ]]; then - runner_ip="$(curl -fsS https://checkip.amazonaws.com | tr -d '[:space:]')" + runner_ip="$(curl -fsS --connect-timeout 5 --max-time 15 --retry 2 https://checkip.amazonaws.com | tr -d '[:space:]')" if [[ -z "$runner_ip" ]]; then echo "Could not resolve GitHub runner public IPv4 for AWS SSH ingress." >&2 exit 1 diff --git a/test/scripts/ci-workflow-guards.test.ts b/test/scripts/ci-workflow-guards.test.ts index e9c3954176f8..a825e71f7c84 100644 --- a/test/scripts/ci-workflow-guards.test.ts +++ b/test/scripts/ci-workflow-guards.test.ts @@ -2089,6 +2089,19 @@ describe("ci workflow guards", () => { ); }); + it("bounds Mantis Slack runner IP discovery", () => { + const workflow = parse( + readFileSync(".github/workflows/mantis-slack-desktop-smoke.yml", "utf8"), + ) as { jobs: { run_slack_desktop: { steps: WorkflowStep[] } } }; + const runStep = workflow.jobs.run_slack_desktop.steps.find( + (step) => step.name === "Run Slack desktop scenario", + ); + + expect(runStep?.run).toContain( + "curl -fsS --connect-timeout 5 --max-time 15 --retry 2 https://checkip.amazonaws.com", + ); + }); + it("fails Windows Testbox setup when Blacksmith phone-home is not accepted", () => { const workflow = readFileSync(".github/workflows/windows-blacksmith-testbox.yml", "utf8");