Skip to content

Pull-through caching does not create the metadata artifact for wheels #1087

Closed

Description

@gerrod3

Version
3.24

When using pull-through caching if you pull a wheel that has metadata artifact the content will be created but the metadata artifact won't be saved even though the metadata_sha256 field gets set. Thus when doing a second request, if the content was added to the repository, pip will try to fetch the metadata file and fail.

Activity

  1. Kimahriman commented on Feb 5, 2026

    @Kimahriman

    Is the solution to just create the metadata artifact directly off the wheels? So pulp would never interact with the .metadata files in the upstream, since it creates the metadata info/sha256 directly off the wheel anyway. Is it as simple as updating init_from_artifact_and_relative_path to create a metadata artifact and return that in the tuple structure?

  2. added a commit that references this issue on Feb 5, 2026
    00edbff
  3. gerrod3 commented on Feb 5, 2026

    @gerrod3
    ContributorAuthor

    @Kimahriman Yep, I've updated #1086 with a second commit to fix this issue as well.

  4. added a commit that references this issue on Feb 6, 2026
    9e2bd40
  5. DNZKOC commented on Mar 16, 2026

    @DNZKOC

    I dont know if its a problem from my site but I still get exactly the described problems with downloading python packages from a pull-through caching remote.

    My Pulp Repository creation:

    
    pulp python remote create --name=pypi-mirror2 --url=https://pypi.org/ --policy=on_demand
    pulp python repository create --name=pypi-mirror2
    pulp python publication create --repository=pypi-mirror2
    pulp python distribution create --name=pypi-mirror2 --base-path=pypi-mirror2 --repository=pypi-mirror2
    pulp python distribution update --name pypi-mirror2 --remote pypi-mirror2
    

    If I now install for example pandas via pip it works just fine. If i then try to install it again in another venv it fails with such an error:
    Collecting pandas ERROR: HTTP error 404 while getting https://<my-domain>com:443/pulp/content/pypi-mirror2/pandas-3.0.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata ERROR: 404 Client Error: Error while fetching from upstream remote(https://pypi.org/pandas-3.0.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata): Not Found for url: https://<my-domain>:443/pulp/content/pypi-mirror2/pandas-3.0.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.metadata.

  6. gerrod3 commented on Mar 16, 2026

    @gerrod3
    ContributorAuthor

    @DNZKOC The problem is that pull-through caching is not supported when using publications. This is our fault for not properly updating the docs, but currently we do not recommend using publications at all with pulp-python. All the new features we've been adding, pull-through caching, simple json, attestations..., they all were built around the live endpoints at /pypi/ which don't require publications. Creating a publication for a repository will cause the live endpoints to try to use that publication, but since the publications don't have support for any of the new features you will end up with broken behavior outside of very basic pip installs. So I would go ahead and delete all the publications you have created, turn off autopublish=True on any repository, and unset any distribution's publication field replacing it with repository or repository_version. I'm going to get to work on #1000.

  7. DNZKOC commented on Mar 17, 2026

    @DNZKOC

    @gerrod3 Thank you very much for the fast answer. I just created a new repository/distribution without a publication and everything worked just fine. And yes the documentation was misleading in that regard, I should have looked into the open issues tho.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions