ci: retry apt-get for ublk_drv install (Azure mirror flake)#29
Conversation
The Azure-hosted apt mirror (`azure.archive.ubuntu.com`) returns `Temporary failure resolving` periodically — observed today on PRs #24, #26, and #27. Without retries every flake fails the whole integration job for every in-flight PR. Wraps the apt-get update + install in a 5-attempt exponential backoff (5s, 10s, 20s, 40s, 80s = ~155s worst case before giving up). The fast path (modprobe succeeds because the module is already present) is unchanged.
PR SummaryLow Risk Overview Keeps the existing fast path (successful Reviewed by Cursor Bugbot for commit b7c16e5. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5a5b783. Configure here.
Bugbot pointed out the previous off-by-one: with `max=5` the loop gives up on the 5th failed attempt before sleeping, so only 4 sleeps actually fire (5+10+20+40 = 75s) instead of the documented five (5+10+20+40+80 = 155s). Bumping to `max=6` gives 6 attempts with 5 sleeps between them, matching the comment.
PR #24's failing `copilot-setup-steps` runs (and the integration runs) all bottom out on the same root cause: `apt-get update` and `apt-get install` against `azure.archive.ubuntu.com` intermittently fail with `Temporary failure resolving`. This is the same flake that PR #29 (ci/apt-retry) addresses for `.github/workflows/ci.yml`. Wire the same retry helper (max 6 attempts, exponential backoff with sleeps of 5s, 10s, 20s, 40s, 80s) around both apt-get invocations in `copilot-setup-steps.yml`: - `apt-get update` + `apt-get install e2fsprogs kmod` in "Install repo tooling". - `apt-get install linux-modules-extra-$(uname -r)` in "Load ublk kernel module". The helper definition is duplicated rather than factored out — the two steps are independent shell sessions, so a single helper would have to live in a separate script or composite action. Keeping it inline matches the pattern used in `ci.yml`. This is an additive commit on top of copilot's original change; no existing commits are amended.

Summary
The Azure-hosted apt mirror (`azure.archive.ubuntu.com`) returns `Temporary failure resolving` periodically — observed today on PRs #24, #26, and #27, all blocked by the same DNS blip while installing `linux-modules-extra`.
This PR wraps the `apt-get update` + install in a 5-attempt exponential backoff (5s, 10s, 20s, 40s, 80s — ~155s worst case before giving up). The fast path (`modprobe ublk_drv` succeeding because the module is already present in the runner image) is unchanged.
No code changes; CI workflow only.
Test plan