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

Metadata query cache age and Maximum metadata age timeouts are ignored for metadata requests

    XMLWordPrintable

    Details

      Description

      Issue:

      When making Nuget v3 requests for metadata, the cache is never expiring, therefore the metadata is not updated with latest versions. The Metadata query cache age and Maximum metadata age timeouts are ignored for nuget v3 metadata requests.

      Steps to reproduce:

      1) Setup a remote Nexus with nuget hosted repo

      2) Upload jquery 3.5.0 nuget package to remote Nexus nuget hosted repo

      3) Setup a local Nexus with Nuget proxy using v3 index.json url point to the remote Nexus nuget hosted repo. Set following cache timeouts

      Metadata query cache age to 3 seconds

      Maximum metadata age to 1 minute

      Maximum component age remains at default 1440 minutes

      5) Make a request for the jquery metadata from the local proxy instance. Version 3.5.0 is displayed.

      curl http://localhost:8081/repository/nuget-centos-dell-proxy/v3/content/0/jquery/index.json
      
      {"versions":["3.5.0"]}
      

      6) Upload jquery 3.5.0.1 nuget package to remote Nexus nuget hosted repo.

      7) Wait for more that 1 minute

      8) Make a request for the jquery metadata from the local proxy instance. Only version 3.5.0 is displayed and version 3.5.0.1 is missing even though the metadata cache should have expired. 

      curl http://localhost:8081/repository/nuget-centos-dell-proxy/v3/content/0/jquery/index.json
      
      {"versions":["3.5.0"]}

      9) After clicking on "Invalidate Cache" on the proxy repo, only then request will fetch the latest metadata.

      curl http://localhost:8081/repository/nuget-centos-dell-proxy/v3/content/0/jquery/index.json 
      
      {"versions":["3.5.0","3.5.0.1"]}
      

      Expected behavior:

      The metadata cache timeout settings should have cleared the nuget v3 metadata cache and the latest metadata fetched on next request. 

      Workaround:

      The Maximum component age timeout does clear the Nuget v3 metadata, so that could be reduced to something like 30 - 60 minutes to ensure the Nuget v3 metadata is cleared on regular basis.

        Attachments

          Activity

            People

            Assignee:
            aishchenko Artem Ishchenko
            Reporter:
            msurani Mahendra Surani
            Last Updated By:
            Joseph Stephens
            Team:
            NXRM - Trinity
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title

                  PagerDuty