Skip to content

ci: retry smoke tests to absorb Cloudflare edge propagation flakes - #132

Merged
alukach merged 2 commits into
mainfrom
worktree-smoke-flake
Jul 27, 2026
Merged

ci: retry smoke tests to absorb Cloudflare edge propagation flakes#132
alukach merged 2 commits into
mainfrom
worktree-smoke-flake

Conversation

@alukach

@alukach alukach commented Jul 27, 2026

Copy link
Copy Markdown
Member

What I'm changing

The smoke-test job fails intermittently on PR previews (e.g. run 30306016560 attempt 1, which passed unchanged on attempt 2). The failures are not ours: the 404 bodies are Cloudflare's <title>Page not found</title> workers.dev placeholder, and they interleave with passing requests to the same host in the same second.

A freshly deployed Worker propagates per edge machine, not per hostname. For a few seconds after wrangler deploy, some requests to multistore-proxy-pr-N.<subdomain>.workers.dev land on a machine that does not have the script yet and get the placeholder 404; neighbouring requests succeed. In that run test_assume_role_returns_credentials passed at 21:16:13.3 while the fixture behind test_assume_no_access_role_returns_credentials 404'd at 21:16:13.4.

The existing Wait for deployment to be live gate (3 consecutive successful probes) cannot close this: it probes one URL and its probes may all be answered by machines that are already warm, so it reports live while others still 404.

How I did it

  • .github/workflows/deploy.ymlRun smoke tests now installs pytest-rerunfailures and runs with --reruns 4 --reruns-delay 5, giving ~20s of retry coverage for the propagation window. Comment above the step records why the deploy-side probe loop cannot solve this instead.

Retries are scoped to the smoke job only; tests/integration/ in ci.yml is unchanged. A genuine regression fails all five attempts, so this hides nothing — it costs ~20s on a real failure.

Test plan

  • deploy.yml parses (yaml.safe_load)
  • Confirmed pytest-rerunfailures retries fixture setup errors, not just test-body failures — the smoke suite's 404s surface as setup errors on the assume_no_access fixture, so this was the load-bearing assumption. Verified with a throwaway suite whose fixture raises on its first two invocations: 1 passed, 2 rerun.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

🚀 Latest commit deployed to https://multistore-proxy-pr-132.development-seed.workers.dev

  • Date: 2026-07-27T21:47:16Z
  • Commit: 0627727

@alukach
alukach marked this pull request as ready for review July 27, 2026 21:47
@alukach
alukach merged commit 5bc6498 into main Jul 27, 2026
12 of 13 checks passed
@alukach
alukach deleted the worktree-smoke-flake branch July 27, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant