Skip to content

ci: retry apt-get for ublk_drv install (Azure mirror flake)#29

Merged
ValentaTomas merged 2 commits into
mainfrom
ci/apt-retry
May 4, 2026
Merged

ci: retry apt-get for ublk_drv install (Azure mirror flake)#29
ValentaTomas merged 2 commits into
mainfrom
ci/apt-retry

Conversation

@ValentaTomas
Copy link
Copy Markdown
Member

@ValentaTomas ValentaTomas commented May 2, 2026

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

  • CI run for this branch loads ublk_drv and runs integration tests cleanly.
  • If the apt mirror flakes during the run, the retry should absorb it; logs will show `attempt N failed; sleeping...`.

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.
@ValentaTomas ValentaTomas requested a review from arkamar as a code owner May 2, 2026 00:22
@cursor
Copy link
Copy Markdown

cursor Bot commented May 2, 2026

PR Summary

Low Risk
Low risk: CI-only change that adds retries around apt-get to reduce transient runner/mirror failures; no production code paths are affected.

Overview
Improves CI integration test reliability by adding a retry helper with exponential backoff around apt-get update and apt-get install linux-modules-extra-$(uname -r) when modprobe ublk_drv isn’t available on the runner.

Keeps the existing fast path (successful modprobe exits early) and adds clearer logging/commentary for diagnosing transient azure.archive.ubuntu.com resolution failures.

Reviewed by Cursor Bugbot for commit b7c16e5. Bugbot is set up for automated code reviews on this repo. Configure here.

@ValentaTomas ValentaTomas enabled auto-merge (squash) May 2, 2026 00:23
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread .github/workflows/ci.yml
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.
ValentaTomas added a commit that referenced this pull request May 2, 2026
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.
@ValentaTomas ValentaTomas merged commit 412d529 into main May 4, 2026
12 checks passed
@ValentaTomas ValentaTomas deleted the ci/apt-retry branch May 4, 2026 17:43
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.

2 participants