Skip to content

Make prebuilt replay replace the stale wheel in the local mirror #1432

Open

Description

@LalatenduMohanty

A successful prebuilt download can leave later builds using an older wheel. This silently builds with different contents from the artifact just downloaded.

To reproduce:

  1. Index an old wheel from wheels-repo/downloads/.
  2. Run download-sequence --include-wheels to fetch a configured prebuilt wheel with the same filename but different contents.
  3. Refresh the mirror.

The fresh file is staged in wheels_prebuilt, but the mirror still serves the old file.

Expected: The mirror and subsequent builds use the freshly downloaded wheel. Add a regression test with identical filenames and different contents.

Observed on new-resolver-config at ff8d7683. Related: #1414 — review comment.

Activity

  1. self-assigned this
    on Nov 2, 2026
  2. LalatenduMohanty commented on Nov 2, 2026

    @LalatenduMohanty
    MemberAuthor

    This doesn't block #1414:

    • Not a regression. main has the same behavior for legacy pre_built: true: download-sequence saves the fresh wheel to wheels-repo/prebuilt, and the mirror links the older same-named copy in wheels-repo/downloads first.
    • Only affects source: packages, and only download-sequence. build-sequence already points the mirror at the fresh wheel (fix(resolver): honor configured prebuilt wheel resolvers #1393).
    • Rare. It needs two different wheels with the same filename. PyPI never allows that; it takes a private index that re-uploads a filename, or a locally built wheel that collides with a prebuilt one.
    • Easy to avoid. Starting from a fresh wheels-repo avoids it.

    The underlying cause is broader: fromager treats a wheel filename as its identity. For example, _is_wheel_built() reuses any same-named wheel on the local server. A proper fix should address that, not just this replay path.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions