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

Can not install specific versions because of broken index type assets for PyPI hosted repository caused by Reconcile task

Details

    • 5
    • NXRM Immortals Sprint 36, NXRM Immortals Sprint 37, NXRM Immortals Sprint 38
    • 2
    • non-concept
    • 2

    Description

      ISSUE:

      Occasionally the index of the pypi hosted repository becomes out-of-sync, and when this happens, there is no functionality in Nexus UI to force rebuilding this index.
      The out-of-sync means the versions of specific component was uploaded but not listed under "/repository/pypi-hosted/simple/<component>/".

      This makes some versions not installable via pypi group repository.

      REPRODUCE STEPS:

      One way to reproduce this issue is using the Reconcile task.

      1. Upload the Unit-0.2.3.tar.gz attached in NEXUS-32466 into a pypi hosted repo.
      2. Access /repository/pypi-hosted/simple/unit/ and the version 0.2.3 should be displayed.
      3. Delete this component.
      4. Edit <UUID>.properties file to remove "deleted=true" line.
      5. Run the reconcile task.
      6. Access /repository/pypi-hosted/simple/unit/ and no 0.2.3, but /repository/pypi-hosted/simple/Unit/ now shows this version.

      EXPECTED:

      Reconcile should create correct index assets for hosted repo (by probably inserting small letter component names).

      Similar to NPM hosted and Maven metadata, PyPi hosted (and probably group) repository may need some task to rebuild or delete the asset_kind = INDEX.
      Also, it would be nicer if the task will allow to specify the component name.

      Also, from the DEBUG log, I see the following line:

      2022-06-03 05:54:33,109+0000 DEBUG [qtp1059803938-991]  admin org.sonatype.nexus.repository.storage.AssetEntityAdapter - Finding assets with query: select from asset where (component.name = :p0) and (bucket=#20:16) order by name desc, parameters: {p0=unit}
      

      Wouldn't it be safer if it used "component.ci_name"?

      Attachments

        Issue Links

          Activity

            People

              spryhoda Sergii Pryhoda
              hosako Hajime Osako
              Michael Oliverio Michael Oliverio
              NXRM - Optimus
              Sergii Pryhoda Sergii Pryhoda
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                tigCommentSecurity.panel-title