Skip to content

fix(smoke): retry a failed attempt again (0.23.1) - #25

Merged
vijayakrishnans merged 1 commit into
mainfrom
claude/smoke-retry-errexit
Nov 16, 2026
Merged

vijayakrishnans merged 1 commit into
mainfrom
claude/smoke-retry-errexit

Conversation

@vijayakrishnans

Copy link
Copy Markdown
Contributor

Bug: 0.23.0 turned the smoke retry loop into smoke; rc=$?. orun runs a step under bash -e, so the first failing attempt ends the step on the spot. There's no "attempt 1/10 failed" line, no backoff and no second attempt. Since #24 every Worker smoke is a single try.

Seen: vijayakrishnans/multi-tenant-saas-2, 06-console, run 43861505573 attempt 1. On both stage and prod the console deployed, then smoke failed 0.3s later with curl exit 22 (the brand-new workers.dev route still 404'd). A manual rerun passed and both URLs serve 200.

Fix: rc=0; smoke || rc=$? in the worker, worker-turbo and workers-assets-turbo verify-deploy jobs. errexit doesn't apply to a command on the left of ||. Version 0.23.1.

Checked: I pulled the loop out of the job and ran it under bash -e -c 'set -uo pipefail; …' with a smoke that fails twice: it logs attempts 1 and 2 with their exit codes and passes on attempt 3. Before the fix the same harness exits on attempt 1 with no log line.

After merge: tag v0.23.1 so release.yml publishes the OCI artifact. Baselines pinned to 0.23.0 need their pin bumped to pick it up.

🤖 Generated with Claude Code

0.23.0's attempt loop called `smoke; rc=$?`. orun runs a step's script under
`bash -e`, so the first failing attempt ended the step with the smoke's own
exit code: no "attempt 1/10 failed" line, no backoff, no second attempt. A
first deploy whose new workers.dev route 404s for a few seconds then failed
smoke in 0.3s with curl's exit 22 (multi-tenant-saas-2's console, stage and
prod, 2026-11-16), and only a manual rerun got it green.

The call is now `rc=0; smoke || rc=$?`, which errexit does not apply to, so
the ~4.5 minute budget and the exit-code log line work as $2 meant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T12:00:51.664576Z 6b4e03a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6b4e03aae1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

smoke; rc=$?
# Not `smoke; rc=$?`: orun runs a step under `bash -e`, so a bare failing
# call would end the step on attempt 1 and skip the whole retry budget.
rc=0; smoke || rc=$?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve fail-fast behavior inside smoke commands

When a configured smokeCommand contains multiple commands, calling smoke on the left side of || suppresses Bash errexit throughout the function and its subshell. An early failed assertion or fetch followed by a successful command can therefore return 0, causing the loop to mark the deploy healthy instead of retrying or failing. The same call appears in the worker-turbo and assets-turbo smoke jobs.

Useful? React with 👍 / 👎.

@vijayakrishnans
vijayakrishnans merged commit b1cde9c into main Nov 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant