Repository navigation
perf: do not fetch the repo index when --skip-reindex is set - #7
Merged
vaclav-dvorak merged 1 commit intoOct 6, 2026
Merged
Conversation
FetchRaw sat outside the skipReindex guard, so every push downloaded the whole index.yaml and discarded it. On the prod chart repo that index is 22 MB and the build pushes 129 charts in sequence, so a run spent ~440s of its ~478s build phase on 2.8 GB of GETs it never read. The race the surrounding comment guards is about the index read-modify-write, which does not happen on this path.
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.
Summary
pushno longer downloads the repo index when--skip-reindexis set. Bumpsplugin.yamlto 0.1.1.Details
FetchRawsat outside theif !act.skipReindexguard, and the bytes it returns are read only inside that guard:So with
--skip-reindexevery push did a fulls3managerdownload ofindex.yamland threw it away.Measured on the prod chart repo (
exa-helm-charts-prod-c42d):index.yamlis 22.3 MB (41,987 chart versions across 130 charts).v2-helm-charts-s3-prodpushes 129 charts sequentially with--skip-reindex --force, so one build spent ~2.8 GB on GETs it never read. From that build's own log:helm package×129helm s3 push×129helm s3 reindex+ index re-stampPer-push gaps were tightly clustered (median 4.0s, min 2s, max 5s) — the signature of a fixed-size download, not of the chart uploads, which vary a lot in size. It also explains a steady slowdown with no step change: median build time went from ~240–330s in late August to ~460–490s now, tracking index growth (16.6 MB → 22.3 MB in four days) while chart count only went 111 → 130.
The comment above the fetch — "The gap between index fetching and uploading should be as small as possible to make the best effort to avoid race conditions" — is about the index read-modify-write, which does not happen on the skip-reindex path. It moves with the code it describes.
Unit tests and
go vetare unchanged from the base commit (internal/awsutil'sTestDynamicBucketRegionfails identically before and after — it reads the ambient AWS region). The minio-backed e2e suite could not run here: theminio/minioimage pull is denied without a Docker Hub login.