build: vendor API reference data to speed up site builds - #26182
Merged
Merged
Conversation
API generation added roughly five minutes to site builds and ran independently in multiple validation jobs. Vendor the generated JSON and move tests, spec validation, and regeneration comparison into a separate advisory Docker Bake workflow. Mark the JSON as generated and update Docker, Netlify, local builds, and contributor instructions to consume the vendored data.
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The advisory check spent nearly four minutes installing Vacuum from source on a fresh CI runner. Download the pinned release binary with architecture-specific SHA-256 verification and preserve Docker build layers in the GitHub Actions cache.
Replace the separate API workflow with an entry in the existing validation matrix. Keep only the API entry advisory and preserve its Docker layer cache settings.
Use ADD with checksum verification and archive extraction for the pinned Vacuum release on AMD64 and ARM64. Remove remote cache import/export from the validation matrix while retaining local Go cache mounts.
Install Vacuum on PATH in the Dockerfile and have the script invoke it normally. Remove tool bootstrapping and private binary paths, run the repository generator through go run, and document the local prerequisites.
Remove the redundant warning annotation and job summary. The Bake action already captures validation output and the failing step status.
craig-osterhout
approved these changes
Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API generation introduced in #26048 added roughly five minutes to site builds: median successful main-branch build-workflow duration rose from 4m 05s to 8m 48s across September 3–25. The pre-build command took 4m 41s–4m 53s in each of four jobs on the merge commit.
Vendor the generated presentation model in
data/api-reference.json, mark it as generated, and let Docker, Netlify, and local Hugo builds consume it directly. Keep the existing rendered-output checks.Move generator tests, strict spec validation, and a byte-for-byte regeneration check into
docker buildx bake validate-api-reference, inheriting the shared Docker base stage. The target uses the pinned Vacuum release binary with Dockerfile ADD checksum verification and archive extraction instead of compiling Vacuum from source. The existing build workflow runs this target alongside the other validation matrix entries. Only this matrix entry is advisory; its failures do not block site builds or deployment.Validated locally with the Docker target, rejection of deliberately stale data, repeatable generation across directories, a production Hugo build and verification of 453 API HTML/Markdown page pairs, workflow syntax checks, and scoped documentation lint. The prebuilt-binary CI check passed in 1m 40s, down from 5m 15s with source compilation. Remote layer-cache settings were subsequently removed; local Go cache mounts remain.
Generated by Codex