From 015b24081a57132a732927a8f038e3b2d8b813c8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 1 May 2026 23:50:48 +0000 Subject: [PATCH 1/2] fix: use GHA expression syntax for GOLANGCI_LINT_VERSION in copilot-setup-steps Agent-Logs-Url: https://github.com/e2b-dev/ublk-go/sessions/f515b9d7-565f-4496-962f-5319eca8b205 Co-authored-by: ValentaTomas <49156497+ValentaTomas@users.noreply.github.com> --- .github/workflows/copilot-setup-steps.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index bb3f6cc..9c7f4be 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -27,8 +27,8 @@ jobs: set -eux sudo apt-get update -qq sudo apt-get install -y --no-install-recommends e2fsprogs kmod - curl -sSfL "https://raw.githubusercontent.com/golangci/golangci-lint/${GOLANGCI_LINT_VERSION}/install.sh" \ - | sh -s -- -b "$(go env GOPATH)/bin" "${GOLANGCI_LINT_VERSION}" + curl -sSfL "https://raw.githubusercontent.com/golangci/golangci-lint/${{ env.GOLANGCI_LINT_VERSION }}/install.sh" \ + | sh -s -- -b "$(go env GOPATH)/bin" "${{ env.GOLANGCI_LINT_VERSION }}" echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" go env -w GOFLAGS=-tags=integration - name: Prime Go module cache From d42e7a64b449dd6d91f656e8a1cff58f6b4a23e8 Mon Sep 17 00:00:00 2001 From: ValentaTomas Date: Fri, 1 May 2026 17:52:10 -0700 Subject: [PATCH 2/2] ci: retry apt-get against Azure mirror in copilot-setup-steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/copilot-setup-steps.yml | 47 ++++++++++++++++++++--- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml index 9c7f4be..17e4135 100644 --- a/.github/workflows/copilot-setup-steps.yml +++ b/.github/workflows/copilot-setup-steps.yml @@ -23,10 +23,30 @@ jobs: go-version: "1.25" check-latest: false - name: Install repo tooling + # The Azure-hosted apt mirror (`azure.archive.ubuntu.com`) flakes + # with `Temporary failure resolving` from time to time, so we + # retry both update and install up to 6 attempts with exponential + # backoff (sleeps of 5s, 10s, 20s, 40s, 80s between attempts) + # before giving up. Without this, every transient mirror blip + # fails copilot-setup-steps for every PR in flight. Same helper + # is used in `.github/workflows/ci.yml` for consistency. run: | set -eux - sudo apt-get update -qq - sudo apt-get install -y --no-install-recommends e2fsprogs kmod + retry() { + local n=0 max=6 delay=5 + until "$@"; do + n=$((n+1)) + if [ "$n" -ge "$max" ]; then + echo "command failed after $n attempts: $*" >&2 + return 1 + fi + echo "attempt $n failed; sleeping ${delay}s and retrying: $*" >&2 + sleep "$delay" + delay=$((delay*2)) + done + } + retry sudo apt-get update -qq + retry sudo apt-get install -y --no-install-recommends e2fsprogs kmod curl -sSfL "https://raw.githubusercontent.com/golangci/golangci-lint/${{ env.GOLANGCI_LINT_VERSION }}/install.sh" \ | sh -s -- -b "$(go env GOPATH)/bin" "${{ env.GOLANGCI_LINT_VERSION }}" echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH" @@ -34,10 +54,27 @@ jobs: - name: Prime Go module cache run: go mod download - name: Load ublk kernel module + # See "Install repo tooling" above for why we retry apt-get + # against the Azure mirror. run: | set -eux - if ! sudo modprobe ublk_drv 2>/dev/null; then - sudo apt-get install -y --no-install-recommends "linux-modules-extra-$(uname -r)" - sudo modprobe ublk_drv + if sudo modprobe ublk_drv 2>/dev/null; then + ls -l /dev/ublk-control + exit 0 fi + retry() { + local n=0 max=6 delay=5 + until "$@"; do + n=$((n+1)) + if [ "$n" -ge "$max" ]; then + echo "command failed after $n attempts: $*" >&2 + return 1 + fi + echo "attempt $n failed; sleeping ${delay}s and retrying: $*" >&2 + sleep "$delay" + delay=$((delay*2)) + done + } + retry sudo apt-get install -y --no-install-recommends "linux-modules-extra-$(uname -r)" + sudo modprobe ublk_drv ls -l /dev/ublk-control