Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-7408

Artifactory fails to find a PyPI package in a virtual repository if the version exists in local pypi repo and not in a remote pypi repo

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 3.6.0, 3.9.2, 3.9.4
    • Fix Version/s: 4.7.3
    • Component/s: PyPI
    • Labels:

      Description

      When trying to "pip install package==version --index-url <URL_OF_ARTIFACTORY>" using a virtual repository that aggregates a local PyPI repository and the pypi.python.org public remote repository for a package that a specific version of it exists in a local PyPI repository and doesn't exist in the remote repository, Artifactory fails to find it and the installation process fails.
      If you remove the remote repository from the virtual repository (meaning that only the local repository is selected under the virtual) Artifactory does manage to find that package.

      Steps to reproduce:
      1. Create a local PyPI repository "pypi-local" and a public repository "pypi-remote" with the url: "http://pypi.python.org". Create a virutal PyPI repository "pypi-virtual" and aggregate the local and the remote PyPI repositories.
      2. Download the package Flask-RESTful-0.2.2.tar.gz and extract it using "tar zxf Flask-RESTful-0.2.2.tar.gz", edit the setup.py file and the PKG-INFO to change the version from 0.2.2 to 0.2.2dev. Rename the folder to Flask-RESTful-0.2.2dev and pack it using "tar -zcvf Flask-RESTful-0.2.2dev.tar.gz Flask-RESTful-0.2.2dev".
      3. Deploy the file to Artifactory manually using a REST query:
      "curl -X PUT -u<user>:<password> -T Flask-RESTful-0.2.2dev.tar.gz "http://localhost:8081/artifactory/pypi-local/Flask-RESTful-0.2.2dev.tar.gz;pypi.name=Flask-RESTful;pypi.version=0.2.2dev". Wait about 60 seconds until the reindex process begins for the local PyPI repository.
      4. Run: "pip install Flask-RESTful==0.2.2dev --index-url http://localhost:8081/artifactory/api/pypi/pypi-virtual/simple"
      5. The process will fail saying that the package was not found.

      Note: the spec says "All comparisons of distribution names MUST be case insensitive, and MUST consider hyphens and underscores to be equivalent."

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shayy Shay Yaakov (Inactive)
                Reporter:
                kafka Gal Brender (Inactive)
              • Votes:
                24 Vote for this issue
                Watchers:
                27 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: