Skip to content

Docs on Workers Builds - #32438

Open
ericclemmons wants to merge 3 commits into
cloudflare:productionfrom
ericclemmons:production
Open

Docs on Workers Builds#32438
ericclemmons wants to merge 3 commits into
cloudflare:productionfrom
ericclemmons:production

Conversation

@ericclemmons

@ericclemmons ericclemmons commented Jul 30, 2026

Copy link
Copy Markdown
Member

Summary

This repo times out at 30 minutes on Workers Builds due to issues with 8 GB of memory (vs. GitHub's 16 GB).

Until that's resolved, there are a few fixes that I found were able to get ~11m builds:

  • fix: reduce finalization memory usage rolldown/rolldown#10554 is the root issue, causing memory pressure ~5 minutes in and hanging until the timeout at 30 minutes.

  • Switch to Cloudflare Images (to avoid spending 20+ minutes on Sharp image compression at build time)
    https://docs.astro.build/en/guides/integrations-guide/cloudflare/#imageservice

    (If this isn't desirable, commit hook or CI job to do this optimistically instead of every single build?)

  • Revert fix: move Astro cache outside node_modules #31192, because Workers Builds expects the default cache location at node_modules/.astro

  • Add this repo to Workers Builds on the Cloudflare Docs' account

  • Add GITHUB_TOKEN secret to prevent MDX errors that call the GitHub API:

    19:58:52 [ERROR] Error: A request to the GitHub API (https://api.github.com/repos/cloudflare/templates/commits?sha=main&per_page=1) was made without a token and was rate limited.
  • Validate Cloudflare Images works as a replacement to sharp (which reduced both build times & memory)

  • Validate Astro Cache in node_modules/.astro doesn't regress. (Workers Builds cache dependencies based on lockfile and caches the framework, restoring them in that order. So in theory, even if dependencies don't change, each build will re-cache the framework)

Screenshots (optional)

Before

Screenshot 2026-07-30 at 5 06 47 PM

After (cold cache)

Screenshot 2026-07-30 at 5 08 08 PM

After (warm cache)

Screenshot 2026-07-30 at 5 07 24 PM

Documentation checklist

  • Is there a changelog entry (guidelines)? If you don't add one for something awesome and new (however small) — how will our customers find out? Changelogs are automatically posted to RSS feeds, the Discord, and X.
  • The change adheres to the documentation style guide.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

Comment thread pnpm-workspace.yaml Outdated
@ericclemmons ericclemmons changed the title WIP: Docs on Workers Builds Docs on Workers Builds Aug 5, 2026
@ericclemmons
ericclemmons marked this pull request as ready for review August 5, 2026 20:50
@ericclemmons
ericclemmons requested review from a team and kodster28 as code owners August 5, 2026 20:50
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 2 warnings, 💡 1 suggestion found in commit 17c013c.

👉 Fix in your agent 👈
Fix the following review findings in PR #32438 (https://github.com/cloudflare/cloudflare-docs/pull/32438).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification
- If you disagree (e.g. the fix requires disproportionate effort for minimal benefit,
  or the finding is factually incorrect), explain why
- If you need clarification before deciding, ask those questions
- Then share your plan for which issues to tackle and in what order

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit — the bot reads PR comments when a new
push triggers a review, so skip comments posted after the push will be missed.

---

## Code Review

### Warnings (1)

#### CR-a3a4452c5421 · Overly broad minimumReleaseAgeExclude wildcard
- **File:** `pnpm-workspace.yaml` line 18
- **Issue:** minimumReleaseAgeExclude: '@rolldown/*' exempts every package in the @rolldown scope from the 24-hour release-age guard, not just the patched version or its required native binaries. The guard at the top of the file exists to 'reduce risk from newly-published compromised packages.'
- **Fix:** Replace the wildcard with the specific @rolldown native binding packages actually installed (e.g., @rolldown/binding-* patterns or explicit platform packages), or add a comment justifying why the entire scope is acceptable.

### Suggestions (1)

#### CR-c6e4d253085e · Branch-specific comment in production config
- **File:** `pnpm-workspace.yaml` line 16
- **Issue:** The comment says 'Rolldown 1.2.3 contains the native memory fix tested by this branch,' tying the override to the current branch rather than a stable reason for the pin.
- **Fix:** Reword the comment to explain the memory fix and why this version must be pinned for the docs site build, removing the temporary 'tested by this branch' wording before merging.

---

## Conventions

### Warnings (1)

#### CV-c56aca14b856 · PR title format
- **File:** PR-level finding
- **Issue:** The title "Docs on Workers Builds" suggests this PR adds documentation content about Workers Builds, but the changed files are build configuration files (astro.config.ts, package.json, pnpm-lock.yaml, pnpm-workspace.yaml) with no src/content/docs/ changes.
- **Fix:** Update the title to indicate this is a build/configuration change (e.g. "Configure build for Workers Builds" or "Build: switch image service and cache for Workers Builds").

Code Review

This code review is in beta and may not always be helpful — use your judgment.

Warnings (1)
File Issue
pnpm-workspace.yaml line 18 Overly broad minimumReleaseAgeExclude wildcard — minimumReleaseAgeExclude: '@rolldown/*' exempts every package in the @rolldown scope from the 24-hour release-age guard, not just the patched version or its required native binaries. The guard at the top of the file exists to 'reduce risk from newly-published compromised packages.' Fix: Replace the wildcard with the specific @rolldown native binding packages actually installed (e.g., @rolldown/binding-* patterns or explicit platform packages), or add a comment justifying why the entire scope is acceptable.
Suggestions (1)
File Issue
pnpm-workspace.yaml line 16 Branch-specific comment in production config — The comment says 'Rolldown 1.2.3 contains the native memory fix tested by this branch,' tying the override to the current branch rather than a stable reason for the pin. Fix: Reword the comment to explain the memory fix and why this version must be pinned for the docs site build, removing the temporary 'tested by this branch' wording before merging.

Conventions

Warnings (1)
File Issue
PR PR title format — The title "Docs on Workers Builds" suggests this PR adds documentation content about Workers Builds, but the changed files are build configuration files (astro.config.ts, package.json, pnpm-lock.yaml, pnpm-workspace.yaml) with no src/content/docs/ changes. Fix: Update the title to indicate this is a build/configuration change (e.g. "Configure build for Workers Builds" or "Build: switch image service and cache for Workers Builds").

Style Guide Review

No style-guide issues found.

Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.
/ignore-review-limit Permanently lifts the 2-review automatic limit for this PR. Future pushes will trigger reviews as normal.
/disable-auto-review Stops automatic reviews from triggering on future pushes to this PR. Codeowners can still run /review or /full-review manually.
/rebase Rebases the PR branch against production. On conflict, attempts to resolve automatically using AI. Stops with an explanation if confidence is not high enough.

@mvvmm mvvmm mentioned this pull request Aug 5, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants