Repository navigation
LWLP-5506: pin Fromager sdist destination filename to avoid zip-sdist cache miss - #148
Merged
Jonathan Gangi (JAVGan) merged 1 commit intoNov 18, 2026
Conversation
… miss Fromager's default_download_source() derives the sdist cache filename from the resolved index URL's extension, not from what source-to-sdist already wrote. For packages whose canonical PyPI sdist is .zip (h11 <= 0.7.0), this misses our .tar.gz-only cache and downloads the pristine, unrewritten-version upstream sdist, failing the wheel-version gate. Pin download_source.destination_filename in the rendered Fromager settings to the exact name create_sdist() already writes, so Fromager finds our pre-placed, version-rewritten sdist regardless of the upstream index's advertised extension. LWLP-5506
Jonathan Gangi (JAVGan)
marked this pull request as ready for review
November 17, 2026 15:14
Jonathan Gangi (JAVGan)
requested review from
Ales Raszka (Allda),
Andrew McNamara (arewm) and
Bruno Pimentel (brunoapimentel)
November 17, 2026 21:01
Ales Raszka (Allda)
approved these changes
Nov 18, 2026
jvulgan
approved these changes
Nov 18, 2026
Jonathan Gangi (JAVGan)
deleted the
fix/LWLP-5506-sdist-destination-filename
branch
November 18, 2026 13:28
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
python-fromager-build-wheelsprovenance gate (Primary wheel filename version mismatch) because Fromager rebuilt from the pristine upstream sdist instead of our version-rewritten one.default_download_source()derives the sdist cache filename from the resolved PyPI index URL's extension, not from whatsource-to-sdistalready wrote.create_sdist()always writes.tar.gzcache aliases, so for packages whose canonical PyPI sdist is.zip(h11 <= 0.7.0), Fromager's cache check misses and it downloads the pristine, unrewritten-version upstream zip instead.BuildConfig.render_settings()now pinsdownload_source.destination_filenamein the rendered per-package Fromager settings YAML to${canonicalized_name}-${version}.tar.gz— the exact namecreate_sdist()already writes — so Fromager finds our pre-placed, version-rewritten sdist regardless of the upstream index's advertised extension. Usessetdefaultso a build config that already overridesdownload_sourcefor some other reason (e.g. an alternate-source package) is left untouched.See LWLP-5506 for the full root-cause writeup and the fix-direction tradeoffs considered.
Test plan
uv run pytest— 301 passed, including 3 new tests covering the default pin, respecting an existingdownload_sourceoverride, and rejecting a non-mappingdownload_source.uv run ruff check ./uv run ruff format --check ./uv run mypy src— clean.fromagerbinary (not mocked), for both affected versions:.zip(0.8.1 is genuinely.tar.gz).lightwell-source-to-sdist+lightwell-build-wheelsfor h11 0.6.0 and reproduced the exact reported failure — Fromager re-downloaded a freshh11-0.6.0.zipand failed withPrimary wheel filename version mismatch: h11-0.6.0-1-py2.py3-none-any.whl..tar.gzlocally (no download) and buildsh11-0.6.0+rhlw.0-1-py2.py3-none-any.whl, passing the version gate. Same result confirmed for h11 0.7.0 (h11-0.7.0+rhlw.0-1-py2.py3-none-any.whl).calunga-python, so re-triggering them for real requires a throwaway re-detection workaround there; the local reproduction above exercises the identical code path and failure/success signal.