Skip to content

Incremental Builds (Astro preview build) - #32676

Open
mvvmm wants to merge 7 commits into
productionfrom
vance/workers-builds-gh
Open

Incremental Builds (Astro preview build)#32676
mvvmm wants to merge 7 commits into
productionfrom
vance/workers-builds-gh

Conversation

@mvvmm

@mvvmm mvvmm commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Enables Astro experimental incremental builds using a preview build of Astro (pkg.pr.new/astro@17632) to test the latest incremental build implementation.

  • Enable Astro experimental.incrementalBuild
  • Use @astrojs/cloudflare image service (skip Sharp at build time)
  • Use default Astro cache directory (node_modules/.astro)
  • Override rolldown to 1.2.3 (fixes OOM on Workers Builds)
  • Remove patch-package, use pnpm patchedDependencies instead
  • Bump @astrojs/markdown-remark to 7.2.2
  • Cache full node_modules/.astro in CI for incremental builds

Companion PR

This PR uses a preview build of Astro. For comparison, #32678 uses stable Astro 7.2.0 with the same changes — use both to A/B test incremental build performance.

Testing

  • CI build passes
  • Incremental build cache hits on subsequent CI runs
  • No regression in generated output

@mvvmm
mvvmm requested review from a team and kodster28 as code owners August 11, 2026 22:23
@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review

⚠️ 2 warnings found in commit 5ef8fae.

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

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 (2)

#### CR-421664d51d9e · Overly broad cache restore key
- **File:** `.github/workflows/ci.yml` line 141
- **Issue:** The restore key `astro-cache-${{ runner.os }}-` omits the `pnpm-lock.yaml` hash, so a build can reuse an Astro cache generated for a different set of package/Astro versions after dependency updates.
- **Fix:** Remove the OS-only fallback, or make it include the lockfile hash, so `node_modules/.astro` caches are only restored when dependencies match.

#### CR-cbf2b0cd6c20 · Unstable framework dependency
- **File:** `package.json` line 85
- **Issue:** "astro" is pointed at `https://pkg.pr.new/astro@17632`, a transient PR preview build of Astro rather than a stable, semver-tagged release.
- **Fix:** Use a stable Astro release (pin an exact version or a semver range) before merging, and only use pkg.pr.new builds for temporary local/branch verification.

Code Review

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

Warnings (2)
File Issue
.github/workflows/ci.yml line 141 Overly broad cache restore key — The restore key astro-cache-${{ runner.os }}- omits the pnpm-lock.yaml hash, so a build can reuse an Astro cache generated for a different set of package/Astro versions after dependency updates. Fix: Remove the OS-only fallback, or make it include the lockfile hash, so node_modules/.astro caches are only restored when dependencies match.
package.json line 85 Unstable framework dependency — "astro" is pointed at https://pkg.pr.new/astro@17632, a transient PR preview build of Astro rather than a stable, semver-tagged release. Fix: Use a stable Astro release (pin an exact version or a semver range) before merging, and only use pkg.pr.new builds for temporary local/branch verification.

Conventions

No convention issues found.

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 changed the title Docs on Workers Builds Incremental Builds Aug 11, 2026
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/.github/ @cloudflare/content-engineering, @kodster28, @mvvmm, @colbywhite, @ahaywood, @MohamedH1998
*.ts @cloudflare/content-engineering, @kodster28
package.json @cloudflare/content-engineering
* @cloudflare/product-owners

@mvvmm mvvmm changed the title Incremental Builds Docs on Workers Builds Aug 11, 2026
@mvvmm

mvvmm commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

/review

@mvvmm mvvmm changed the title Docs on Workers Builds Incremental Builds Aug 11, 2026
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

@mvvmm

mvvmm commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

/rebase

mvvmm added 7 commits August 12, 2026 15:40
- Enable Astro incremental builds (experimental)
- Use Astro preview build with graph hashing (pkg.pr.new/astro@17632)
- Switch to @astrojs/cloudflare image service (skip Sharp at build time)
- Use default Astro cache directory (node_modules/.astro)
- Override rolldown to 1.2.3 (fixes OOM on Workers Builds)
- Add rolldown to minimumReleaseAgeExclude
- Remove allowBuilds (use default pnpm build script policy)
- Remove patch-package, use pnpm patchedDependencies instead
- Patch astro-icon to remove unstable lastModified metadata
- Bump @astrojs/markdown-remark to 7.2.2
- Custom getStaticPaths with cacheKey for incremental build cache

Duplicates #32438
@mvvmm
mvvmm force-pushed the vance/workers-builds-gh branch from 3919c8a to 5ef8fae Compare August 12, 2026 20:40
@mvvmm mvvmm changed the title Incremental Builds Incremental Builds (Astro preview build) Aug 12, 2026
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