Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-23406

Pypi: Reconcile component database from blob store breaks packages with normalised names

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.20.1, 3.21.2, 3.22.0, 3.27.0
    • Fix Version/s: None
    • Component/s: PyPI, Scheduled Tasks
    • Labels:

      Description

      This issue can be reproduced on latest docker release (3.22.0-02)

      Create a pypi hosted repo and upload a package with a name starting with a capital letter

      # twine upload --repository-url http://localhost:8081/repository/pypi/ -u admin -p password MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl
      

      Right after that, we can see a "markupsafe" folder while browsing repository, and markupsafe is available in pip

      # pip download MarkupSafe                          
      Looking in indexes: http://localhost:8081/repository/pypi/simple
      
      Collecting MarkupSafe
      
        Downloading http://localhost:8081/repository/pypi/packages/markupsafe/1.1.1/MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl (24 kB)
      
        Saved ./MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl
      
      Successfully downloaded MarkupSafe
      

      Run "Reconcile component database from blob store" task, we see some traces in the logs

      2020-04-06 09:37:14,166+0000 INFO  [quartz-4-thread-3] *SYSTEM org.sonatype.nexus.blobstore.restore.pypi.internal.PyPiRestoreBlobStrategy - Restored asset, blob store: default, repository: pypi, path: simple/markupsafe/, blob name: simple/markupsafe/, blob id: 144e3a81-b
      80d-40b2-ac47-3a60a096faba
      2020-04-06 09:37:14,258+0000 INFO  [quartz-4-thread-3] *SYSTEM org.sonatype.nexus.blobstore.restore.pypi.internal.PyPiRestoreBlobStrategy - Restored asset, blob store: default, repository: pypi, path: packages/markupsafe/1.1.1/MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_
      64.whl, blob name: packages/markupsafe/1.1.1/MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl, blob id: 6032d68d-6b59-40ef-ba47-6722c495b312
      

      After that, we can see 2 folders in repo view: "markupsafe" and "MarkupSafe", and pip fails to find the package

      fanch@deb-lat:~/env$ ./bin/pip download -i http://localhost:8081/repository/pypi/simple MarkupSafe                                          
      Looking in indexes: http://localhost:8081/repository/pypi/simple
      ERROR: Could not find a version that satisfies the requirement MarkupSafe (from versions: none)
      ERROR: No matching distribution found for MarkupSafe
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              Francois Francois Eleouet
              Last Updated By:
              Joe Tom Joe Tom
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Date of First Response:

                  tigCommentSecurity.panel-title