Skip to content

Harden CI against transient Bazel/emsdk fetch timeouts.#239

Merged
tameware merged 3 commits into
dds-bridge:developfrom
tameware:harden-build
Jul 19, 2026
Merged

Harden CI against transient Bazel/emsdk fetch timeouts.#239
tameware merged 3 commits into
dds-bridge:developfrom
tameware:harden-build

Conversation

@tameware

Copy link
Copy Markdown
Collaborator

Mirror emsdk downloads and prefetch/retry network-bound Bazel steps so jobs fail less often on SocketTimeoutException during repo resolution.

Mirror emsdk downloads and prefetch/retry network-bound Bazel steps so
jobs fail less often on SocketTimeoutException during repo resolution.

Co-authored-by: Cursor <cursoragent@cursor.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to reduce CI flakiness caused by transient network timeouts during Bazel external repository resolution, especially around emsdk acquisition for WASM builds, by overriding the emsdk source download URLs and adding explicit prefetch/retry steps in CI workflows.

Changes:

  • Override the emsdk Bazel module source to prefer GitHub tarballs (with an alternate CDN URL) while keeping integrity pinned.
  • Add bazel fetch prefetch steps with simple retry loops to CI jobs to warm external repositories before builds/tests.
  • Add build retry loops for WASM and Windows workflows to mitigate transient failures during analysis/fetch.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
MODULE.bazel.lock Updates lockfile hashes/digests to reflect the new module resolution behavior.
MODULE.bazel Adds an archive_override for emsdk to use alternate download URLs with pinned integrity.
.github/workflows/ci_windows.yml Adds prefetch and build retry logic to reduce transient external fetch failures on Windows CI.
.github/workflows/ci_wasm.yml Adds prefetch and build retry logic to reduce transient external fetch failures in WASM CI.
.github/workflows/ci_macos.yml Adds prefetch-with-retry step to warm external repos before building on macOS CI.
.github/workflows/ci_linux.yml Adds prefetch-with-retry step to warm external repos before building on Linux CI.

Comment thread .github/workflows/ci_windows.yml Outdated
Comment thread .github/workflows/ci_wasm.yml Outdated
Comment thread .github/workflows/ci_linux.yml
Comment thread .github/workflows/ci_macos.yml
Restart Bazel instead of expunging between build retries, and warm
external repos for Linux/macOS sanitizer jobs the same way.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tameware
tameware marked this pull request as ready for review July 18, 2026 14:25
@tameware tameware self-assigned this Jul 18, 2026
@tameware
tameware requested review from Copilot and zzcgumn July 18, 2026 14:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.

@zzcgumn zzcgumn 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.

I like this idea but am wondering why we are mixing bazelisk and bazel commands. I don't think it makes any difference on CI runners as I expect there to be only one bazel version that bazelisk can resolve to use.

@tameware

Copy link
Copy Markdown
Collaborator Author

We should always use bazelisk. Otherwise a local bazel might differ from the repo bazel, causing MODULE.bazel.lock mismatches.

I've added 'alias bazel=bazelisk' to my .bashrc, as a companion to alias blaze=bazel.

@tameware
tameware merged commit d9f9a3d into dds-bridge:develop Jul 19, 2026
7 checks passed
@tameware
tameware deleted the harden-build branch July 19, 2026 03: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.

3 participants