diff --git a/assemblies/nexus-base-feature/pom.xml b/assemblies/nexus-base-feature/pom.xml index 829235c4e6..a824783fc5 100644 --- a/assemblies/nexus-base-feature/pom.xml +++ b/assemblies/nexus-base-feature/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-base-feature diff --git a/assemblies/nexus-base-overlay/pom.xml b/assemblies/nexus-base-overlay/pom.xml index d6afdd328b..0a16e4bfd1 100644 --- a/assemblies/nexus-base-overlay/pom.xml +++ b/assemblies/nexus-base-overlay/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-base-overlay diff --git a/assemblies/nexus-base-template/pom.xml b/assemblies/nexus-base-template/pom.xml index 907c46fd64..3f4a4cf178 100644 --- a/assemblies/nexus-base-template/pom.xml +++ b/assemblies/nexus-base-template/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-base-template diff --git a/assemblies/nexus-boot-feature/pom.xml b/assemblies/nexus-boot-feature/pom.xml index 14d741c1cb..e543b23ba4 100644 --- a/assemblies/nexus-boot-feature/pom.xml +++ b/assemblies/nexus-boot-feature/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-boot-feature diff --git a/assemblies/nexus-core-feature/pom.xml b/assemblies/nexus-core-feature/pom.xml index 7f57153d79..486bcc27ee 100644 --- a/assemblies/nexus-core-feature/pom.xml +++ b/assemblies/nexus-core-feature/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-core-feature diff --git a/assemblies/nexus-startup-feature/pom.xml b/assemblies/nexus-startup-feature/pom.xml index 90a3d9906e..882321e188 100644 --- a/assemblies/nexus-startup-feature/pom.xml +++ b/assemblies/nexus-startup-feature/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.assemblies nexus-assemblies - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-startup-feature diff --git a/assemblies/pom.xml b/assemblies/pom.xml index 91ba64239f..e31ff92d34 100644 --- a/assemblies/pom.xml +++ b/assemblies/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.assemblies @@ -46,7 +46,7 @@ org.sonatype.nexus nexus-components pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -54,7 +54,7 @@ org.sonatype.nexus.plugins nexus-plugins pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import diff --git a/buildsupport/all/pom.xml b/buildsupport/all/pom.xml index f1337e27b4..849017e008 100644 --- a/buildsupport/all/pom.xml +++ b/buildsupport/all/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-all @@ -35,7 +35,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-commons pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -43,7 +43,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-db pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -51,7 +51,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-goodies pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -59,7 +59,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-groovy pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -67,7 +67,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-guice pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -75,7 +75,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-httpclient pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -83,7 +83,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-internal pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -91,7 +91,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-jetty pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -99,7 +99,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-jruby pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -107,7 +107,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-logging pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -115,7 +115,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-maven pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -123,7 +123,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-metrics pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -131,7 +131,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-osgi pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -139,7 +139,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-other pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -147,7 +147,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-rest pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -155,7 +155,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-security pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -163,7 +163,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-testing pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -171,7 +171,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-ui pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import diff --git a/buildsupport/commons/pom.xml b/buildsupport/commons/pom.xml index c2e1d4db21..075f2e6b3f 100644 --- a/buildsupport/commons/pom.xml +++ b/buildsupport/commons/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-commons diff --git a/buildsupport/db/pom.xml b/buildsupport/db/pom.xml index b5ccbf9968..5fb5f90749 100644 --- a/buildsupport/db/pom.xml +++ b/buildsupport/db/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-db diff --git a/buildsupport/extjs-maven-plugin/pom.xml b/buildsupport/extjs-maven-plugin/pom.xml index d0aea970dc..e509e760ea 100644 --- a/buildsupport/extjs-maven-plugin/pom.xml +++ b/buildsupport/extjs-maven-plugin/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT extjs-maven-plugin @@ -37,7 +37,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import diff --git a/buildsupport/goodies/pom.xml b/buildsupport/goodies/pom.xml index 78e4cf9bf3..67c477ad61 100644 --- a/buildsupport/goodies/pom.xml +++ b/buildsupport/goodies/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-goodies @@ -28,7 +28,7 @@ pom - 2.3.7 + 2.3.8 diff --git a/buildsupport/groovy/pom.xml b/buildsupport/groovy/pom.xml index 1247d01bc0..f6d8d457a1 100644 --- a/buildsupport/groovy/pom.xml +++ b/buildsupport/groovy/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-groovy diff --git a/buildsupport/guice/pom.xml b/buildsupport/guice/pom.xml index 04738ecb1b..588c1188f3 100644 --- a/buildsupport/guice/pom.xml +++ b/buildsupport/guice/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-guice diff --git a/buildsupport/httpclient/pom.xml b/buildsupport/httpclient/pom.xml index a7d148f4be..b3acde6d3b 100644 --- a/buildsupport/httpclient/pom.xml +++ b/buildsupport/httpclient/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-httpclient diff --git a/buildsupport/internal/pom.xml b/buildsupport/internal/pom.xml index b28b8544ab..bd3899a901 100644 --- a/buildsupport/internal/pom.xml +++ b/buildsupport/internal/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-internal diff --git a/buildsupport/it-deps/pom.xml b/buildsupport/it-deps/pom.xml index 591d1e4f98..b3e7924b94 100644 --- a/buildsupport/it-deps/pom.xml +++ b/buildsupport/it-deps/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-it-deps diff --git a/buildsupport/jetty/pom.xml b/buildsupport/jetty/pom.xml index c0310ad6be..f3352b7a49 100644 --- a/buildsupport/jetty/pom.xml +++ b/buildsupport/jetty/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-jetty diff --git a/buildsupport/jruby/pom.xml b/buildsupport/jruby/pom.xml index ba217a98ee..14365dc513 100644 --- a/buildsupport/jruby/pom.xml +++ b/buildsupport/jruby/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-jruby diff --git a/buildsupport/logging/pom.xml b/buildsupport/logging/pom.xml index d9b1d44b95..933dfafb1d 100644 --- a/buildsupport/logging/pom.xml +++ b/buildsupport/logging/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-logging diff --git a/buildsupport/maven/pom.xml b/buildsupport/maven/pom.xml index 0610389d53..e0630d7042 100644 --- a/buildsupport/maven/pom.xml +++ b/buildsupport/maven/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-maven diff --git a/buildsupport/metrics/pom.xml b/buildsupport/metrics/pom.xml index da299fd85b..4a6e3e86cc 100644 --- a/buildsupport/metrics/pom.xml +++ b/buildsupport/metrics/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-metrics diff --git a/buildsupport/osgi/pom.xml b/buildsupport/osgi/pom.xml index 22c8bcc3b4..f2cf658118 100644 --- a/buildsupport/osgi/pom.xml +++ b/buildsupport/osgi/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-osgi diff --git a/buildsupport/other/pom.xml b/buildsupport/other/pom.xml index 916c457e25..cf22e9411a 100644 --- a/buildsupport/other/pom.xml +++ b/buildsupport/other/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-other @@ -345,7 +345,7 @@ com.amazon.ion ion-java - 1.8.0 + 1.10.5 diff --git a/buildsupport/pom.xml b/buildsupport/pom.xml index 9235f50dd9..769dee1f85 100644 --- a/buildsupport/pom.xml +++ b/buildsupport/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.buildsupport diff --git a/buildsupport/rest/pom.xml b/buildsupport/rest/pom.xml index 5d3343dfde..6c451f825b 100644 --- a/buildsupport/rest/pom.xml +++ b/buildsupport/rest/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-rest diff --git a/buildsupport/scripts/pom.xml b/buildsupport/scripts/pom.xml index a429229ab9..0e3c93ceda 100644 --- a/buildsupport/scripts/pom.xml +++ b/buildsupport/scripts/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-scripts @@ -36,7 +36,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import diff --git a/buildsupport/security/pom.xml b/buildsupport/security/pom.xml index 75f59665fe..b16bf24f50 100644 --- a/buildsupport/security/pom.xml +++ b/buildsupport/security/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-security diff --git a/buildsupport/testing/pom.xml b/buildsupport/testing/pom.xml index 6336faa45d..3fe806741d 100644 --- a/buildsupport/testing/pom.xml +++ b/buildsupport/testing/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-testing diff --git a/buildsupport/ui/pom.xml b/buildsupport/ui/pom.xml index a98f7e2e70..5f00ae1a53 100644 --- a/buildsupport/ui/pom.xml +++ b/buildsupport/ui/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-buildsupport-ui diff --git a/components/nexus-audit/pom.xml b/components/nexus-audit/pom.xml index d8c2263df2..03feb08922 100644 --- a/components/nexus-audit/pom.xml +++ b/components/nexus-audit/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-audit diff --git a/components/nexus-base/pom.xml b/components/nexus-base/pom.xml index e67447cd6c..ae39c2d2aa 100644 --- a/components/nexus-base/pom.xml +++ b/components/nexus-base/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-base diff --git a/components/nexus-blobstore-api/pom.xml b/components/nexus-blobstore-api/pom.xml index 150c9552ad..45b222fad8 100644 --- a/components/nexus-blobstore-api/pom.xml +++ b/components/nexus-blobstore-api/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-blobstore-api diff --git a/components/nexus-blobstore-file/pom.xml b/components/nexus-blobstore-file/pom.xml index 7237d1834b..13531fbdaa 100644 --- a/components/nexus-blobstore-file/pom.xml +++ b/components/nexus-blobstore-file/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-blobstore-file diff --git a/components/nexus-blobstore/pom.xml b/components/nexus-blobstore/pom.xml index 89772b5d1d..2563bbda1a 100644 --- a/components/nexus-blobstore/pom.xml +++ b/components/nexus-blobstore/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-blobstore diff --git a/components/nexus-bootstrap/pom.xml b/components/nexus-bootstrap/pom.xml index 2d3b23e2dc..6b69ca901d 100644 --- a/components/nexus-bootstrap/pom.xml +++ b/components/nexus-bootstrap/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-bootstrap diff --git a/components/nexus-cache/pom.xml b/components/nexus-cache/pom.xml index 42af2deb53..b808a39f06 100644 --- a/components/nexus-cache/pom.xml +++ b/components/nexus-cache/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-cache diff --git a/components/nexus-capability/pom.xml b/components/nexus-capability/pom.xml index c9394db4c8..1f63c8748c 100644 --- a/components/nexus-capability/pom.xml +++ b/components/nexus-capability/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-capability diff --git a/components/nexus-cleanup-config/pom.xml b/components/nexus-cleanup-config/pom.xml index f6cfaa22e5..c52c1fb45d 100644 --- a/components/nexus-cleanup-config/pom.xml +++ b/components/nexus-cleanup-config/pom.xml @@ -19,7 +19,7 @@ nexus-components org.sonatype.nexus - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT 4.0.0 diff --git a/components/nexus-cleanup/pom.xml b/components/nexus-cleanup/pom.xml index 93c350fe6d..8ab9d08661 100644 --- a/components/nexus-cleanup/pom.xml +++ b/components/nexus-cleanup/pom.xml @@ -19,7 +19,7 @@ nexus-components org.sonatype.nexus - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT 4.0.0 diff --git a/components/nexus-cleanup/src/main/java/org/sonatype/nexus/cleanup/internal/content/service/CleanupServiceImpl.java b/components/nexus-cleanup/src/main/java/org/sonatype/nexus/cleanup/internal/content/service/CleanupServiceImpl.java index 2932840df9..3e6aeee483 100644 --- a/components/nexus-cleanup/src/main/java/org/sonatype/nexus/cleanup/internal/content/service/CleanupServiceImpl.java +++ b/components/nexus-cleanup/src/main/java/org/sonatype/nexus/cleanup/internal/content/service/CleanupServiceImpl.java @@ -22,6 +22,7 @@ import java.util.function.BooleanSupplier; import java.util.stream.Stream; +import javax.annotation.Nullable; import javax.inject.Inject; import javax.inject.Named; import javax.inject.Singleton; @@ -34,6 +35,7 @@ import org.sonatype.nexus.cleanup.storage.CleanupPolicy; import org.sonatype.nexus.cleanup.storage.CleanupPolicyStorage; import org.sonatype.nexus.repository.Repository; +import org.sonatype.nexus.repository.cleanup.CleanupFeatureCheck; import org.sonatype.nexus.repository.content.fluent.FluentComponent; import org.sonatype.nexus.repository.manager.RepositoryManager; import org.sonatype.nexus.repository.task.DeletionProgress; @@ -77,13 +79,16 @@ public class CleanupServiceImpl private final CleanupBrowseServiceFactory browseServiceFactory; + private final CleanupFeatureCheck cleanupFeatureCheck; + @Inject public CleanupServiceImpl(final RepositoryManager repositoryManager, final CleanupPolicyStorage cleanupPolicyStorage, final CleanupMethod cleanupMethod, final GroupType groupType, @Named("${nexus.cleanup.retries:-3}") final int cleanupRetryLimit, - final CleanupBrowseServiceFactory browseServiceFactory) + final CleanupBrowseServiceFactory browseServiceFactory, + @Nullable final CleanupFeatureCheck cleanupFeatureCheck) { this.repositoryManager = checkNotNull(repositoryManager); this.cleanupMethod = checkNotNull(cleanupMethod); @@ -91,6 +96,7 @@ public CleanupServiceImpl(final RepositoryManager repositoryManager, this.groupType = checkNotNull(groupType); this.cleanupRetryLimit = cleanupRetryLimit; this.browseServiceFactory = checkNotNull(browseServiceFactory); + this.cleanupFeatureCheck = cleanupFeatureCheck; } @Override @@ -123,7 +129,9 @@ protected Long deleteByPolicy(final Repository repository, DeletionProgress deletionProgress = new DeletionProgress(cleanupRetryLimit); - if (hasExclusionCriteria(policy.getCriteria()) && !browseService.isApplicableTo(repository.getFormat())) { + // Skip the policy if it somehow has exclusion criteria but exclusion (retain) is not supported by the format. + if (hasExclusionCriteria(policy.getCriteria()) && + (cleanupFeatureCheck==null || !cleanupFeatureCheck.isRetainSupported(repository.getFormat().getValue()))) { log.warn("Skipping policy {} in repository {} since exclusion criteria is not currently supported.", repository.getName(), policy.getName()); diff --git a/components/nexus-cleanup/src/test/java/org/sonatype/nexus/cleanup/internal/content/service/CleanupServiceImplTest.java b/components/nexus-cleanup/src/test/java/org/sonatype/nexus/cleanup/internal/content/service/CleanupServiceImplTest.java index 0441477694..dddbf227ac 100644 --- a/components/nexus-cleanup/src/test/java/org/sonatype/nexus/cleanup/internal/content/service/CleanupServiceImplTest.java +++ b/components/nexus-cleanup/src/test/java/org/sonatype/nexus/cleanup/internal/content/service/CleanupServiceImplTest.java @@ -49,6 +49,7 @@ import static java.util.Collections.singletonMap; import static java.util.stream.Stream.empty; import static org.junit.Assume.assumeFalse; +import static org.junit.Assume.assumeTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doAnswer; @@ -114,6 +115,9 @@ public static Collection data() { @Mock private CleanupBrowseServiceFactory cleanupBrowseFactory; + @Mock + private CleanupFeatureCheck cleanupFeatureCheck; + private CleanupServiceImpl underTest; private boolean useRetainCleanup; @@ -127,7 +131,7 @@ public void setup() throws Exception { when(cleanupBrowseFactory.get(any())).thenReturn(browseService); underTest = new CleanupServiceImpl(repositoryManager, cleanupPolicyStorage, cleanupMethod, - new GroupType(), RETRY_LIMIT, cleanupBrowseFactory); + new GroupType(), RETRY_LIMIT, cleanupBrowseFactory, cleanupFeatureCheck); setupRepository(repository1, POLICY_1_NAME); setupRepository(repository2, POLICY_2_NAME); @@ -153,6 +157,8 @@ public void setup() throws Exception { when(repository2.getFormat()).thenReturn(format); when(repository3.getFormat()).thenReturn(format); when(format.getValue()).thenReturn("maven2"); + + when(cleanupFeatureCheck.isRetainSupported(any())).thenReturn(true); } @Test @@ -208,6 +214,19 @@ public void skipPolicyWithExclusionIfNonPro() { verify(cleanupMethod, never()).run(repository1, Stream.of(component1, component2), cancelledCheck); } + @Test + public void skipPolicyWithExclusionIfUnsupportedFormat() { + assumeTrue(useRetainCleanup); + when(cleanupFeatureCheck.isRetainSupported(any())).thenReturn(false); + when(repositoryManager.browse()).thenReturn(ImmutableList.of(repository1)); + when(cleanupPolicy1.getCriteria()).thenReturn( + ImmutableMap.of(LAST_BLOB_UPDATED_KEY, "1", "retain", "3", "sortBy", "version")); + + underTest.cleanup(cancelledCheck); + + verify(cleanupMethod, never()).run(repository1, Stream.of(component1, component2), cancelledCheck); + } + @Test public void ignoreRepositoryWhenPolicyNameListIsNull() throws Exception { when(repositoryManager.browse()).thenReturn(ImmutableList.of(repository3)); diff --git a/components/nexus-commands/pom.xml b/components/nexus-commands/pom.xml index e9ef8b2217..9e10c14994 100644 --- a/components/nexus-commands/pom.xml +++ b/components/nexus-commands/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-commands diff --git a/components/nexus-common/pom.xml b/components/nexus-common/pom.xml index 86dd28939e..1de1eba855 100644 --- a/components/nexus-common/pom.xml +++ b/components/nexus-common/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-common diff --git a/components/nexus-common/src/main/java/org/sonatype/nexus/common/app/FeatureFlags.java b/components/nexus-common/src/main/java/org/sonatype/nexus/common/app/FeatureFlags.java index 4efb0f0ab3..c2ea8f5c9b 100644 --- a/components/nexus-common/src/main/java/org/sonatype/nexus/common/app/FeatureFlags.java +++ b/components/nexus-common/src/main/java/org/sonatype/nexus/common/app/FeatureFlags.java @@ -105,6 +105,8 @@ public interface FeatureFlags String CLEANUP_DOCKER_RETAIN = "nexus.cleanup.dockerRetain"; + String CLEANUP_USE_SQL = "nexus.cleanup.useSQL"; + String FORMAT_RETAIN_PATTERN = "nexus.cleanup.{format}Retain"; String FIREWALL_QUARANTINE_FIX_ENABLED = "nexus.firewall.quarantineFix.enabled"; diff --git a/components/nexus-core/pom.xml b/components/nexus-core/pom.xml index be3b2860b9..a155197c22 100644 --- a/components/nexus-core/pom.xml +++ b/components/nexus-core/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-core diff --git a/components/nexus-crypto/pom.xml b/components/nexus-crypto/pom.xml index 0f71b92bc7..976c8831c1 100644 --- a/components/nexus-crypto/pom.xml +++ b/components/nexus-crypto/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-crypto diff --git a/components/nexus-datastore-api/pom.xml b/components/nexus-datastore-api/pom.xml index 948a4d8a37..d84275f25a 100644 --- a/components/nexus-datastore-api/pom.xml +++ b/components/nexus-datastore-api/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-datastore-api diff --git a/components/nexus-datastore-mybatis/pom.xml b/components/nexus-datastore-mybatis/pom.xml index 68b8622023..e0865f7b40 100644 --- a/components/nexus-datastore-mybatis/pom.xml +++ b/components/nexus-datastore-mybatis/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-datastore-mybatis diff --git a/components/nexus-datastore/pom.xml b/components/nexus-datastore/pom.xml index a25da2d824..3f41bff84f 100644 --- a/components/nexus-datastore/pom.xml +++ b/components/nexus-datastore/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-datastore diff --git a/components/nexus-distributed-event-service-api/pom.xml b/components/nexus-distributed-event-service-api/pom.xml index cb72036758..8b3bdc866a 100644 --- a/components/nexus-distributed-event-service-api/pom.xml +++ b/components/nexus-distributed-event-service-api/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT diff --git a/components/nexus-elasticsearch/pom.xml b/components/nexus-elasticsearch/pom.xml index bea9e307fa..590dd49130 100644 --- a/components/nexus-elasticsearch/pom.xml +++ b/components/nexus-elasticsearch/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-elasticsearch diff --git a/components/nexus-email/pom.xml b/components/nexus-email/pom.xml index 8eedd0534f..9478ac9794 100644 --- a/components/nexus-email/pom.xml +++ b/components/nexus-email/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-email diff --git a/components/nexus-extdirect/pom.xml b/components/nexus-extdirect/pom.xml index c672a1a514..883fa48902 100644 --- a/components/nexus-extdirect/pom.xml +++ b/components/nexus-extdirect/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-extdirect diff --git a/components/nexus-extender/pom.xml b/components/nexus-extender/pom.xml index be6ea1acd7..6a3abf6db4 100644 --- a/components/nexus-extender/pom.xml +++ b/components/nexus-extender/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-extender diff --git a/components/nexus-features/pom.xml b/components/nexus-features/pom.xml index 43e81117dd..5d22d772c2 100644 --- a/components/nexus-features/pom.xml +++ b/components/nexus-features/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-features diff --git a/components/nexus-formfields/pom.xml b/components/nexus-formfields/pom.xml index ae4669ef9c..70e9b610e0 100644 --- a/components/nexus-formfields/pom.xml +++ b/components/nexus-formfields/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-formfields diff --git a/components/nexus-guice-servlet/pom.xml b/components/nexus-guice-servlet/pom.xml index 2ce014b5cd..d8bd27c96a 100644 --- a/components/nexus-guice-servlet/pom.xml +++ b/components/nexus-guice-servlet/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-guice-servlet diff --git a/components/nexus-httpclient/pom.xml b/components/nexus-httpclient/pom.xml index 9bf91e33c6..662631bea5 100644 --- a/components/nexus-httpclient/pom.xml +++ b/components/nexus-httpclient/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-httpclient diff --git a/components/nexus-jmx/pom.xml b/components/nexus-jmx/pom.xml index d2be7d1fea..1a906b37b3 100644 --- a/components/nexus-jmx/pom.xml +++ b/components/nexus-jmx/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-jmx diff --git a/components/nexus-main/pom.xml b/components/nexus-main/pom.xml index e659c53b49..b455624fe7 100644 --- a/components/nexus-main/pom.xml +++ b/components/nexus-main/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-main diff --git a/components/nexus-mime/pom.xml b/components/nexus-mime/pom.xml index 7deba1d1a8..4a00a79c25 100644 --- a/components/nexus-mime/pom.xml +++ b/components/nexus-mime/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-mime diff --git a/components/nexus-orient-console/pom.xml b/components/nexus-orient-console/pom.xml index c841d25e33..dc56af5fa2 100644 --- a/components/nexus-orient-console/pom.xml +++ b/components/nexus-orient-console/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-orient-console diff --git a/components/nexus-orient/pom.xml b/components/nexus-orient/pom.xml index e6e24aea31..3bbd292453 100644 --- a/components/nexus-orient/pom.xml +++ b/components/nexus-orient/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-orient diff --git a/components/nexus-oss-edition/pom.xml b/components/nexus-oss-edition/pom.xml index ddb4ba5a2e..66774fb96a 100644 --- a/components/nexus-oss-edition/pom.xml +++ b/components/nexus-oss-edition/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-oss-edition diff --git a/components/nexus-pax-exam/pom.xml b/components/nexus-pax-exam/pom.xml index d06a000740..c14ef4d430 100644 --- a/components/nexus-pax-exam/pom.xml +++ b/components/nexus-pax-exam/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-pax-exam diff --git a/components/nexus-pax-logging/pom.xml b/components/nexus-pax-logging/pom.xml index 2b7d8721e5..452ff2f562 100644 --- a/components/nexus-pax-logging/pom.xml +++ b/components/nexus-pax-logging/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-pax-logging diff --git a/components/nexus-plugin-api/pom.xml b/components/nexus-plugin-api/pom.xml index 764e8c2bbf..2a5b6fe2e6 100644 --- a/components/nexus-plugin-api/pom.xml +++ b/components/nexus-plugin-api/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-plugin-api diff --git a/components/nexus-quartz/pom.xml b/components/nexus-quartz/pom.xml index 46e0dfea6b..5ea4e3d0b8 100644 --- a/components/nexus-quartz/pom.xml +++ b/components/nexus-quartz/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-quartz diff --git a/components/nexus-rapture/pom.xml b/components/nexus-rapture/pom.xml index 24b67c167e..fbd0e7fd08 100644 --- a/components/nexus-rapture/pom.xml +++ b/components/nexus-rapture/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-rapture diff --git a/components/nexus-repository-config/pom.xml b/components/nexus-repository-config/pom.xml index f792fd107d..e4878106c9 100644 --- a/components/nexus-repository-config/pom.xml +++ b/components/nexus-repository-config/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository-config diff --git a/components/nexus-repository-content/pom.xml b/components/nexus-repository-content/pom.xml index 12541c9f5c..91f3556b78 100644 --- a/components/nexus-repository-content/pom.xml +++ b/components/nexus-repository-content/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository-content diff --git a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/AssetPathBrowseNodeGenerator.java b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/AssetPathBrowseNodeGenerator.java index fa18e58c67..c7892bcb44 100644 --- a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/AssetPathBrowseNodeGenerator.java +++ b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/AssetPathBrowseNodeGenerator.java @@ -31,6 +31,11 @@ public abstract class AssetPathBrowseNodeGenerator implements BrowseNodeGenerator { + @Override + public boolean hasMultipleAssetsPerComponent() { + return false; + } + @Override public List computeAssetPaths(final Asset asset) { checkNotNull(asset); diff --git a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/BrowseFacetImpl.java b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/BrowseFacetImpl.java index caa222dbc5..ed8a06ef45 100644 --- a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/BrowseFacetImpl.java +++ b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/BrowseFacetImpl.java @@ -132,6 +132,7 @@ public void addPathsToAssets(Collection assetIds) { .map(lookup::find) .filter(Optional::isPresent) .map(Optional::get) + .filter(fluentAsset -> !browseNodeManager.hasAssetNode(fluentAsset)) .forEach(fluentAsset -> createBrowseNodes(fluentAsset, componentsProcessed)); } @@ -150,13 +151,13 @@ public void rebuildBrowseNodes() { log.info("Rebuilding browse nodes for repository {}", getRepository().getName()); - createBrowseNodes(); + createAllBrowseNodes(); } /** * Create browse nodes for every asset and their components in the repository. */ - private void createBrowseNodes() { + private void createAllBrowseNodes() { String repositoryName = getRepository().getName(); try { FluentAssets assets = getRepository().facet(ContentFacet.class).assets(); @@ -192,30 +193,66 @@ private void createBrowseNodes() { } } + /** + * Create browse nodes for an asset and it's component. Using a cache of component ids to limit component + * nodes being recreated + */ private void createBrowseNodes(final FluentAsset asset, final Map componentsProcessed) { - if (!browseNodeManager.hasAssetNode(asset)) { - List assetPaths = browseNodeGenerator.computeAssetPaths(asset); - if (!assetPaths.isEmpty()) { - browseNodeManager.createBrowseNodes(assetPaths, node -> node.setAsset(asset)); - } + if (browseNodeGenerator.hasMultipleAssetsPerComponent()) { + createAssetBrowseNodes(asset); + asset.component().ifPresent(component -> createComponentBrowseNodes(asset, component, componentsProcessed)); } else { - log.debug("Skipping asset {}", asset.path()); + createCombinedAssetAndComponentBrowseNodes(asset); } + } - asset.component().ifPresent(component -> { - Integer internalComponentId = internalComponentId(component); - // null will be returned when adding a key that isn't already in the cache - if (componentsProcessed.put(internalComponentId, internalComponentId) == null) { - List componentPaths = browseNodeGenerator.computeComponentPaths(asset); - if (!componentPaths.isEmpty()) { - browseNodeManager.createBrowseNodes(componentPaths, node -> { - node.setComponent(component); - findPackageUrl(component).map(PackageUrl::toString).ifPresent(node::setPackageUrl); - }); - } + /** + * Create browse nodes for each segment in an asset's path, assigning the asset to the final node + */ + private void createAssetBrowseNodes(final FluentAsset asset) { + List assetPaths = browseNodeGenerator.computeAssetPaths(asset); + if (!assetPaths.isEmpty()) { + browseNodeManager.createBrowseNodes(assetPaths, node -> node.setAsset(asset)); + } + } + + /** + * Create browse nodes for each segment in an asset's component's path, assigning the component to the final node, + * if the asset has a component + */ + private void createComponentBrowseNodes( + final FluentAsset asset, + final Component component, + final Map componentsProcessed) + { + Integer internalComponentId = internalComponentId(component); + // null will be returned when adding a key that isn't already in the cache + if (componentsProcessed.put(internalComponentId, internalComponentId) == null) { + List componentPaths = browseNodeGenerator.computeComponentPaths(asset); + if (!componentPaths.isEmpty()) { + browseNodeManager.createBrowseNodes(componentPaths, node -> { + node.setComponent(component); + findPackageUrl(component).map(PackageUrl::toString).ifPresent(node::setPackageUrl); + }); } - }); + } + } + + /** + * Create browse nodes for each segment in the asset's path, and assign the asset and component to the final node + */ + private void createCombinedAssetAndComponentBrowseNodes(final FluentAsset asset) { + List assetPaths = browseNodeGenerator.computeAssetPaths(asset); + if (!assetPaths.isEmpty()) { + browseNodeManager.createBrowseNodes(assetPaths, node -> { + node.setAsset(asset); + asset.component().ifPresent(component -> { + node.setComponent(component); + findPackageUrl(component).map(PackageUrl::toString).ifPresent(node::setPackageUrl); + }); + }); + } } /** diff --git a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/BrowseNodeGenerator.java b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/BrowseNodeGenerator.java index 3e7d882ce4..f840f5e6fb 100644 --- a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/BrowseNodeGenerator.java +++ b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/BrowseNodeGenerator.java @@ -36,6 +36,12 @@ public interface BrowseNodeGenerator */ List computeComponentPaths(Asset asset); + /** + * Whether this format supports multiple assets per component. Formats that have a 1:1 mapping can streamline some + * queries + */ + boolean hasMultipleAssetsPerComponent(); + /** * Finds the last segment of the given path. */ diff --git a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/ComponentPathBrowseNodeGenerator.java b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/ComponentPathBrowseNodeGenerator.java index 0dba99f995..8f7867776d 100644 --- a/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/ComponentPathBrowseNodeGenerator.java +++ b/components/nexus-repository-content/src/main/java/org/sonatype/nexus/repository/content/browse/ComponentPathBrowseNodeGenerator.java @@ -25,6 +25,11 @@ public abstract class ComponentPathBrowseNodeGenerator extends AssetPathBrowseNodeGenerator { + @Override + public boolean hasMultipleAssetsPerComponent() { + return true; + } + @Override public List computeComponentPaths(final Asset asset) { List assetPaths = computeAssetPaths(asset); diff --git a/components/nexus-repository-services/pom.xml b/components/nexus-repository-services/pom.xml index 2ed1fd91bf..b5fef4f6d7 100644 --- a/components/nexus-repository-services/pom.xml +++ b/components/nexus-repository-services/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository-services diff --git a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/cleanup/CleanupFeatureCheck.java b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/cleanup/CleanupFeatureCheck.java index b889b1dd99..8bdba6ef51 100644 --- a/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/cleanup/CleanupFeatureCheck.java +++ b/components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/cleanup/CleanupFeatureCheck.java @@ -14,6 +14,8 @@ public interface CleanupFeatureCheck { + boolean isSQLCleanupSupported(); + boolean isRetainSupported(String formatName); boolean isProVersion(); diff --git a/components/nexus-repository-view/pom.xml b/components/nexus-repository-view/pom.xml index 3fd36b8166..0b136571e6 100644 --- a/components/nexus-repository-view/pom.xml +++ b/components/nexus-repository-view/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository-view diff --git a/components/nexus-repository/pom.xml b/components/nexus-repository/pom.xml index f5ff756028..0a97dbf72b 100644 --- a/components/nexus-repository/pom.xml +++ b/components/nexus-repository/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository diff --git a/components/nexus-rest-client/pom.xml b/components/nexus-rest-client/pom.xml index 55e0abc14a..7dfebfe6f8 100644 --- a/components/nexus-rest-client/pom.xml +++ b/components/nexus-rest-client/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-rest-client diff --git a/components/nexus-rest-jackson2/pom.xml b/components/nexus-rest-jackson2/pom.xml index 006ceef36f..3a9bf2bc1d 100644 --- a/components/nexus-rest-jackson2/pom.xml +++ b/components/nexus-rest-jackson2/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-rest-jackson2 diff --git a/components/nexus-rest/pom.xml b/components/nexus-rest/pom.xml index fccc54fe4c..81c4a46acd 100644 --- a/components/nexus-rest/pom.xml +++ b/components/nexus-rest/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-rest diff --git a/components/nexus-scheduling/pom.xml b/components/nexus-scheduling/pom.xml index c5cd48183d..7f1e3705e6 100644 --- a/components/nexus-scheduling/pom.xml +++ b/components/nexus-scheduling/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-scheduling diff --git a/components/nexus-script/pom.xml b/components/nexus-script/pom.xml index 1bf631e46a..42c1e50a37 100644 --- a/components/nexus-script/pom.xml +++ b/components/nexus-script/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-script diff --git a/components/nexus-security/pom.xml b/components/nexus-security/pom.xml index b8756ae48c..c534c9f349 100644 --- a/components/nexus-security/pom.xml +++ b/components/nexus-security/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-security diff --git a/components/nexus-selector/pom.xml b/components/nexus-selector/pom.xml index 6a90a8a7fe..dfdc292bc5 100644 --- a/components/nexus-selector/pom.xml +++ b/components/nexus-selector/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-selector diff --git a/components/nexus-servlet/pom.xml b/components/nexus-servlet/pom.xml index 9e3ceffcc0..0d3da580a9 100644 --- a/components/nexus-servlet/pom.xml +++ b/components/nexus-servlet/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-servlet diff --git a/components/nexus-siesta/pom.xml b/components/nexus-siesta/pom.xml index baab487d1e..1f26428d99 100644 --- a/components/nexus-siesta/pom.xml +++ b/components/nexus-siesta/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-siesta diff --git a/components/nexus-ssl/pom.xml b/components/nexus-ssl/pom.xml index 5ba39ff26c..dcc498ccda 100644 --- a/components/nexus-ssl/pom.xml +++ b/components/nexus-ssl/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-ssl diff --git a/components/nexus-supportzip-api/pom.xml b/components/nexus-supportzip-api/pom.xml index 21c8ab8583..37b2238847 100644 --- a/components/nexus-supportzip-api/pom.xml +++ b/components/nexus-supportzip-api/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-supportzip-api diff --git a/components/nexus-swagger/pom.xml b/components/nexus-swagger/pom.xml index 09082d535c..a47f38fdfb 100644 --- a/components/nexus-swagger/pom.xml +++ b/components/nexus-swagger/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-swagger diff --git a/components/nexus-task-logging/pom.xml b/components/nexus-task-logging/pom.xml index 6b94262111..228fdf6cb7 100644 --- a/components/nexus-task-logging/pom.xml +++ b/components/nexus-task-logging/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-task-logging diff --git a/components/nexus-test-common/pom.xml b/components/nexus-test-common/pom.xml index e6730528e8..19aebd8c3a 100644 --- a/components/nexus-test-common/pom.xml +++ b/components/nexus-test-common/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-test-common diff --git a/components/nexus-test-db/pom.xml b/components/nexus-test-db/pom.xml index 8c3fb8cb9c..ba06a2e3d0 100644 --- a/components/nexus-test-db/pom.xml +++ b/components/nexus-test-db/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-test-db diff --git a/components/nexus-testsupport/pom.xml b/components/nexus-testsupport/pom.xml index 3075ea994c..4ba6f6e31b 100644 --- a/components/nexus-testsupport/pom.xml +++ b/components/nexus-testsupport/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-testsupport diff --git a/components/nexus-thread/pom.xml b/components/nexus-thread/pom.xml index e789b31dca..7b2e83d18a 100644 --- a/components/nexus-thread/pom.xml +++ b/components/nexus-thread/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-thread diff --git a/components/nexus-transaction/pom.xml b/components/nexus-transaction/pom.xml index d1761fec69..c7ff66c83f 100644 --- a/components/nexus-transaction/pom.xml +++ b/components/nexus-transaction/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-transaction diff --git a/components/nexus-ui-plugin/pom.xml b/components/nexus-ui-plugin/pom.xml index 6eafefc9c8..e2a1418484 100644 --- a/components/nexus-ui-plugin/pom.xml +++ b/components/nexus-ui-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-ui-plugin diff --git a/components/nexus-upgrade/pom.xml b/components/nexus-upgrade/pom.xml index edb5bd9d7c..dd205b1861 100644 --- a/components/nexus-upgrade/pom.xml +++ b/components/nexus-upgrade/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-upgrade diff --git a/components/nexus-validation/pom.xml b/components/nexus-validation/pom.xml index 633818febe..a51db71244 100644 --- a/components/nexus-validation/pom.xml +++ b/components/nexus-validation/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-validation diff --git a/components/nexus-webhooks/pom.xml b/components/nexus-webhooks/pom.xml index 7c9d87c4d1..24b6e19fdf 100644 --- a/components/nexus-webhooks/pom.xml +++ b/components/nexus-webhooks/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-webhooks diff --git a/components/nexus-webresources-api/pom.xml b/components/nexus-webresources-api/pom.xml index d1d463d6c0..cd6b2d2fd2 100644 --- a/components/nexus-webresources-api/pom.xml +++ b/components/nexus-webresources-api/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-webresources-api diff --git a/components/nexus2-npm-metadata-export/pom.xml b/components/nexus2-npm-metadata-export/pom.xml index 48c437a9b0..6063996e34 100644 --- a/components/nexus2-npm-metadata-export/pom.xml +++ b/components/nexus2-npm-metadata-export/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-components - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus2-npm-metadata-export diff --git a/components/pom.xml b/components/pom.xml index b1eee6f8eb..c54e6ca919 100644 --- a/components/pom.xml +++ b/components/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-components @@ -105,7 +105,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -113,7 +113,7 @@ org.sonatype.nexus.bundles nexus-thirdparty-bundles pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import diff --git a/plugins/nexus-audit-plugin/pom.xml b/plugins/nexus-audit-plugin/pom.xml index edaff4628d..2ae650e44b 100644 --- a/plugins/nexus-audit-plugin/pom.xml +++ b/plugins/nexus-audit-plugin/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-audit-plugin diff --git a/plugins/nexus-blobstore-s3/pom.xml b/plugins/nexus-blobstore-s3/pom.xml index 48f8b37f5b..71dcaf6c05 100644 --- a/plugins/nexus-blobstore-s3/pom.xml +++ b/plugins/nexus-blobstore-s3/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-blobstore-s3 diff --git a/plugins/nexus-blobstore-tasks/pom.xml b/plugins/nexus-blobstore-tasks/pom.xml index ed506907ce..161ba9f975 100644 --- a/plugins/nexus-blobstore-tasks/pom.xml +++ b/plugins/nexus-blobstore-tasks/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-blobstore-tasks diff --git a/plugins/nexus-coreui-plugin/pom.xml b/plugins/nexus-coreui-plugin/pom.xml index 100c7f229b..49af89bbb3 100644 --- a/plugins/nexus-coreui-plugin/pom.xml +++ b/plugins/nexus-coreui-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-coreui-plugin diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesDetails.test.jsx b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesDetails.test.jsx index 86d9acb7a8..f10fb902b0 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesDetails.test.jsx +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesDetails.test.jsx @@ -52,7 +52,7 @@ const ROLE = { id: testRoleId, name: testRoleName, description: testRoleDescription, - privileges: ['nx-blobstores-all'], + privileges: ['nx-all', 'nx-blobstores-all'], roles: ['nx-admin', 'TestRole', 'replication-role'], }; @@ -133,7 +133,7 @@ const selectors = { mappedRole: () => screen.queryByLabelText(LABELS.MAPPED_ROLE.LABEL), name: () => screen.queryByLabelText(LABELS.NAME.LABEL), description: () => screen.queryByLabelText(LABELS.DESCRIPTION.LABEL), - privileges: () => screen.queryByRole('group', {name: LABELS.PRIVILEGES.SELECTED}), + privileges: () => screen.queryByRole('group', {name: "Applied Privileges"}), roles: () => screen.queryByRole('group', {name: "Applied Roles"}), readOnly: { id: () => screen.getByText(LABELS.ID.LABEL).nextSibling, @@ -143,18 +143,18 @@ const selectors = { roles: () => screen.queryAllByRole('list')[1], }, roleModalButton: () => screen.getByRole('button', {name: 'Modify Applied Roles'}), - roleModal: { + privilegeModalButton: () => screen.getByRole('button', {name: 'Modify Applied Privileges'}), + selectionModal: { modal: () => screen.queryByRole('dialog'), - cancel: () => within(selectors.roleModal.modal()).getByRole('button', {name: 'Cancel'}), - confirmButton: () => within(selectors.roleModal.modal()).getByRole('button', {name: 'Confirm'}), + cancel: () => within(selectors.selectionModal.modal()).getByRole('button', {name: 'Cancel'}), + confirmButton: () => within(selectors.selectionModal.modal()).getByRole('button', {name: 'Confirm'}), }, cancelButton: () => screen.getByText(SETTINGS.CANCEL_BUTTON_LABEL), saveButton: () => screen.getByText(SETTINGS.SAVE_BUTTON_LABEL), deleteButton: () => screen.getByText(SETTINGS.DELETE_BUTTON_LABEL), }; -const clickOnPrivileges = privileges => privileges.forEach(it => userEvent.click(screen.getByText(it))); -const clickOnRoles = (checkboxes) => checkboxes.forEach((it) => userEvent.click(it)); +const clickOnCheckboxes = (checkboxes) => checkboxes.forEach((it) => userEvent.click(it)); describe('RolesDetails', function() { const CONFIRM = Promise.resolve(); @@ -169,6 +169,7 @@ describe('RolesDetails', function() { getValue: jest.fn(), }); when(ExtJS.state().getValue).calledWith('nexus.react.roles.modal.enabled').mockReturnValue(true); + when(ExtJS.state().getValue).calledWith('nexus.react.privileges.modal.enabled').mockReturnValue(true); when(Axios.get).calledWith(defaultRolesUrl).mockResolvedValue({data: Object.values(ROLES)}); when(Axios.get).calledWith(privilegesUrl).mockResolvedValue({data: PRIVILEGES}); when(Axios.get).calledWith(singleRoleUrl(testRoleId)).mockResolvedValue({data: {...ROLE, readOnly: false}}); @@ -262,8 +263,8 @@ describe('RolesDetails', function() { }); it('creates internal role', async function() { - const {type, id, name, queryLoadingMask, description, saveButton, roleModalButton, - roleModal: {modal, confirmButton}} = selectors; + const {type, id, name, queryLoadingMask, description, saveButton, roleModalButton, privilegeModalButton, + selectionModal: {modal, confirmButton}} = selectors; when(Axios.post).calledWith(rolesUrl, ROLE).mockResolvedValue({data: {}}); @@ -275,10 +276,12 @@ describe('RolesDetails', function() { await TestUtils.changeField(name, testRoleName); await TestUtils.changeField(description, testRoleDescription); - clickOnPrivileges(ROLE.privileges); + userEvent.click(privilegeModalButton()); + clickOnCheckboxes(within(modal()).getAllByRole('checkbox')); + await act(async () => userEvent.click(confirmButton())); userEvent.click(roleModalButton()); - clickOnRoles(within(modal()).getAllByRole('checkbox')); + clickOnCheckboxes(within(modal()).getAllByRole('checkbox')); await act(async () => userEvent.click(confirmButton())); expect(saveButton()).not.toHaveClass('disabled'); @@ -290,7 +293,7 @@ describe('RolesDetails', function() { it('creates external role', async function() { const {type, name, queryLoadingMask, description, saveButton, externalRoleType, mappedRole, roleModalButton, - roleModal: {modal, confirmButton}} = selectors; + privilegeModalButton, selectionModal: {modal, confirmButton}} = selectors; const crowdType = SOURCE_TYPES.Crowd.id; const testCrowdRoleId = CROWD_ROLES[0].id; const externalRole = {...ROLE, id: testCrowdRoleId}; @@ -311,10 +314,12 @@ describe('RolesDetails', function() { await TestUtils.changeField(name, testRoleName); await TestUtils.changeField(description, testRoleDescription); - clickOnPrivileges(ROLE.privileges); + userEvent.click(privilegeModalButton()); + clickOnCheckboxes(within(modal()).getAllByRole('checkbox')); + await act(async () => userEvent.click(confirmButton())); userEvent.click(roleModalButton()); - clickOnRoles(within(modal()).getAllByRole('checkbox')); + clickOnCheckboxes(within(modal()).getAllByRole('checkbox')); await act(async () => userEvent.click(confirmButton())); expect(saveButton()).not.toHaveClass('disabled'); @@ -325,12 +330,13 @@ describe('RolesDetails', function() { }); it('updates', async function() { - const {name, description, queryLoadingMask, saveButton, roleModalButton, roleModal: {modal, confirmButton}} = selectors; + const {name, description, queryLoadingMask, saveButton, roleModalButton,privilegeModalButton, + selectionModal: {modal, confirmButton}} = selectors; const data = { id: 'RoleId', name: 'Updated name', description: 'Updated description', - privileges: ['nx-all'], + privileges: ['nx-all', 'nx-blobstores-all'], roles: ['nx-admin', 'TestRole', 'replication-role'], }; @@ -342,15 +348,16 @@ describe('RolesDetails', function() { await TestUtils.changeField(name, data.name); await TestUtils.changeField(description, data.description); - clickOnPrivileges(ROLE.privileges); + userEvent.click(privilegeModalButton()); + clickOnCheckboxes(within(modal()).getAllByRole('checkbox')); + clickOnCheckboxes(within(modal()).getAllByRole('checkbox')); + await act(async () => userEvent.click(confirmButton())); userEvent.click(roleModalButton()); - clickOnRoles(within(modal()).getAllByRole('checkbox')); - clickOnRoles(within(modal()).getAllByRole('checkbox')); + clickOnCheckboxes(within(modal()).getAllByRole('checkbox')); + clickOnCheckboxes(within(modal()).getAllByRole('checkbox')); await act(async () => userEvent.click(confirmButton())); - clickOnPrivileges(data.privileges); - expect(saveButton()).not.toHaveClass('disabled'); userEvent.click(saveButton()); @@ -433,7 +440,7 @@ describe('RolesDetails', function() { describe('Roles Selection Modal', function () { it('opens the modal when button is clicked', async function () { - const { queryLoadingMask, roleModalButton, roleModal: { modal, cancel } } = selectors; + const { queryLoadingMask, roleModalButton, selectionModal: { modal, cancel } } = selectors; renderDetails(testRoleId); await waitForElementToBeRemoved(queryLoadingMask()); @@ -456,7 +463,7 @@ describe('RolesDetails', function() { description, roleModalButton, roles, - roleModal: { modal, confirmButton } + selectionModal: { modal, confirmButton } } = selectors; renderDetails(); @@ -484,4 +491,58 @@ describe('RolesDetails', function() { expect(roles()).toHaveTextContent('1 Item Available'); }); }); + + describe('Privileges Selection Modal', function () { + it('opens the modal when button is clicked', async function () { + const { queryLoadingMask, privilegeModalButton, selectionModal: { modal, cancel } } = selectors; + + renderDetails(testRoleId); + await waitForElementToBeRemoved(queryLoadingMask()); + + expect(modal()).not.toBeInTheDocument(); + + userEvent.click(privilegeModalButton()); + expect(modal()).toBeInTheDocument(); + + userEvent.click(cancel()); + expect(modal()).not.toBeInTheDocument(); + }); + + it('add the role to the transfer list once the modal is confirmed', async function () { + const { + queryLoadingMask, + type, + id, + name, + description, + privilegeModalButton, + privileges, + selectionModal: { modal, confirmButton } + } = selectors; + + renderDetails(); + await waitForElementToBeRemoved(queryLoadingMask()); + + userEvent.selectOptions(type(), TYPES.INTERNAL); + await TestUtils.changeField(id, testRoleId); + await TestUtils.changeField(name, testRoleName); + await TestUtils.changeField(description, testRoleDescription); + + expect(modal()).not.toBeInTheDocument(); + userEvent.click(privilegeModalButton()); + expect(modal()).toBeInTheDocument(); + + expect(privileges()).toHaveTextContent('0 Items Available'); + + const tableRow = (index) => modal().querySelectorAll('tbody tr')[index]; + expect(tableRow(0).cells[1]).toHaveTextContent('nx-all'); + expect(modal().querySelectorAll('thead tr')[1].cells[2].textContent).toBe('0 Selected'); + + userEvent.click(within(modal()).getAllByRole('checkbox')[0]); + expect(modal().querySelectorAll('thead tr')[1].cells[2].textContent).toBe('1 Selected'); + + await act(async () => userEvent.click(confirmButton())); + expect(privileges()).toHaveTextContent('1 Item Available'); + }); + }); }); diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesForm.jsx b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesForm.jsx index 3cf1b09b67..8e07ff5b48 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesForm.jsx +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesForm.jsx @@ -55,6 +55,8 @@ export default function RolesForm({roleId, service, onDone}) { sources, roleType, externalRoleType, + privilegesListFilter, + rolesListFilter } = state.context; const isCreate = ValidationUtils.isBlank(roleId); @@ -82,23 +84,28 @@ export default function RolesForm({roleId, service, onDone}) { const setExternalRoleType = (event) => send({type: 'SET_EXTERNAL_ROLE_TYPE', externalRoleType: event.target.value}); const [showModalRoles, setShowModalRoles] = useState(false); + const [showModalPrivileges, setShowModalPrivileges] = useState(false); const selectedRoles = rolesList.filter(r => data.roles.includes(r.id)); + const selectedPrivileges = privilegesList.filter(r => data.privileges.includes(r.id)); + const rolesFooter = `${selectedRoles.length} Item${selectedRoles.length != 1 ? 's' : ''} Available`; + const privilegesFooter = `${selectedPrivileges.length} Item${selectedPrivileges.length != 1 ? 's' : ''} Available`; - const [rolesFilterList, setRolesFilterList] = useState(''); const isRolesModalEnabled = ExtJS.state().getValue('nexus.react.roles.modal.enabled'); - const [showModalPrivileges, setShowModalPrivileges] = useState(false); const isPrivilegesModalEnabled = ExtJS.state().getValue('nexus.react.privileges.modal.enabled'); - function saveModalRoles (newRoles) { - send({ type: 'UPDATE_ROLES', newRoles: newRoles }); - } + const setPrivilegesListFilter = (event) => send({type: 'SET_PRIVILEGES_LIST_FILTER', privilegesListFilter: event}); + const setRolesListFilter = (event) => send({type: 'SET_ROLES_LIST_FILTER', rolesListFilter: event}); function saveModalPrivileges (newPrivileges) { send({ type: 'UPDATE_PRIVILEGES', newPrivileges: newPrivileges }); } + function saveModalRoles (newRoles) { + send({ type: 'UPDATE_ROLES', newRoles: newRoles }); + } + return {!isPrivilegesModalEnabled && - {LABELS.SECTIONS.PRIVILEGES} + <> + {LABELS.SECTIONS.PRIVILEGES} + + } {isPrivilegesModalEnabled && @@ -189,19 +207,15 @@ export default function RolesForm({roleId, service, onDone}) { saveModal={saveModalPrivileges} /> } + } - - {isRolesModalEnabled &&
Applied Roles @@ -217,8 +231,8 @@ export default function RolesForm({roleId, service, onDone}) { }
diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesFormMachine.js b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesFormMachine.js index ffc3dd88d4..fd9e03e175 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesFormMachine.js +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/admin/Roles/RolesFormMachine.js @@ -42,6 +42,10 @@ export default FormUtils.buildFormMachine({ id: 'RolesFormMachine', config: (config) => mergeDeepRight(config, { + context: { + privilegesListFilter: '', + rolesListFilter: '' + }, states: { loaded: { on: { @@ -67,6 +71,14 @@ export default FormUtils.buildFormMachine({ target: 'loaded', actions: ['updatePrivileges'] }, + SET_PRIVILEGES_LIST_FILTER: { + target: 'loaded', + actions: ['updatePrivilegesListFilter'] + }, + SET_ROLES_LIST_FILTER: { + target: 'loaded', + actions: ['updateRolesListFilter'] + } } }, } @@ -111,6 +123,12 @@ export default FormUtils.buildFormMachine({ updatePrivileges: assign({ data: ({data}, {newPrivileges}) => ({...data, privileges: newPrivileges}), }), + updatePrivilegesListFilter: assign({ + privilegesListFilter: (_, {privilegesListFilter}) => privilegesListFilter + }), + updateRolesListFilter: assign({ + rolesListFilter: (_, {rolesListFilter}) => rolesListFilter + }), onDeleteError: (_, event) => ExtJS.showErrorMessage(event.data?.response?.data), logDeleteSuccess: ({data}) => ExtJS.showSuccessMessage(LABELS.DELETE_SUCCESS(data.name)), }, diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetrics.test.jsx b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetrics.test.jsx index 141aa5ae89..3eb210ed5a 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetrics.test.jsx +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetrics.test.jsx @@ -13,16 +13,17 @@ import React from 'react'; import axios from 'axios'; import {render, screen, waitForElementToBeRemoved, within} from '@testing-library/react'; -import {when} from "jest-when"; +import {when} from 'jest-when'; import UsageMetrics from './UsageMetrics'; import TestUtils from '@sonatype/nexus-ui-plugin/src/frontend/src/interface/TestUtils'; import {APIConstants, ExtJS} from '@sonatype/nexus-ui-plugin'; -import {act} from "react-dom/test-utils"; +import {act} from 'react-dom/test-utils'; import { METRICS_CONTENT, METRICS_CONTENT_WITH_CIRCUIT_BREAKER_OSS, - METRICS_CONTENT_WITH_CIRCUIT_BREAKER_PRO} from './UsageMetrics.testdata'; + METRICS_CONTENT_WITH_CIRCUIT_BREAKER_PRO, + METRICS_CONTENT_WITH_CIRCUIT_BREAKER_PRO_POSTGRESQL} from './UsageMetrics.testdata'; const {USAGE_METRICS} = APIConstants.REST.INTERNAL; @@ -52,7 +53,7 @@ const selectors = { getCardContent: (c, t) => within(c).getByText(t), getCardInfoIcon: (c) => c.querySelector('[data-icon="info-circle"]'), getCardMeter: (c) => within(c).getByTestId('meter'), - getCardTextLink: (c) => within(c).getByRole('link', {name: 'Upgrade to Pro to remove limits'}) + getCardTextLink: (c) => within(c).queryByRole('link', {name: 'Explore ways to improve performance'}) }; describe('Usage Metrics', () => { @@ -143,6 +144,10 @@ describe('Usage Metrics', () => { .calledWith('nexus.datastore.clustered.enabled') .mockReturnValue(false); + when(ExtJS.state().getValue) + .calledWith('datastore.isPostgresql') + .mockReturnValue(false); + ExtJS.isProEdition.mockReturnValue(false); }); @@ -156,11 +161,12 @@ describe('Usage Metrics', () => { const card1 = selectors.getCard('Total Components'), card1Header = selectors.getCardHeader(card1, 'Total Components'), card1SubTitle = selectors.getCardContent(card1,'Current'), - card1LimitTitle = selectors.getCardContent(card1,'Limit'), + card1LimitTitle = selectors.getCardContent(card1,'Threshold'), card1Meter = selectors.getCardMeter(card1), card1TextLink = selectors.getCardTextLink(card1), - totalComponents = selectors.getCardContent(card1, '1,234'), - componentsLimit = selectors.getCardContent(card1, '75,000'), + totalComponents = selectors.getCardContent(card1, '85,000'), + componentsLimit = selectors.getCardContent(card1, '100,000'), + card1HighestRecordedCountTitle = selectors.getCardContent(card1, 'Highest Recorded Count (30 days)'), componentsHighestRecordedCount = selectors.getCardContent(card1, '12,500'); expectCardToRender( @@ -172,41 +178,37 @@ describe('Usage Metrics', () => { card1TextLink, totalComponents, componentsLimit, + card1HighestRecordedCountTitle, componentsHighestRecordedCount ); - // card 2 of unique logins + // card 2 of unique logins - no meter and threshold const card2 = selectors.getCard('Unique Logins'), card2Header = selectors.getCardHeader(card2,'Unique Logins'), - card2SubTitle = selectors.getCardContent(card2,'Current'), - card2LimitTitle = selectors.getCardContent(card2,'Limit per 30 days'), - card2Meter = selectors.getCardMeter(card2), - card2TextLink = selectors.getCardTextLink(card2), - uniqueLogins = selectors.getCardContent(card2, '26'), - loginsLimit = selectors.getCardContent(card2, '100'), - loginsHighestRecordedCount = selectors.getCardContent(card2, '52'); + card2SubTitle = selectors.getCardContent(card2,'Last 24 hours'), + uniqueLogins24H = selectors.getCardContent(card2, '26'), + uniqueLogins30DTitle = selectors.getCardContent(card2, 'Last 30 days'), + uniqueLogins30D = selectors.getCardContent(card2, '52'); expectCardToRender( card2, card2Header, card2SubTitle, - card2LimitTitle, - card2Meter, - card2TextLink, - uniqueLogins, - loginsLimit, - loginsHighestRecordedCount + uniqueLogins24H, + uniqueLogins30DTitle, + uniqueLogins30D ); // card 3 of requests per day const card3 = selectors.getCard('Requests Per Day'), card3Header = selectors.getCardHeader(card3, 'Requests Per Day'), - card3SubTitle = selectors.getCardContent(card3, 'Current'), - card3LimitTitle = selectors.getCardContent(card3,'Limit per 24 hours'), + card3SubTitle = selectors.getCardContent(card3, 'Last 24 hours'), + card3LimitTitle = selectors.getCardContent(card3,'Threshold'), card3Meter = selectors.getCardMeter(card3), card3TextLink = selectors.getCardTextLink(card3), - reqsPerDay = selectors.getCardContent(card3, '36,300'), - reqsLimit = selectors.getCardContent(card3, '250,000'), + reqsPerDay = selectors.getCardContent(card3, '3,300'), + reqsLimit = selectors.getCardContent(card3, '20,000'), + card3HighestRecordedCountTitle = selectors.getCardContent(card3, 'Highest Recorded Count (30 days)'), reqsHighestRecordedCount = selectors.getCardContent(card3, '75,000'); expectCardToRender( @@ -215,48 +217,140 @@ describe('Usage Metrics', () => { card3SubTitle, card3LimitTitle, card3Meter, - card3TextLink, reqsPerDay, reqsLimit, + card3HighestRecordedCountTitle, reqsHighestRecordedCount ); + // only render link when reaching 75% or more of threshold + expect(card3TextLink).not.toBeInTheDocument(); }); - it('renders data correctly when Pro edition', async () => { + it('renders data correctly when PRO edition', async () => { ExtJS.isProEdition.mockReturnValue(true); await renderView(METRICS_CONTENT, METRICS_CONTENT_WITH_CIRCUIT_BREAKER_PRO); expect(selectors.getHeading('Usage')).toBeInTheDocument(); - expect(selectors.getAllCards().length).toBe(2); + expect(selectors.getAllCards().length).toBe(3); // card 1 of total components const card1 = selectors.getCard('Total Components'), card1Header = selectors.getCardHeader(card1, 'Total Components'), card1SubTitle = selectors.getCardContent(card1,'Current'), - totalComponents = selectors.getCardContent(card1, '4,758'); + card1LimitTitle = selectors.getCardContent(card1,'Threshold'), + card1Meter = selectors.getCardMeter(card1), + card1TextLink = selectors.getCardTextLink(card1), + totalComponents = selectors.getCardContent(card1, '75,000'), + componentsLimit = selectors.getCardContent(card1, '100,000'), + card1HighestRecordedCountTitle = selectors.getCardContent(card1, 'Highest Recorded Count (30 days)'), + componentsHighestRecordedCount = selectors.getCardContent(card1, '66,666'); expectCardToRender( card1, card1Header, card1SubTitle, + card1LimitTitle, + card1Meter, + card1TextLink, totalComponents, + componentsLimit, + card1HighestRecordedCountTitle, + componentsHighestRecordedCount ); - // card 2 of requests per day - const card2 = selectors.getCard('Requests Per Day'), - card2Header = selectors.getCardHeader(card2, 'Requests Per Day'), - card2SubTitle = selectors.getCardContent(card2, 'Highest Recorded Count (30 days)'), - highestReqsPerDay = selectors.getCardContent(card2, '145,302'); + // card 2 of requests per minute - no meter and threshold + const card2 = selectors.getCard('Requests Per Minute'), + card2Header = selectors.getCardHeader(card2,'Requests Per Minute'), + card2SubTitle = selectors.getCardContent(card2,'Peak minute in last 24 hours'), + requestsPerMinute24H = selectors.getCardContent(card2, '1,200'), + RequestsPerMinute30DTitle = selectors.getCardContent(card2, 'Peak minute in last 30 days'), + requestsPerMinute30D = selectors.getCardContent(card2, '2,500'); expectCardToRender( card2, card2Header, card2SubTitle, + requestsPerMinute24H, + RequestsPerMinute30DTitle, + requestsPerMinute30D + ); + + // card 3 of requests per day + const card3 = selectors.getCard('Requests Per Day'), + card3Header = selectors.getCardHeader(card3, 'Requests Per Day'), + card3SubTitle = selectors.getCardContent(card3, 'Last 24 hours'), + card3LimitTitle = selectors.getCardContent(card3,'Threshold'), + card3Meter = selectors.getCardMeter(card3), + card3TextLink = selectors.getCardTextLink(card3), + reqsPerDay = selectors.getCardContent(card3, '12,500'), + reqsLimit = selectors.getCardContent(card3, '20,000'), + card3HighestRecordedCountTitle = selectors.getCardContent(card3, 'Highest Recorded Count (30 days)'), + reqsHighestRecordedCount = selectors.getCardContent(card3, '95,000'); + + expectCardToRender( + card3, + card3Header, + card3SubTitle, + card3LimitTitle, + card3Meter, + reqsPerDay, + reqsLimit, + card3HighestRecordedCountTitle, + reqsHighestRecordedCount + ); + // only render link when reaching 75% or more of threshold + expect(card3TextLink).not.toBeInTheDocument(); + }); + + it('renders data correctly when Pro edition with Postgresql DB', async () => { + ExtJS.isProEdition.mockReturnValue(true); + when(ExtJS.state().getValue) + .calledWith('datastore.isPostgresql') + .mockReturnValue(true); + await renderView(METRICS_CONTENT, METRICS_CONTENT_WITH_CIRCUIT_BREAKER_PRO_POSTGRESQL); + + expect(selectors.getHeading('Usage')).toBeInTheDocument(); + expect(selectors.getAllCards().length).toBe(3); + + // card 1 of total components + const card1 = selectors.getCard('Total Components'), + card1Header = selectors.getCardHeader(card1, 'Total Components'), + totalComponents = selectors.getCardContent(card1, '4,758'); + + expectCardToRender( + card1, + card1Header, + totalComponents, + ); + + // card 2 of peak requests per minute + const card2 = selectors.getCard('Peak Requests Per Minute'), + card2Header = selectors.getCardHeader(card2, 'Peak Requests Per Minute'), + card2SubTitle = selectors.getCardContent(card2, 'Past 24 hours'), + highestReqsPerMinute = selectors.getCardContent(card2, '1,236'); + + expectCardToRender( + card2, + card2Header, + card2SubTitle, + highestReqsPerMinute + ); + + // card 3 of peak requests per day + const card3 = selectors.getCard('Peak Requests Per Day'), + card3Header = selectors.getCardHeader(card3, 'Peak Requests Per Day'), + card3SubTitle = selectors.getCardContent(card3, 'Past 30 days'), + highestReqsPerDay = selectors.getCardContent(card3, '145,302'); + + expectCardToRender( + card3, + card3Header, + card3SubTitle, highestReqsPerDay ); }); - it('renders tooltips when hovering on the info icon', async () => { + it('renders tooltips when hovering on the info icon when OSS edition', async () => { await renderView(); const totalComponentsCard = selectors.getCard('Total Components'), @@ -265,15 +359,36 @@ describe('Usage Metrics', () => { let infoIcon = selectors.getCardInfoIcon(totalComponentsCard); await TestUtils.expectToSeeTooltipOnHover(infoIcon, - 'The free version of Sonatype Nexus Repository includes up to 75,000 components across all repositories.'); + 'Sonatype Nexus Repository OSS performs best when your total component counts remain under the threshold.'); infoIcon = selectors.getCardInfoIcon(uniqueLoginsCard); await TestUtils.expectToSeeTooltipOnHover(infoIcon, - 'The free version of Sonatype Nexus Repository includes up to 100 unique authentications per 30 days.'); + 'Measures unique users who login over a period of time.'); + + infoIcon = selectors.getCardInfoIcon(reqsPerDayCard); + await TestUtils.expectToSeeTooltipOnHover(infoIcon, + 'Sonatype Nexus Repository OSS performs best when requests per day remain under the threshold.'); + }); + + it('renders tooltips when hovering on the info icon when PRO edition', async () => { + ExtJS.isProEdition.mockReturnValue(true); + await renderView(METRICS_CONTENT, METRICS_CONTENT_WITH_CIRCUIT_BREAKER_PRO); + + const totalComponentsCard = selectors.getCard('Total Components'), + reqsPerMinuteCard = selectors.getCard('Requests Per Minute'), + reqsPerDayCard = selectors.getCard('Requests Per Day'); + + let infoIcon = selectors.getCardInfoIcon(totalComponentsCard); + await TestUtils.expectToSeeTooltipOnHover(infoIcon, + 'Sonatype Nexus Repository Pro using an embedded database performs best when your total component counts remain under the threshold. If you are exceeding the threshold, we strongly recommend migrating to a PostgreSQL database.'); + + infoIcon = selectors.getCardInfoIcon(reqsPerMinuteCard); + await TestUtils.expectToSeeTooltipOnHover(infoIcon, + 'Measures requests per minute to your Sonatype Nexus Repository Pro instance.'); infoIcon = selectors.getCardInfoIcon(reqsPerDayCard); await TestUtils.expectToSeeTooltipOnHover(infoIcon, - 'The free version of Sonatype Nexus Repository includes up to 250,000 HTTP requests to repository endpoints per day.'); + 'Sonatype Nexus Repository Pro using an embedded database performs best when your requests per day remain under the threshold. If you are exceeding the threshold, we strongly recommend migrating to a PostgreSQL database.'); }); }); }); diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetrics.testdata.js b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetrics.testdata.js index dc55a91f35..3b931ade88 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetrics.testdata.js +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetrics.testdata.js @@ -28,15 +28,11 @@ export const METRICS_CONTENT = { export const METRICS_CONTENT_WITH_CIRCUIT_BREAKER_OSS = [ { "metricName": "peak_requests_per_day", - "metricValue": 36300, + "metricValue": 3300, "limits": [ - { - "limitName": "HARD_LIMIT", - "limitValue": 250000 - }, { "limitName": "SOFT_LIMIT", - "limitValue": 187500 + "limitValue": 20000 } ], "limitLevel": "FREE_TIER", @@ -48,24 +44,13 @@ export const METRICS_CONTENT_WITH_CIRCUIT_BREAKER_OSS = [ } ] }, - { - "metricName": "peak_requests_per_minute_1d", - "metricValue": 0, - "limits": [], - "limitLevel": "FREE_TIER", - "aggregates": [] - }, { "metricName": "component_total_count", - "metricValue": 1234, + "metricValue": 85000, "limits": [ - { - "limitName": "HARD_LIMIT", - "limitValue": 75000 - }, { "limitName": "SOFT_LIMIT", - "limitValue": 56250 + "limitValue": 100000 } ], "limitLevel": "FREE_TIER", @@ -81,13 +66,9 @@ export const METRICS_CONTENT_WITH_CIRCUIT_BREAKER_OSS = [ "metricName": "successful_last_24h", "metricValue": 26, "limits": [ - { - "limitName": "HARD_LIMIT", - "limitValue": 100 - }, { "limitName": "SOFT_LIMIT", - "limitValue": 75 + "limitValue": 100 } ], "limitLevel": "FREE_TIER", @@ -102,6 +83,60 @@ export const METRICS_CONTENT_WITH_CIRCUIT_BREAKER_OSS = [ ]; export const METRICS_CONTENT_WITH_CIRCUIT_BREAKER_PRO = [ + { + "metricName": "peak_requests_per_day", + "metricValue": 12500, + "limits": [ + { + "limitName": "SOFT_LIMIT", + "limitValue": 20000 + } + ], + "limitLevel": "FREE_TIER", + "aggregates": [ + { + "name": "content_request_count", + "value": 95000, + "period": "peak_recorded_count_30d" + } + ] + }, + { + "metricName": "requests_per_minute", + "aggregates": [ + { + "name": "peak_recorded_count", + "value": 1200, + "period": "last_24h" + }, + { + "name": "peak_recorded_count", + "value": 2500, + "period": "last_30d" + } + ] + }, + { + "metricName": "component_total_count", + "metricValue": 75000, + "limits": [ + { + "limitName": "SOFT_LIMIT", + "limitValue": 100000 + } + ], + "limitLevel": "FREE_TIER", + "aggregates": [ + { + "name": "component_total_count", + "value": 66666, + "period": "peak_recorded_count_30d" + } + ] + } +]; + +export const METRICS_CONTENT_WITH_CIRCUIT_BREAKER_PRO_POSTGRESQL = [ { "metricName": "peak_requests_per_day_30d", "metricValue": 145302, @@ -109,6 +144,11 @@ export const METRICS_CONTENT_WITH_CIRCUIT_BREAKER_PRO = [ "limitLevel": "UNLIMITED", "aggregates": [] }, + { + "metricName": "requests_per_minute", + "metricValue": 1236, + "aggregates": [] + }, { "metricName": "component_total_count", "metricValue": 4758, diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetricsWithCircuitBreaker.jsx b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetricsWithCircuitBreaker.jsx index e2b42187d7..ed07bbc2b0 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetricsWithCircuitBreaker.jsx +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetricsWithCircuitBreaker.jsx @@ -19,8 +19,9 @@ import { NxMeter, NxTextLink, NxTooltip} from '@sonatype/react-shared-components'; -import {faExclamationCircle, faExclamationTriangle, faInfoCircle} from "@fortawesome/free-solid-svg-icons"; -import {isEmpty} from 'ramda'; +import {faExclamationCircle, faInfoCircle} from '@fortawesome/free-solid-svg-icons'; +import {indexBy, pathOr, prop} from 'ramda'; +import classNames from 'classnames'; import UIStrings from '../../../../constants/UIStrings'; import './UsageMetricsWithCircuitBreaker.scss'; @@ -29,103 +30,148 @@ const { WELCOME: { USAGE: { CIRCUIT_BREAKER, - UPGRADE_TO_PRO}}} = UIStrings; + CARD_LINK_OSS, + CARD_LINK_PRO}}} = UIStrings; const { TOTAL_COMPONENTS, UNIQUE_LOGINS, - REQUESTS_PER_DAY} = CIRCUIT_BREAKER; + REQUESTS_PER_MINUTE, + REQUESTS_PER_DAY, + PERCENTAGE} = CIRCUIT_BREAKER; -const HARD_LIMIT = 'HARD_LIMIT'; const SOFT_LIMIT = 'SOFT_LIMIT'; function Card({card, usage}) { - const {HIGHEST_RECORDED_COUNT, METRIC_NAME_PRO, SUB_TITLE, TITLE} = card; - const cardData = usage?.find(m => m.metricName === METRIC_NAME_PRO); - const metricValue = - cardData && typeof cardData === 'object' && 'metricValue' in cardData ? cardData.metricValue : 0; + const {METRIC_NAME_PRO_POSTGRESQL, SUB_TITLE_PRO_POSTGRESQL, TITLE, TITLE_PRO_POSTGRESQL} = card; + const cardData = usage.find(m => m.metricName === METRIC_NAME_PRO_POSTGRESQL); + const {metricValue} = cardData; - return ( - - - {TITLE} - - - -
+ return + + {TITLE_PRO_POSTGRESQL ?? TITLE} + + + +
+ {metricValue.toLocaleString()} + {SUB_TITLE_PRO_POSTGRESQL ?? ''} +
+
+
+
+}; + +function CardWithThreshold({card, usage, link, tooltip}) { + const {AGGREGATE_PERIOD_30_D, HIGHEST_RECORDED_COUNT, THRESHOLD, METRIC_NAME, SUB_TITLE, TITLE} = card; + const cardData = usage.find(m => m.metricName === METRIC_NAME); + const {aggregates, limits, metricValue} = cardData; + const softLimitValue = pathOr(0, [SOFT_LIMIT, 'limitValue'], indexBy(prop('limitName'), limits)); + const exceedsWarningLimit = metricValue >= softLimitValue * PERCENTAGE; + const exceedsDangerLimit = metricValue >= softLimitValue; + const highestRecordedCount = pathOr(0, [AGGREGATE_PERIOD_30_D, 'value'], indexBy(prop('period'), aggregates)); + const showErrorIcon = highestRecordedCount >= softLimitValue; + const meterClassNames = classNames({ + 'nxrm-meter-warning' : exceedsWarningLimit && !exceedsDangerLimit, + 'nxrm-meter-danger' : exceedsDangerLimit + }) + + return + + + {TITLE} + + + + + + + + + {`${metricValue.toLocaleString()} out of ${softLimitValue.toLocaleString()}`} + +
+
{metricValue.toLocaleString()} - {card === TOTAL_COMPONENTS ? SUB_TITLE : HIGHEST_RECORDED_COUNT} + {SUB_TITLE} +
+
+ {softLimitValue.toLocaleString()} + {THRESHOLD}
- - - - ) +
+
+ + + {showErrorIcon && } + {highestRecordedCount.toLocaleString()} + + {HIGHEST_RECORDED_COUNT} + {exceedsWarningLimit && {link.TEXT}} + +
+
}; -function CardWithMeter({card, usage}) { - const {AGGREGATE_NAME, HIGHEST_RECORDED_COUNT, LIMIT, METRIC_NAME, SUB_TITLE, TITLE, TOOLTIP} = card; - const cardData = usage?.find(m => m.metricName === METRIC_NAME); - const {aggregates, limitLevel, limits, metricValue} = cardData; - const isHardLimit = limitLevel === HARD_LIMIT; - const isSoftLimit = limitLevel === SOFT_LIMIT; - const hardLimit = limits.find(l => l.limitName === HARD_LIMIT); - const softLimit = limits.find(l => l.limitName === SOFT_LIMIT); - const highestRecordedCount = aggregates.find(a => a.name === AGGREGATE_NAME).value; - const showErrorIcon = highestRecordedCount >= hardLimit.limitValue; - const showWarningIcon = highestRecordedCount >= softLimit.limitValue; +function CardWithoutThreshold({card, usage, tooltip}) { + const {AGGREGATE_PERIOD_24_H, AGGREGATE_PERIOD_30_D, HIGHEST_RECORDED_COUNT, METRIC_NAME, SUB_TITLE, TITLE} = card; + const cardData = usage.find(m => m.metricName === METRIC_NAME); + const {aggregates} = cardData; + const metricValue = pathOr(0, ['metricValue'], cardData); + const peakRequestsLast24H = pathOr(0, [AGGREGATE_PERIOD_24_H, 'value'], indexBy(prop('period'), aggregates)); + const highestRecordedCount = pathOr(0, [AGGREGATE_PERIOD_30_D, 'value'], indexBy(prop('period'), aggregates)); - return ( - - - - {TITLE} - - - - - - - - - {`${metricValue.toLocaleString()} out of ${hardLimit.limitValue.toLocaleString()}`} - -
-
- {metricValue.toLocaleString()} - {SUB_TITLE} -
-
- {hardLimit.limitValue.toLocaleString()} - {LIMIT} -
+ return + + + {TITLE} + + + + + + + +
+
+ {TITLE === UNIQUE_LOGINS.TITLE ? metricValue.toLocaleString() : peakRequestsLast24H.toLocaleString()} + {SUB_TITLE}
- - - {HIGHEST_RECORDED_COUNT} - - { - showErrorIcon ? : - showWarningIcon ? : null - } - {highestRecordedCount.toLocaleString()} - - {UPGRADE_TO_PRO.TEXT} - - - - ) +
+
+ + {highestRecordedCount.toLocaleString()} + {HIGHEST_RECORDED_COUNT} + +
+
}; export default function UsageMetricsWithCircuitBreaker() { const isProEdition = ExtJS.isProEdition(); - const proMetricsCards = [TOTAL_COMPONENTS, REQUESTS_PER_DAY]; - const ossMetricsCards = [TOTAL_COMPONENTS, UNIQUE_LOGINS, REQUESTS_PER_DAY]; + const isPostgresql = ExtJS.state().getValue('datastore.isPostgresql'); const usage = ExtJS.state().getValue('contentUsageEvaluationResult'); - return !isEmpty(usage) && (isProEdition - ? proMetricsCards.map(c => ) - : ossMetricsCards.map(c => )) + if (isProEdition && isPostgresql) { + return <> + + + + + } else if (isProEdition && !isPostgresql) { + return <> + + + + + } else { + return <> + + + + + } }; diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetricsWithCircuitBreaker.scss b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetricsWithCircuitBreaker.scss index d6376f3ef6..92fb5d3bba 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetricsWithCircuitBreaker.scss +++ b/plugins/nexus-coreui-plugin/src/frontend/src/components/pages/user/Welcome/UsageMetricsWithCircuitBreaker.scss @@ -64,7 +64,15 @@ $card-width: 1016px; // Note: Firefox and Chrome pseudo-elements must be in separate declarations, as the browser invalidates the // entire thing if it doesn't recognize one pseudo-element - &.nxrm-soft-limit { + &::-webkit-meter-optimum-value { + background: #2AB472; + } + + &::-moz-meter-bar { + background: #2AB472; + } + + &.nxrm-meter-warning { &::-webkit-meter-optimum-value { background: var(--nx-swatch-yellow-50); } @@ -74,13 +82,13 @@ $card-width: 1016px; } } - &.nxrm-hard-limit { + &.nxrm-meter-danger { &::-webkit-meter-optimum-value { - background: var(--nx-swatch-red-40); + background: var(--nx-swatch-orange-50); } &::-moz-meter-bar { - background: var(--nx-swatch-red-40); + background: var(--nx-swatch-orange-50); } } } @@ -88,6 +96,10 @@ $card-width: 1016px; .nxrm-label-container { display: flex; justify-content: space-between; + + &.no-meter { + margin-top: var(--nx-spacing-6x); + } } .nxrm-label { @@ -115,23 +127,21 @@ $card-width: 1016px; .nxrm-highest-records { & > :first-child { - color: var(--nx-swatch-grey-30); + font-weight: bold; } & > :nth-child(2) { - font-weight: bold; + color: var(--nx-swatch-grey-30); + font-size: var(--nx-font-size-xs); } & > span > .nx-icon { margin-left: 0; + margin-right: 5px; } - .recorded-count-soft-limit { - color: var(--nx-swatch-orange-40); - } - - .recorded-count-hard-limit { - color: var(--nx-swatch-red-40); + .recorded-count-with-error-icon { + color: var(--nx-swatch-orange-45); } } diff --git a/plugins/nexus-coreui-plugin/src/frontend/src/constants/pages/user/WelcomeStrings.jsx b/plugins/nexus-coreui-plugin/src/frontend/src/constants/pages/user/WelcomeStrings.jsx index 43ae628110..f45bcb659e 100644 --- a/plugins/nexus-coreui-plugin/src/frontend/src/constants/pages/user/WelcomeStrings.jsx +++ b/plugins/nexus-coreui-plugin/src/frontend/src/constants/pages/user/WelcomeStrings.jsx @@ -87,36 +87,56 @@ export default { TOTAL_COMPONENTS: { TITLE: 'Total Components', SUB_TITLE: 'Current', - LIMIT: 'Limit', + THRESHOLD: 'Threshold', HIGHEST_RECORDED_COUNT: 'Highest Recorded Count (30 days)', METRIC_NAME: 'component_total_count', - METRIC_NAME_PRO: 'component_total_count', - AGGREGATE_NAME: 'component_total_count', - TOOLTIP: 'The free version of Sonatype Nexus Repository includes up to 75,000 components across all repositories.' + METRIC_NAME_PRO_POSTGRESQL: 'component_total_count', + AGGREGATE_PERIOD_30_D: 'peak_recorded_count_30d', + TOOLTIP: 'Sonatype Nexus Repository OSS performs best when your total component counts remain under the threshold.', + TOOLTIP_PRO: 'Sonatype Nexus Repository Pro using an embedded database performs best when your total component counts remain under the threshold. If you are exceeding the threshold, we strongly recommend migrating to a PostgreSQL database.' }, UNIQUE_LOGINS: { TITLE: 'Unique Logins', - SUB_TITLE: 'Current', - LIMIT: 'Limit per 30 days', - HIGHEST_RECORDED_COUNT: 'Highest Recorded Count (30 days)', + SUB_TITLE: 'Last 24 hours', + HIGHEST_RECORDED_COUNT: 'Last 30 days', METRIC_NAME: 'successful_last_24h', - AGGREGATE_NAME: 'unique_user_count', - TOOLTIP: 'The free version of Sonatype Nexus Repository includes up to 100 unique authentications per 30 days.' + AGGREGATE_PERIOD_30_D: 'peak_recorded_count_30d', + TOOLTIP: 'Measures unique users who login over a period of time.' + }, + REQUESTS_PER_MINUTE: { + TITLE: 'Requests Per Minute', + TITLE_PRO_POSTGRESQL: 'Peak Requests Per Minute', + SUB_TITLE: 'Peak minute in last 24 hours', + SUB_TITLE_PRO_POSTGRESQL: 'Past 24 hours', + HIGHEST_RECORDED_COUNT: 'Peak minute in last 30 days', + METRIC_NAME: 'requests_per_minute', + METRIC_NAME_PRO_POSTGRESQL: 'requests_per_minute', + AGGREGATE_PERIOD_24_H: 'last_24h', + AGGREGATE_PERIOD_30_D: 'last_30d', + TOOLTIP_PRO: 'Measures requests per minute to your Sonatype Nexus Repository Pro instance.' }, REQUESTS_PER_DAY: { TITLE: 'Requests Per Day', - SUB_TITLE: 'Current', - LIMIT: 'Limit per 24 hours', + TITLE_PRO_POSTGRESQL: 'Peak Requests Per Day', + SUB_TITLE: 'Last 24 hours', + SUB_TITLE_PRO_POSTGRESQL: 'Past 30 days', + THRESHOLD: 'Threshold', HIGHEST_RECORDED_COUNT: 'Highest Recorded Count (30 days)', METRIC_NAME: 'peak_requests_per_day', - METRIC_NAME_PRO: 'peak_requests_per_day_30d', - AGGREGATE_NAME: 'content_request_count', - TOOLTIP: 'The free version of Sonatype Nexus Repository includes up to 250,000 HTTP requests to repository endpoints per day.' - } + METRIC_NAME_PRO_POSTGRESQL: 'peak_requests_per_day_30d', + AGGREGATE_PERIOD_30_D: 'peak_recorded_count_30d', + TOOLTIP: 'Sonatype Nexus Repository OSS performs best when requests per day remain under the threshold.', + TOOLTIP_PRO: 'Sonatype Nexus Repository Pro using an embedded database performs best when your requests per day remain under the threshold. If you are exceeding the threshold, we strongly recommend migrating to a PostgreSQL database.', + }, + PERCENTAGE: 0.75 + }, + CARD_LINK_OSS: { + TEXT: 'Explore ways to improve performance', + URL: 'https://sonatype.atlassian.net/wiki/spaces/HELP/pages/edit-v2/241893499?draftShareId=44e1e02f-446c-484c-9ba6-a6aa68970197&inEditorTemplatesPanel=auto_closed' }, - UPGRADE_TO_PRO: { - TEXT: 'Upgrade to Pro to remove limits', - URL: '/' + CARD_LINK_PRO: { + TEXT: 'Explore ways to improve performance', + URL: 'https://sonatype.atlassian.net/wiki/spaces/HELP/pages/edit-v2/241337020?draftShareId=ece47942-0c7e-4ba6-943f-898b69630d97&inEditorTemplatesPanel=auto_closed' } } } diff --git a/plugins/nexus-default-role-plugin/pom.xml b/plugins/nexus-default-role-plugin/pom.xml index 1edef967a3..7b1c12a512 100644 --- a/plugins/nexus-default-role-plugin/pom.xml +++ b/plugins/nexus-default-role-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-default-role-plugin diff --git a/plugins/nexus-example-content/pom.xml b/plugins/nexus-example-content/pom.xml index 369fcf3a6b..ca4e1caa73 100644 --- a/plugins/nexus-example-content/pom.xml +++ b/plugins/nexus-example-content/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-example-content diff --git a/plugins/nexus-onboarding-plugin/pom.xml b/plugins/nexus-onboarding-plugin/pom.xml index d6d6c35f26..839e285487 100644 --- a/plugins/nexus-onboarding-plugin/pom.xml +++ b/plugins/nexus-onboarding-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-onboarding-plugin diff --git a/plugins/nexus-repository-apt/pom.xml b/plugins/nexus-repository-apt/pom.xml index 853b6fbaad..aa42888abe 100644 --- a/plugins/nexus-repository-apt/pom.xml +++ b/plugins/nexus-repository-apt/pom.xml @@ -19,7 +19,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT diff --git a/plugins/nexus-repository-httpbridge/pom.xml b/plugins/nexus-repository-httpbridge/pom.xml index 56677dfb49..210b0815cc 100644 --- a/plugins/nexus-repository-httpbridge/pom.xml +++ b/plugins/nexus-repository-httpbridge/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository-httpbridge diff --git a/plugins/nexus-repository-maven/pom.xml b/plugins/nexus-repository-maven/pom.xml index 0a703ee0a8..d251f6343c 100644 --- a/plugins/nexus-repository-maven/pom.xml +++ b/plugins/nexus-repository-maven/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository-maven diff --git a/plugins/nexus-repository-raw/pom.xml b/plugins/nexus-repository-raw/pom.xml index 0a1f2f0c49..cbdb0070dc 100644 --- a/plugins/nexus-repository-raw/pom.xml +++ b/plugins/nexus-repository-raw/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository-raw diff --git a/plugins/nexus-script-plugin/pom.xml b/plugins/nexus-script-plugin/pom.xml index 468b6d33c8..1f7353934b 100644 --- a/plugins/nexus-script-plugin/pom.xml +++ b/plugins/nexus-script-plugin/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-script-plugin diff --git a/plugins/nexus-ssl-plugin/pom.xml b/plugins/nexus-ssl-plugin/pom.xml index 03a24e08cb..abb6786e8a 100644 --- a/plugins/nexus-ssl-plugin/pom.xml +++ b/plugins/nexus-ssl-plugin/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-ssl-plugin diff --git a/plugins/nexus-task-log-cleanup/pom.xml b/plugins/nexus-task-log-cleanup/pom.xml index eaf78e38d4..e61a2b9601 100644 --- a/plugins/nexus-task-log-cleanup/pom.xml +++ b/plugins/nexus-task-log-cleanup/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.plugins nexus-plugins - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-task-log-cleanup diff --git a/plugins/pom.xml b/plugins/pom.xml index 6d00bfc35f..85cfeb70e6 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins @@ -54,7 +54,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -65,13 +65,13 @@ org.sonatype.nexus.plugins nexus-audit-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-audit-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -81,13 +81,13 @@ org.sonatype.nexus.plugins nexus-blobstore-tasks - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-blobstore-tasks - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -97,13 +97,13 @@ org.sonatype.nexus.plugins nexus-coreui-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-coreui-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -112,7 +112,7 @@ org.sonatype.nexus.plugins nexus-coreui-plugin sources - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT @@ -120,13 +120,13 @@ org.sonatype.nexus.plugins nexus-repository-httpbridge - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-repository-httpbridge - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -136,13 +136,13 @@ org.sonatype.nexus.plugins nexus-repository-maven - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-repository-maven - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -152,13 +152,13 @@ org.sonatype.nexus.plugins nexus-repository-apt - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-repository-apt - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -169,13 +169,13 @@ org.sonatype.nexus.plugins nexus-repository-raw - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-repository-raw - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -185,13 +185,13 @@ org.sonatype.nexus.plugins nexus-ssl-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-ssl-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -201,13 +201,13 @@ org.sonatype.nexus.plugins nexus-script-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-script-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -217,13 +217,13 @@ org.sonatype.nexus.plugins nexus-task-log-cleanup - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-task-log-cleanup - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -233,13 +233,13 @@ org.sonatype.nexus.plugins nexus-blobstore-s3 - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-blobstore-s3 - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -249,13 +249,13 @@ org.sonatype.nexus.plugins nexus-onboarding-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-onboarding-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -265,13 +265,13 @@ org.sonatype.nexus.plugins nexus-default-role-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-default-role-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -281,13 +281,13 @@ org.sonatype.nexus.plugins nexus-example-content - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.plugins nexus-example-content - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml diff --git a/pom.xml b/pom.xml index 91721a8027..df47ce5642 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ ${project.groupId}:${project.artifactId} pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT 2008 http://nexus.sonatype.org/ @@ -62,7 +62,7 @@ Define nexus versions. The 'nexus.version' property always refers to the version of the current project. These values must always be constants; 'nexus.version' will get update automatically by set-version. --> - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT 2.15.1-02 4.3.9 @@ -139,103 +139,103 @@ org.sonatype.nexus nexus-audit - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-base - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-blobstore - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-blobstore-api - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-blobstore-file - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-bootstrap - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-capability - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-cleanup - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-cleanup-config - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-commands - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-common - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-core - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-crypto - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-datastore - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-datastore-api - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-datastore-mybatis - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-datastore-mybatis - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -243,19 +243,19 @@ org.sonatype.nexus nexus-distributed-event-service-api - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-orient - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-orient - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -263,103 +263,103 @@ org.sonatype.nexus nexus2-npm-metadata-export - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-orient-console - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-cache - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-elasticsearch - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-email - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-extdirect - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-extender - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-features - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-httpclient - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-jmx - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-scheduling - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-formfields - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-guice-servlet - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-main - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-mime - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-oss-edition - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-oss-edition - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -367,44 +367,44 @@ org.sonatype.nexus nexus-pax-logging - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-plugin-api - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-quartz - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-rapture - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-rapture - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT sources org.sonatype.nexus nexus-repository - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-repository - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT tests test @@ -412,139 +412,139 @@ org.sonatype.nexus nexus-repository-config - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-repository-content - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-repository-services - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-repository-view - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-rest - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-rest-client - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-rest-jackson2 - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-script - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-security - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-selector - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-servlet - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-siesta - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-ssl - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-supportzip-api - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-swagger - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-task-logging - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-thread - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-transaction - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-ui-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-upgrade - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-validation - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-webhooks - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-webresources-api - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT @@ -552,25 +552,25 @@ org.sonatype.nexus nexus-pax-exam - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-test-common - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-test-db - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus nexus-testsupport - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT @@ -578,7 +578,7 @@ org.sonatype.nexus.assemblies nexus-startup-feature - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -586,7 +586,7 @@ org.sonatype.nexus.assemblies nexus-boot-feature - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -594,7 +594,7 @@ org.sonatype.nexus.assemblies nexus-base-feature - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -602,7 +602,7 @@ org.sonatype.nexus.assemblies nexus-core-feature - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT features xml @@ -610,14 +610,14 @@ org.sonatype.nexus.assemblies nexus-base-overlay - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT zip org.sonatype.nexus.assemblies nexus-base-template - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT zip @@ -913,7 +913,7 @@ org.sonatype.nexus.buildsupport extjs-maven-plugin - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT diff --git a/revision.txt b/revision.txt index c7393b9f8d..a326962dd6 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -b=main,r=ae9113926f7ee00a3ff6d0ffaf832b93313957aa,t=2024-01-12-1342-44199 \ No newline at end of file +b=main,r=d5c53dc1fa74fed1fd344783b8c1fe114714205b,t=2024-01-19-1348-33472 \ No newline at end of file diff --git a/testsuite/nexus-content-suite/pom.xml b/testsuite/nexus-content-suite/pom.xml index 23819d074e..72ac0dff07 100644 --- a/testsuite/nexus-content-suite/pom.xml +++ b/testsuite/nexus-content-suite/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-content-suite diff --git a/testsuite/nexus-docker-testsupport/pom.xml b/testsuite/nexus-docker-testsupport/pom.xml index bbea8b687d..07d82905a7 100644 --- a/testsuite/nexus-docker-testsupport/pom.xml +++ b/testsuite/nexus-docker-testsupport/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-docker-testsupport diff --git a/testsuite/nexus-it-suite-data/pom.xml b/testsuite/nexus-it-suite-data/pom.xml index ebd9ea48aa..dcdae97e2f 100644 --- a/testsuite/nexus-it-suite-data/pom.xml +++ b/testsuite/nexus-it-suite-data/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-it-suite-data diff --git a/testsuite/nexus-it-suite/pom.xml b/testsuite/nexus-it-suite/pom.xml index a9e19854d4..2fa0b7a4e5 100644 --- a/testsuite/nexus-it-suite/pom.xml +++ b/testsuite/nexus-it-suite/pom.xml @@ -21,7 +21,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-it-suite diff --git a/testsuite/nexus-repository-content-testsupport/pom.xml b/testsuite/nexus-repository-content-testsupport/pom.xml index fc31179a57..45fc7896da 100644 --- a/testsuite/nexus-repository-content-testsupport/pom.xml +++ b/testsuite/nexus-repository-content-testsupport/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository-content-testsupport diff --git a/testsuite/nexus-repository-testsupport/pom.xml b/testsuite/nexus-repository-testsupport/pom.xml index 53f5679a65..76a3179440 100644 --- a/testsuite/nexus-repository-testsupport/pom.xml +++ b/testsuite/nexus-repository-testsupport/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.testsuite nexus-testsuite - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT nexus-repository-testsupport diff --git a/testsuite/pom.xml b/testsuite/pom.xml index 23cb0581b9..3149bfca14 100644 --- a/testsuite/pom.xml +++ b/testsuite/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.testsuite diff --git a/thirdparty-bundles/elasticsearch/pom.xml b/thirdparty-bundles/elasticsearch/pom.xml index c17e13a916..309d6f63a9 100644 --- a/thirdparty-bundles/elasticsearch/pom.xml +++ b/thirdparty-bundles/elasticsearch/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus.bundles nexus-thirdparty-bundles - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.bundles.elasticsearch diff --git a/thirdparty-bundles/pom.xml b/thirdparty-bundles/pom.xml index e3ce196cc4..19ce7a87bc 100644 --- a/thirdparty-bundles/pom.xml +++ b/thirdparty-bundles/pom.xml @@ -20,7 +20,7 @@ org.sonatype.nexus nexus-parent - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT org.sonatype.nexus.bundles @@ -41,7 +41,7 @@ org.sonatype.nexus.buildsupport nexus-buildsupport-all pom - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT import @@ -50,7 +50,7 @@ org.sonatype.nexus.bundles org.sonatype.nexus.bundles.elasticsearch - 3.65.0-SNAPSHOT + 3.66.0-SNAPSHOT