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

Artifactory caches non-existent PyPi packages file in remote cache repositories

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Artifactory, PyPI
    • Labels:
      None
    • Environment:

      Environment details: 

      • Artifactory 7.38.10
      • DB type & Version: Derby
      • Is this an HA env? No
      • Is this On-Prem or Saas? On-prem
    • Severity:
      Medium
    • Location:
      External

      Description

      Problem description: 

      When failing to resolve a PyPi package from a Virtual repository, Artifactory caches an empty file under the remote-cache repository

      What is the impact on the customer?

      Invalid cache repository causes issues with artifact resolution.

      What is the expected behavior? 

      An empty package file should not appear in the remote-cache repository.

      Steps to reproduce:

      1. Install the latest version of Artifactory

      2. Create a default “Quick SetUp” of virtual PyPi repo with Local and remote repo inside

      3. Attempt to install a non-existing package:

      python3 -m pip install packagename -i https://JFROG_URL/artifactory/api/pypi/demo-pypi/soap

      4. Check the cache repository:  

      curl https://JFROG_URL/artifactory/api/storage/demo-pypi-remote-cache/soap/packagename
      {
        "repo" : "demo-pypi-remote-cache",
        "path" : "/soap/packagename",
        "created" : "2022-05-29T11:05:26.296Z",
        "createdBy" : "admin",
        "lastModified" : "2022-05-29T11:05:26.207Z",
        "modifiedBy" : "admin",
        "lastUpdated" : "2022-05-29T11:05:26.299Z",
        "downloadUri" : "https://JFROG_URL/artifactory/demo-pypi-remote-cache/soap/packagename",
        "remoteUrl" : "https://files.pythonhosted.org/soap/packagename",
        "mimeType" : "application/octet-stream",
        "size" : "0",
        "checksums" : {
          "sha1" : "da39a3ee5e6b4b0d3255bfef95601890afd80709",
          "md5" : "d41d8cd98f00b204e9800998ecf8427e",
          "sha256" : "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
        },
        "originalChecksums" : {
          "sha256" : "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
        },
        "uri" : "https://JFROG_URL/artifactory/api/storage/demo-pypi-remote-cache/soap/packagename"
      }

      5.  Artifactory fails to install PyPi soap package:

      python3 -m pip install soap -i https://JFROG_URL/artifactory/api/pypi/demo-pypi/soap 
      Looking in indexes: https://JFROG_URL/artifactory/api/pypi/demo-pypi/soapUser for JFROG_URL: adminWARNING: Skipping page https://JFROG_URL/artifactory/api/pypi/demo-pypi/soap/soap/ because the GET request got Content-Type: application/octet-stream.The only supported Content-Type is text/htmlERROR: Could not find a version that satisfies the requirement soap (from versions: none)ERROR: No matching distribution found for soap
      

       

        Attachments

          Activity

              People

              Assignee:
              Unassigned
              Reporter:
              fadir Fadi Rouhana
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Sync Status

                  Connection: RTFACT Sync
                  RTMID-27209 -
                  SYNCHRONIZED
                  • Last Sync Date: