Skip to content

ci: retry transient Go dependency and tool download failures - #459

Merged
Wei Weng (weng271190436) merged 4 commits into
mainfrom
ci/retry-e2e-go-mod-download
Nov 25, 2026
Merged

Wei Weng (weng271190436) merged 4 commits into
mainfrom
ci/retry-e2e-go-mod-download

Conversation

@weng271190436

@weng271190436 Wei Weng (weng271190436) commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

What type of PR is this?
/kind test
/kind flake

What this PR does / why we need it:

  • Add one POSIX helper that retries Go commands three times with 10/20-second delays and explicit failure after exhaustion.
  • Reuse it for go mod download in Azure DevOps and all five Go image builds, and for go install in the Makefile tool installer.
  • Preserve the BuildKit module cache, checksum verification, tool publication and temporary-directory cleanup. Do not retry make test, provisioning, or image pushes.
  • Addresses HTTP/2 errors from proxy.golang.org and sum.golang.org seen in ADO and GitHub CI.

Which issue(s) this PR fixes:
No linked issue.

How has this code been tested

  • Executed the actual shared helper with mocked go/sleep for both commands: immediate success, recovery after one/two failures, and exhaustion; checked exact arguments, attempt counts, delays, and missing-argument failure.
  • Exercised the actual installer from another working directory with mocks for all four outcomes; verified publication and temporary-directory cleanup.
  • Parsed pipeline YAML with yq, checked shell syntax and git diff --check.
  • docker buildx build --check passed on all five Dockerfiles; a mocked BuildKit build verified the mounted helper executes.

Special notes for your reviewer

No live Azure tests or real full image builds were run. Existing in-flight pipelines are unaffected.

Wei Weng and others added 2 commits November 24, 2026 15:10
Retry only go mod download up to three total attempts with 10s and 20s delays. Keep provisioning and other prerequisite commands outside the retry loop and fail explicitly when attempts are exhausted.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retry only the shared installer's go install command up to three total attempts with 10s and 20s delays. Preserve binary publication and cleanup behavior, and fail explicitly after exhaustion.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@weng271190436 Wei Weng (weng271190436) changed the title ci: retry transient E2E module download failures ci: retry transient Go dependency and tool download failures Nov 24, 2026
Comment thread .pipeline/e2e-tests.yaml Resolved
Comment thread hack/go-install.sh Resolved
@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.33%. Comparing base (58e51b6) to head (4b98336).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #459      +/-   ##
==========================================
- Coverage   76.54%   76.33%   -0.21%     
==========================================
  Files          77       77              
  Lines        7669     7669              
==========================================
- Hits         5870     5854      -16     
- Misses       1387     1399      +12     
- Partials      412      416       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Wei Weng and others added 2 commits November 24, 2026 17:23
Use a shared POSIX retry script for the module download layer of all five Go images, preserving the existing BuildKit module cache and failing after three attempts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reuse the same bounded retry for module downloads and tool installation across Azure DevOps and image builds.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the changes intended to reduce CI failures from transient Go downloads.

No open issues 🎉

What changed in this PR

This PR reduces CI failures caused by transient Go dependency and tool downloads by introducing a shared retry helper for pipelines, image builds, and tool installation.

Changes:

  • Add a POSIX helper with up to three attempts, 10/20-second delays, and explicit failure after exhaustion.
  • Apply retries to dependency downloads in Azure DevOps and all five Go image builds, preserving BuildKit module caches.
  • Reuse the helper for tool installation while retaining publication and temporary-directory cleanup.
File Description
hack/​retry-go.sh Add shared Go command retry logic.
hack/​go-install.sh Retry tool installation using the shared helper.
docker/​net-crd-installer.Dockerfile Retry CRD installer dependency downloads.
docker/​member-net-controller-manager.Dockerfile Retry member controller dependency downloads.
docker/​mcs-controller-manager.Dockerfile Retry multi-cluster service controller dependency downloads.
docker/​hub-net-controller-manager.Dockerfile Retry hub networking controller dependency downloads.
docker/​hub-gateway-controller-manager.Dockerfile Retry hub gateway controller dependency downloads.
.pipeline/​e2e-tests.yaml Retry dependency downloads during E2E prerequisite checks.

Review effort: Balanced

@michaelawyu Chen Yu (michaelawyu) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM ;)

@weng271190436
Wei Weng (weng271190436) merged commit a3baf38 into main Nov 25, 2026
14 of 15 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.

4 participants