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

GroupFacetImpl#isStale should not fail request if CacheInfo is missing

    XMLWordPrintable

    Details

    • Story Points:
      0

      Description

      GroupFacetImpl#isStale should be more lenient in its checking of whether CacheInfo is missing. Instead, it should assume in both group/proxy code that the asset is stale if CacheInfo is missing, and log a warning.

      https://github.com/sonatype/nexus-public/blob/f4316cbb68f776d4af2dafe1aca146c138783e50/components/nexus-repository/src/main/java/org/sonatype/nexus/repository/group/GroupFacetImpl.java#L242

      Example of failed request:

      org.sonatype.nexus.repository.httpbridge.internal.ViewServlet - Failure servicing: GET /repository/xxx/yyy

      java.lang.IllegalStateException: Missing: org.sonatype.nexus.repository.cache.CacheInfojava.lang.IllegalStateException: Missing: org.sonatype.nexus.repository.cache.CacheInfo at com.google.common.base.Preconditions.checkState(Preconditions.java:504) at org.sonatype.nexus.common.collect.AttributesMap.require(AttributesMap.java:207) at org.sonatype.nexus.repository.group.GroupFacetImpl.isStale(GroupFacetImpl.java:243) at org.sonatype.nexus.repository.npm.internal.NpmGroupFacet.getFromCache(NpmGroupFacet.java:222) at org.sonatype.nexus.repository.npm.internal.NpmGroupFacet$getFromCache.call(Unknown Source) at org.sonatype.nexus.repository.npm.internal.NpmGroupPackageHandler.buildMergedPackageRoot(NpmGroupPackageHandler.groovy:68)

      Update:  I've attached a patch which fixes this issue for Nexus Repo 3.18.1-01.  To apply this patch, download the attached jar and replace  this file in the installation with it:

      nexus-3.18.1-01/system/org/sonatype/nexus/nexus-repository/3.18.1-01/nexus-repository-3.18.1-01.jar

      Then restart Nexus Repo.

      The sha1 checksum of the attached jar is: 

      fc6d69a387e60370aed07d15fb8c6318602351ea

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            hardeepn Hardeep Nagra
            Last Updated By:
            Peter Lynch
            Team:
            NXRM - Cypher
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title