Skip to content

Backend CI: back off for about five minutes before giving up on the ruff-unsloth wheel - #17211

Merged
danielhanchen merged 1 commit into
mainfrom
ci/ruff-unsloth-install-outlasts-504s
Nov 9, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/ruff-unsloth-install-outlasts-504s

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

The Backend CI step that installs the pinned ruff-unsloth wheel retries 3 times with 5 s and 10 s gaps. Between 05:19 and 05:40 UTC today, GitHub served intermittent 504s for the release asset, and every attempt of an unlucky job landed inside one burst. That turned Repo tests (CPU, fsdp2 / gloo-cp / gloo-pp / gloo-tp / rest / studio-install) red on #17188, #17191, #17197, #17201 and #17202, while sibling jobs in the same runs installed the wheel fine a minute later.

This raises the loop to 6 attempts with exponential backoff (10, 20, 40, 80, 160 s, about 5 minutes total). A healthy download still never sleeps, and a lasting outage still fails the job with the same ::error:: line, so the fixed-point formatter guard keeps failing loudly in CI when the wheel is truly unavailable.

Changes

  • .github/workflows/studio-backend-ci.yml: 6 attempts, sleep $((10 << (attempt - 1))).
  • tests/test_ruff_unsloth_install_retries.py: runs the step's own run: script under bash with pip and sleep faked on PATH, and checks that
    • 5 failed downloads in a row still install, after at least 300 s of backoff,
    • a download that never recovers still fails the job, in under 10 minutes,
    • a healthy download does not wait at all.

Testing

  • pytest tests/test_ruff_unsloth_install_retries.py: 3 passed.
  • Against the old step from main, the burst test fails with ruff-unsloth install failed after 3 attempts.
  • The other tests that read studio-backend-ci.yml pass.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 9, 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-09T05:46:32.631307Z 703bd26 Manual request
ℹ️ 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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 703bd26f7e

ℹ️ 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".

@danielhanchen
danielhanchen merged commit 1714b16 into main Nov 9, 2026
@danielhanchen
danielhanchen deleted the ci/ruff-unsloth-install-outlasts-504s branch November 9, 2026 06:10
danielhanchen added a commit that referenced this pull request Nov 9, 2026
#17221)

## Summary

Follow-up to #17211, for the same GitHub release-asset outage. The
frontend CI step `Typecheck through bun check` downloads the pinned Bun
zip with `curl --retry 5 --retry-delay 3`, which gives up after about 15
seconds of waiting. GitHub served bursts of 504s for release assets for
over two hours today, and #17208's `Frontend build + bundle sanity` went
red with six `curl: (22) The requested URL returned error: 504` lines in
a row.

This drops the fixed `--retry-delay` and raises `--retry` to 8. Without
a fixed delay, curl backs off exponentially (1, 2, 4, ... 128 s), so the
step now waits about four minutes in total before failing. A healthy
download is unchanged, and a download that never recovers still fails
the job. The SHA-256 check and the `UNSLOTH_TYPECHECK=bun` gate are
untouched.

## Changes

- `.github/workflows/studio-frontend-ci.yml`: `--retry 8
--retry-connrefused --retry-all-errors`, no `--retry-delay`.
- `tests/test_bun_download_retries.py`: reads the step's `curl` line
from the workflow and checks that `--retry-all-errors` is set (curl does
not retry a 504 without it) and that the total backoff is at least 240
s. A second test pins the backoff arithmetic against curl's documented
behaviour.

## Testing

- Against a local server that always answers 504, `curl --retry 3`
without `--retry-delay` waits 7 s (1 + 2 + 4), which matches the
arithmetic in the test.
- `pytest tests/test_bun_download_retries.py`: 2 passed. Against the old
step from `main` it fails with `assert 15 >= 240`.
- The other tests that read `studio-frontend-ci.yml` pass (98 passed),
and `scripts/lint_workflow_triggers.py` is clean.
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