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

Nexus PyPi proxy repo expects remote to have "/simple" endpoint.

    Details

    • Type: Bug
    • Status: New
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.36.0
    • Fix Version/s: None
    • Component/s: PyPI
    • Labels:
    • Notability:
      3

      Description

      Any attempt to create a proxy repository for remote URLs like https://pypi.fury.io/thinkdataworks causes failure, because such remote URLs does not have the "/simple" endpoint.

      Users can directly download packages from remote but not via nexus.

      # python3 -m pip download namara-python -vvv --no-cache-dir --no-deps -i https://pypi.fury.io/thinkdataworks
      

      It fails if accessed via nexus as pypi-proxy repo.

      Example-1). Without using "/simple" in the URL.

      # python3 -m pip  download namara-python -vvv --no-cache-dir --no-deps -i http://admin:admin123@localhost:8081/repository/pypi-proxy-gemfuery --trusted-host localhost
      
      
      .
      .
      http://localhost:8081 "GET /repository/pypi-proxy-gemfuery/namara-python/ HTTP/1.1" 200 2087
        Skipping link: not a file: http://localhost:8081/ (from http://localhost:8081/repository/pypi-proxy-gemfuery/namara-python/)
        Skipping link: not a file: http://localhost:8081/#browse/browse:pypi-proxy-gemfuery (from http://localhost:8081/repository/pypi-proxy-gemfuery/namara-python/)
        Skipping link: not a file: http://localhost:8081/service/rest/repository/browse/pypi-proxy-gemfuery/ (from http://localhost:8081/repository/pypi-proxy-gemfuery/namara-python/)
      Given no hashes to check 0 links for project 'namara-python': discarding no candidates
      ERROR: Could not find a version that satisfies the requirement namara-python (from versions: none)
      Removed build tracker: '/tmp/pip-req-tracker-9g4w75ra'
      ERROR: No matching distribution found for namara-python
      

      request.log

      127.0.0.1 - admin [03/Nov/2021:11:56:35 +1100] "GET /repository/pypi-proxy-gemfuery/namara-python/ HTTP/1.1" 200 - 2087 11 "pip/20.0.2 {"ci":null,"cpu":"x86_64","distro":{"id":"focal","libc":{"lib":"glibc","version":"2.31"},"name":"Ubuntu","version":"20.04"},"implementation":{"name":"CPython","version":"3.8.10"},"installer":{"name":"pip","version":"20.0.2"},"openssl_version":"OpenSSL 1.1.1f  31 Mar 2020","python":"3.8.10","setuptools_version":"58.2.0","system":{"name":"Linux","release":"5.11.0-37-generic"}}" [qtp47913991-621]
      

      Example-2). With "/simple" we get 404 as usual as the remote does not have "/simple" endpoint.

      # python3 -m pip  download namara-python -vvv --no-cache-dir --no-deps -i http://localhost:8081/repository/pypi-proxy-gemfuery/simple --trusted-host localhost
      
      .
      .
      http://localhost:8081 "GET /repository/pypi-proxy-gemfuery/simple/namara-python/ HTTP/1.1" 404 1790
      Could not fetch URL http://localhost:8081/repository/pypi-proxy-gemfuery/simple/namara-python/: 404 Client Error: Not Found for url: http://localhost:8081/repository/pypi-proxy-gemfuery/simple/namara-python/ - skipping
      Given no hashes to check 0 links for project 'namara-python': discarding no candidates
      ERROR: Could not find a version that satisfies the requirement namara-python (from versions: none)
      Removed build tracker: '/tmp/pip-req-tracker-8n14jgb_'
      ERROR: No matching distribution found for namara-python
      

      request.log

       127.0.0.1 - admin [03/Nov/2021:11:54:02 +1100] "GET /repository/pypi-proxy-gemfuery/simple/namara-python/ HTTP/1.1" 404 - 1790 1343 "pip/20.0.2 {"ci":null,"cpu":"x86_64","distro":{"id":"focal","libc":{"lib":"glibc","version":"2.31"},"name":"Ubuntu","version":"20.04"},"implementation":{"name":"CPython","version":"3.8.10"},"installer":{"name":"pip","version":"20.0.2"},"openssl_version":"OpenSSL 1.1.1f  31 Mar 2020","python":"3.8.10","setuptools_version":"58.2.0","system":{"name":"Linux","release":"5.11.0-37-generic"}}" [qtp47913991-609]
      

       

      Expectation:

      If a package can be downloaded and installed directly from a remote repository https://pypi.fury.io/thinkdataworks without any issue then when attempting to do the same via Nexus Pypi-Proxy repository also should work without any issue.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            jsensharma Jay Kumar SenSharma
            Last Updated By:
            Grace Lee Grace Lee
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Date of First Response:

                tigCommentSecurity.panel-title