Skip to content

Speed up publish-release workflow by adding Go/WASM caching and bundle timeout#393

Open
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-publish-action-duration
Open

Speed up publish-release workflow by adding Go/WASM caching and bundle timeout#393
Copilot wants to merge 3 commits into
mainfrom
copilot/fix-publish-action-duration

Conversation

Copilot AI commented Jun 22, 2026

Copy link
Copy Markdown

Problem

The publish-release workflow occasionally ran for the full 6-hour ceiling before being cancelled. Reviewing the run history, all four incidents hung in the dependency-install step (npm ci) — gulp bundle never started. On healthy runs, gulp bundle (including the Go/WASM build) completes in ~70s, while a cold Install dependencies takes 5–6 min on tag-push runs that miss the branch-scoped node_modules cache.

#389 already added the npm ci cache that mitigates the slow-install path. This PR adds a guardrail so a future install hang fails fast instead of burning 6 hours, plus a low-risk Go setup improvement.

Changes

  1. Job-level timeout-minutes: 20 — covers every step, including npm ci where the hangs actually occurred. (A per-step timeout on the ~70s gulp bundle step would never have caught the incidents.)
  2. actions/setup-go@v5 + Go module cache — pins Go and trims module downloads for the build:wasm step.

Notes

Earlier revisions of this PR also added a per-step timeout-minutes: 10 on gulp bundle and a Cache generated files step for src/static/blobl.wasm. Both were removed after review:

  • The bundle-step timeout targeted the wrong step (bundle is ~70s; the hang is in install).
  • The generated-files cache saved nothing — build:wasm runs go build -o src/static/blobl.wasm unconditionally and overwrites any restored cache every run.

Thanks @micheleRP for the rescope.

@netlify

netlify Bot commented Jun 22, 2026

Copy link
Copy Markdown

Deploy Preview for docs-ui ready!

Name Link
🔨 Latest commit 93e933e
🔍 Latest deploy log https://app.netlify.com/projects/docs-ui/deploys/6a420f071330aa00080b113d
😎 Deploy Preview https://deploy-preview-393--docs-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 31 (no change from production)
Accessibility: 89 (no change from production)
Best Practices: 83 (🔴 down 9 from production)
SEO: 89 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@JakeSCahill JakeSCahill requested a review from micheleRP June 26, 2026 00:51
@micheleRP

Copy link
Copy Markdown
Contributor

Thanks for tackling the release-workflow stalls — the multi-hour runs are real and worth fixing. But the run history points at a different cause than this PR targets, so I'd like to rescope it before merging.

What the runs actually show. All four 6-hour cancelled runs hung in the dependency-install step, and gulp bundle never ran:

  • Update wasm_exec.js… (May 26) — npm install cancelled at 6:00:09, gulp bundle skipped
  • Update standalone API widget… (May 26) — npm install cancelled at 6:00:08, skipped
  • v3.1.0-beta.4 (Jun 9) and v3.1.0-beta.7 (Jun 10) — same pattern

On healthy runs (v3.1.1, v3.1.4), gulp bundle (including the Go/WASM build) finishes in ~70s, while Install dependencies takes 5–6 min because tag-push runs miss the branch-scoped node_modules cache. So WASM/bundle isn't the bottleneck, and the hang has only ever happened in the install step.

Suggested changes:

  1. Move the guardrail to the step that actually hangs. timeout-minutes: 10 on gulp bundle (a ~70s step) wouldn't have caught any of the four incidents. A job-level timeout covers the install step too:
    jobs:
      build:
        runs-on: ubuntu-22.04
        timeout-minutes: 20
  2. Drop the Cache generated files step. gulp bundle runs build:wasm unconditionally (go build -o src/static/blobl.wasm), and clean only removes build/ and public/, so the restored blobl.wasm is overwritten every run — the cache saves nothing.
  3. Keep setup-go + the Go module cache — that's a reasonable, low-risk improvement (pins Go and trims module downloads), though the win is small on a ~70s bundle step.
  4. Please tweak the description: the stalls were in dependency install (already mitigated by the npm ci cache in Fix data-platform double padding and add home page light mode hero #389), not gulp bundle.

The four 6-hour stalls hung in the dependency-install step, not in
gulp bundle (which finishes in ~70s). Adjust the changes accordingly:

- Move the timeout to the job level (timeout-minutes: 20) so it covers
  the npm install step where the hangs actually occurred; a per-step
  timeout on gulp bundle would never have fired.
- Drop the "Cache generated files" step: build:wasm runs `go build -o
  src/static/blobl.wasm` unconditionally, overwriting any restored
  cache, so it saved nothing.
- Keep setup-go + the Go module cache (low-risk, pins Go and trims
  module downloads).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JakeSCahill

JakeSCahill commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Thanks @micheleRP.

Will update the PR description to attribute the stalls to dependency install (already mitigated by the npm ci cache in #389) rather than gulp bundle.

Add a push:[main] trigger to validate-build so the node_modules cache
is populated in the default-branch scope on every merge. GitHub Actions
caches are only restorable from the same ref or the default branch, so
tag-triggered publish-release runs (refs/tags/v*) previously couldn't
read the PR-scoped caches and cold-installed (~5-6 min) every release.
With main's scope warmed, the release run can now restore it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@JakeSCahill

Copy link
Copy Markdown
Contributor

Added the actual fix for the slow release install in 93e933e.

Root cause: GitHub Actions caches are only restorable from the same ref or the default branch. validate-build runs on pull_request, so its node_modules cache lands in the PR ref scope. publish-release runs on push: tags: ['v*'] and can only fall back to main's scope — but nothing populated a cache there, so every release cold-installed (~5–6 min).

Fix: add a push: [main] trigger to validate-build, so each merge warms the node_modules cache in main's scope (same key). Tag-triggered release runs can then restore it.

The timeout/setup-go changes in this PR remain the guardrail; this is the part that should actually cut the install time.

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