Skip to content

fix(collectstatic): Hash every file in the bundle version - #127794

Draft
joshuarli wants to merge 1 commit into
masterfrom
fix/collectstatic-bundle-version
Draft

joshuarli wants to merge 1 commit into
masterfrom
fix/collectstatic-bundle-version

Conversation

@joshuarli

Copy link
Copy Markdown
Member

get_bundle_version iterated zip(files, map(checksum, files)) where files is itself a one-shot zip iterator. Each step pulled one entry for the zip and another for the map, so every file was paired with the next file's checksum and every second file was dropped from the hash entirely.

It now loops over files once and checksums each entry itself.

The static bundle version written to the version file is a hash of this listing, so it changes once, on the first collectstatic after this lands. It then reflects every collected file, so changes to previously skipped files now change the version.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 16, 2026
@getsantry

getsantry Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

This pull request has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you add the label WIP, I will leave it alone unless WIP is removed ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

get_bundle_version zipped the file iterator with a map over the same iterator, so each pair consumed two entries: a file was paired with the next file's checksum and every second file was skipped.

The bundle version now covers each file with its own checksum. The version hash changes once after this lands.
@joshuarli
joshuarli force-pushed the fix/collectstatic-bundle-version branch from fe6f147 to ea5d7eb Compare November 26, 2026 00:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GitHub Team: python-typing Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant