Repository navigation
perf(deploy): remove ineffective Docker cache pulls, bootstrap buildx early, and use official Hugo image - #6412
Merged
Conversation
… early, and use official Hugo image
michaelkedar
approved these changes
Nov 20, 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.
Overview
Removes startup contention and wasted pulls in
deployment/build-and-stage.yaml:osv-builder(buildx) immediately at build start (waitFor: ['-'],--bootstrap), avoiding a ~56s stall insidebuild-importer.pull-*steps that caused a ~48s Docker daemon bottleneck att=11s.build-hugofrom the multi-GBgcr.io/oss-vdb/ciimage (107–121s pull for a 99 ms Hugo run) to the official digest-pinnedghcr.io/gohugoio/hugo:v0.170.1image.(AI-assisted PR — part of a series of independent low-effort
build-and-stageoptimizations.)Details
buildxpull-*steps:osv-builderuses thedocker-containerdriver, which cannot read images pulled into the host Docker daemon. Also dropped unused--cache-fromflags on the 15 Gobuildxtargets that do not emitBUILDKIT_INLINE_CACHE=1. KeptBUILDKIT_INLINE_CACHE=1and--cache-fromonbuild-website(buildxreads the cache manifest directly from GCR without needingpull-website).pull-*steps (alpine-cve-convert,debian-cve-convert,combine-to-osv,cve5-to-osv,indexer,debian-convert): legacydocker build --cache-fromcannot cache intermediateGO_BUILDstages from the final runtime image. Keptpull-worker-baseand--cache-from gcr.io/oss-vdb/worker-base:latest, which is single-stage and achieves full cache hits.buildxearly: Changedsetup-buildxtowaitFor: ['-']with--bootstrapsomoby/buildkitinitializes alongsidesetupandpull-worker-base.gcr.io/oss-vdb/ciwithghcr.io/gohugoio/hugo:v0.170.1@sha256:4cc9f383086c0fba180efcf7132cf2f025969c462fedf5fcd2bf921915416797. Because the official image runs as non-rootUSER hugo:hugo, added a lightweightprep-hugostep (reusing already-cachedgcr.io/cloud-builders/git) to create a writablewebsite/dist/static/blogdirectory, and invokedentrypoint: 'hugo'with--noBuildLock.Testing
ghcr.io/gohugoio/hugo:v0.170.1@sha256:4cc9f383086c0fba180efcf7132cf2f025969c462fedf5fcd2bf921915416797locally with--entrypoint hugo --noBuildLock --buildFutureagainstwebsite/bloginto achmod 777output directory (matching Cloud Build's root-owned/workspacesetup): built 28 pages + 26 non-page files in 39 ms and verified generatedindex.html,posts/, and external link rendering.cloud-build-queue)..dockerignore,GOMAXPROCS, and scheduling PRs.poetry run tools/lint_and_format.sh: passed.agy