From a1b976b76b1cb938865d5eb02d4ae5c8cdeb83f4 Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Tue, 10 Oct 2023 17:53:20 +0200 Subject: [PATCH 01/62] Fix a pb with Dependabot pull request (Maven) --- .mvn/wrapper/maven-wrapper.properties | 2 +- adoptium-api-versions/pom.xml | 2 +- pom.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index a36fc474e..c51ee6e36 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -14,5 +14,5 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.2/apache-maven-3.9.2-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index fb254ffa6..592cb6fb5 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -16,7 +16,7 @@ 1.9.10 1.4.11 17 - 3.9.2 + 3.9.5 3.4.5 UTF-8 UTF-8 diff --git a/pom.xml b/pom.xml index acc743761..d4d6e8938 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ - 3.9.2 + 3.9.5 @@ -72,7 +72,7 @@ 1.0.10 1.2.0 3.1.0 - 3.9.2 + 3.9.5 2.16.1 3.4.0 0.9.1 From b3bf98f2d1bf3926afdfc7b5bca598f8d0cbf142 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 00:12:42 +0000 Subject: [PATCH 02/62] build(deps-dev): bump org.eclipse.jetty:jetty-server Bumps org.eclipse.jetty:jetty-server from 12.0.1 to 12.0.2. --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-server dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index fb254ffa6..eaa47eed4 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -349,7 +349,7 @@ org.eclipse.jetty jetty-server - 12.0.1 + 12.0.2 test From a80bf8a620eb54d883f9d9a6554396d1b865105b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 00:12:50 +0000 Subject: [PATCH 03/62] build(deps): bump org.eclipse.jetty:jetty-client from 12.0.1 to 12.0.2 Bumps org.eclipse.jetty:jetty-client from 12.0.1 to 12.0.2. --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index fb254ffa6..861eb9b87 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -355,7 +355,7 @@ org.eclipse.jetty jetty-client - 12.0.1 + 12.0.2 org.bouncycastle From 8e0ca29a3a249c33ea6183c978175d8e552c72d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 00:12:57 +0000 Subject: [PATCH 04/62] build(deps): bump org.pitest:pitest-maven from 1.15.0 to 1.15.1 Bumps [org.pitest:pitest-maven](https://github.com/hcoles/pitest) from 1.15.0 to 1.15.1. - [Release notes](https://github.com/hcoles/pitest/releases) - [Commits](https://github.com/hcoles/pitest/compare/1.15.0...1.15.1) --- updated-dependencies: - dependency-name: org.pitest:pitest-maven dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index acc743761..1ad5d9852 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ 3.3.0 2.2.0 7.0.1 - 1.15.0 + 1.15.1 3.21.0 3.4.5 0.15 From f6b594121bc93c2ee0036a4f1ce585aa564fd84a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 00:13:01 +0000 Subject: [PATCH 05/62] build(deps): bump org.jooq:jooq from 3.18.6 to 3.18.7 Bumps org.jooq:jooq from 3.18.6 to 3.18.7. --- updated-dependencies: - dependency-name: org.jooq:jooq dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index fb254ffa6..b8a526bf8 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -247,7 +247,7 @@ org.jooq jooq - 3.18.6 + 3.18.7 org.slf4j From d37806d85d0fb086180a65ed0c9b36fdd41b5b10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 00:11:35 +0000 Subject: [PATCH 06/62] build(deps): bump eclipse-temurin from 17 to 21 Bumps eclipse-temurin from 17 to 21. --- updated-dependencies: - dependency-name: eclipse-temurin dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f5d151e0..b0cbad58c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17 as build +FROM eclipse-temurin:21 as build RUN mkdir /tmp/build @@ -8,7 +8,7 @@ COPY . /tmp/build RUN ./mvnw clean install -Padoptium -FROM eclipse-temurin:17 +FROM eclipse-temurin:21 RUN mkdir -p /deployments From 85e2480d9cc9d4b672656885ae533df88e5e1b93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 00:10:34 +0000 Subject: [PATCH 07/62] build(deps): bump io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-netty-4.1 Bumps [io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-netty-4.1](https://github.com/open-telemetry/opentelemetry-java-instrumentation) from 1.30.0-alpha to 1.31.0-alpha. - [Release notes](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-java-instrumentation/commits) --- updated-dependencies: - dependency-name: io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-netty-4.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index b07eb9426..3a05d4da7 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -273,7 +273,7 @@ io.opentelemetry.javaagent.instrumentation opentelemetry-javaagent-netty-4.1 - 1.30.0-alpha + 1.31.0-alpha org.jboss.weld From 245b42747dd9ec261517e17b9c792e0567fa6570 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 00:10:49 +0000 Subject: [PATCH 08/62] build(deps): bump quarkus.version from 3.4.2 to 3.4.3 Bumps `quarkus.version` from 3.4.2 to 3.4.3. Updates `io.quarkus:quarkus-bom` from 3.4.2 to 3.4.3 - [Release notes](https://github.com/quarkusio/quarkus/releases) - [Commits](https://github.com/quarkusio/quarkus/compare/3.4.2...3.4.3) Updates `io.quarkus:quarkus-security` from 3.4.2 to 3.4.3 Updates `io.quarkus:quarkus-core` from 3.4.2 to 3.4.3 Updates `io.quarkus:quarkus-elytron-security-properties-file` from 3.4.2 to 3.4.3 Updates `io.quarkus:quarkus-resteasy-reactive` from 3.4.2 to 3.4.3 --- updated-dependencies: - dependency-name: io.quarkus:quarkus-bom dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus:quarkus-security dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus:quarkus-core dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus:quarkus-elytron-security-properties-file dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus:quarkus-resteasy-reactive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index b07eb9426..555a1ff8f 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -20,7 +20,7 @@ 3.4.5 UTF-8 UTF-8 - 3.4.2 + 3.4.3 5.3.2 From 6c9510a217dad6068a45122cf62bbc46c20b2a18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 00:11:09 +0000 Subject: [PATCH 09/62] build(deps): bump io.quarkus:quarkus-maven-plugin from 3.4.2 to 3.4.3 Bumps io.quarkus:quarkus-maven-plugin from 3.4.2 to 3.4.3. --- updated-dependencies: - dependency-name: io.quarkus:quarkus-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4ec64269c..2352a471e 100644 --- a/pom.xml +++ b/pom.xml @@ -82,7 +82,7 @@ 4.7.3 UTF-8 UTF-8 - 3.4.2 + 3.4.3 From bbdc06916569a9c01d8bd54b506846a23ce6baba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 00:11:24 +0000 Subject: [PATCH 10/62] build(deps): bump io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-kotlinx-coroutines Bumps [io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-kotlinx-coroutines](https://github.com/open-telemetry/opentelemetry-java-instrumentation) from 1.30.0-alpha to 1.31.0-alpha. - [Release notes](https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-java-instrumentation/commits) --- updated-dependencies: - dependency-name: io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-kotlinx-coroutines dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index b07eb9426..7a9d97c9b 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -268,7 +268,7 @@ io.opentelemetry.javaagent.instrumentation opentelemetry-javaagent-kotlinx-coroutines - 1.30.0-alpha + 1.31.0-alpha io.opentelemetry.javaagent.instrumentation From 3fc89017d1e17575a180e2576558ded66ef40af3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 00:40:51 +0000 Subject: [PATCH 11/62] build(deps): bump jackson.version from 2.15.2 to 2.15.3 Bumps `jackson.version` from 2.15.2 to 2.15.3. Updates `com.fasterxml.jackson.module:jackson-module-kotlin` from 2.15.2 to 2.15.3 - [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.15.2...jackson-module-kotlin-2.15.3) Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.15.2 to 2.15.3 Updates `com.fasterxml.jackson.datatype:jackson-datatype-jakarta-jsonp` from 2.15.2 to 2.15.3 - [Commits](https://github.com/FasterXML/jackson-datatypes-misc/compare/jackson-datatypes-misc-parent-2.15.2...jackson-datatypes-misc-parent-2.15.3) Updates `com.fasterxml.jackson.core:jackson-databind` from 2.15.2 to 2.15.3 - [Commits](https://github.com/FasterXML/jackson/commits) Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.15.2 to 2.15.3 - [Commits](https://github.com/FasterXML/jackson/commits) Updates `com.fasterxml.jackson.datatype:jackson-datatype-jdk8` from 2.15.2 to 2.15.3 --- updated-dependencies: - dependency-name: com.fasterxml.jackson.module:jackson-module-kotlin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jakarta-jsonp dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: com.fasterxml.jackson.core:jackson-databind dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.fasterxml.jackson.core:jackson-annotations dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: com.fasterxml.jackson.datatype:jackson-datatype-jdk8 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index f0e60dad3..fd56a1eb8 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -9,7 +9,7 @@ 1.7.3 - 2.15.2 + 2.15.3 17 4.10.0 17 From 22221f4e3afb463cb31f5dbd22487961605b8b94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 00:29:28 +0000 Subject: [PATCH 12/62] build(deps): bump org.jacoco:jacoco-maven-plugin from 0.8.10 to 0.8.11 Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.10 to 0.8.11. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.10...v0.8.11) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2352a471e..133a90a37 100644 --- a/pom.xml +++ b/pom.xml @@ -16,7 +16,7 @@ 1.7.1 - 0.8.10 + 0.8.11 17 17 1.9.10 From b7005a9f9d07ca2623cfe5144ae3228f5f604cde Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 17 Oct 2023 10:59:38 +0100 Subject: [PATCH 13/62] bump GH action to JDK21 --- .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5909ecc7..7cc53d5f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d3d8a7b41..84ad4f2a5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: - java-version: '17' + java-version: '21' distribution: 'temurin' cache: 'maven' From a10197ed3f558a6364b542a3f20ead9b513ab2a5 Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 17 Oct 2023 11:10:27 +0100 Subject: [PATCH 14/62] bump deploy dockerfile to Temurin 21 --- .github/dependabot.yml | 4 ++++ deploy/Dockerfile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e90560fd7..5923d8863 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -12,3 +12,7 @@ updates: directory: "/" schedule: interval: "daily" + - package-ecosystem: docker + directory: /deploy + schedule: + interval: "daily" diff --git a/deploy/Dockerfile b/deploy/Dockerfile index 5b7084877..680c99a3d 100644 --- a/deploy/Dockerfile +++ b/deploy/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:17 +FROM eclipse-temurin:21 # BUILDS FOR ADOPTIUM, NOT ADOPTOPENJDK ARG MAVEN_FLAGS="-Padoptium,-adoptopenjdk" From a5035cdb20bb60af11d004d88ddd208149a4b799 Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 17 Oct 2023 11:11:58 +0100 Subject: [PATCH 15/62] Update dependabot.yml --- .github/dependabot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5923d8863..0c408139a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,6 +13,6 @@ updates: schedule: interval: "daily" - package-ecosystem: docker - directory: /deploy + directory: "/deploy" schedule: interval: "daily" From 7785c74f62467a232120aab3fd521c71d791d8f7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Oct 2023 10:17:57 +0000 Subject: [PATCH 16/62] build(deps): bump org.apache.maven.plugins:maven-site-plugin Bumps [org.apache.maven.plugins:maven-site-plugin](https://github.com/apache/maven-site-plugin) from 4.0.0-M10 to 4.0.0-M11. - [Commits](https://github.com/apache/maven-site-plugin/compare/maven-site-plugin-4.0.0-M10...maven-site-plugin-4.0.0-M11) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-site-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 133a90a37..0c19678cc 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ 3.0.1 3.3.1 2.0.1 - 4.0.0-M10 + 4.0.0-M11 3.3.0 4.7.3.6 3.1.2 From 10e9bb16cba3f40c3ceaca4fd394a20ef0cf5f5a Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Tue, 17 Oct 2023 19:33:57 +0200 Subject: [PATCH 17/62] Fix inconsistency of the data returned by the API --- .../net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt index be6586170..9055bc393 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt @@ -89,7 +89,7 @@ class DownloadStatsResource { @GET @Schema(hidden = true) @Path("/total/{feature_version}/{release_name}") - @Operation(summary = "Get download stats for feature verson", description = "stats", hidden = true) + @Operation(summary = "Get download stats for feature version", description = "stats", hidden = true) fun getTotalDownloadStatsForTag( @Parameter(name = "feature_version", description = "Feature version (i.e 8, 9, 10...)", required = true) @PathParam("feature_version") @@ -102,6 +102,7 @@ class DownloadStatsResource { ?: throw BadRequestException("Unable to find version $featureVersion") return getAdoptReleases(release) + .filter { it.release_type == ReleaseType.ga } .filter { it.release_name == releaseName } .flatMap { it.binaries.asSequence() } .flatMap { From 4cda2fb7e72b47cb19cd637f85c6ca624dd0e974 Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Tue, 17 Oct 2023 21:16:28 +0200 Subject: [PATCH 18/62] Fix the test --- .../src/test/kotlin/net/adoptium/api/DownloadStatsPathTest.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/test/kotlin/net/adoptium/api/DownloadStatsPathTest.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/test/kotlin/net/adoptium/api/DownloadStatsPathTest.kt index 011de8147..4a6d25e7e 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/test/kotlin/net/adoptium/api/DownloadStatsPathTest.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/test/kotlin/net/adoptium/api/DownloadStatsPathTest.kt @@ -21,6 +21,7 @@ import org.junit.jupiter.api.assertThrows import org.junit.jupiter.api.extension.ExtendWith import java.time.format.DateTimeFormatter import jakarta.ws.rs.BadRequestException +import net.adoptium.api.v3.models.ReleaseType @ExtendWith(value = [DbExtension::class]) @TestInstance(TestInstance.Lifecycle.PER_CLASS) @@ -174,6 +175,7 @@ class DownloadStatsPathTest : FrontendTest() { val releases = getReleases() val release = releases + .filter { it.release_type == ReleaseType.ga } .filter { it.vendor == Vendor.getDefault() } .first() From e70cc6cabdd2fa9cc26dabeb0071440908ff57dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 00:24:58 +0000 Subject: [PATCH 19/62] build(deps): bump actions/checkout from 4.1.0 to 4.1.1 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/8ade135a41bc03ea155e62e844d188df1ea18608...b4ffde65f46336ab88eb53be808477a3936bae11) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/deploy-adoptium.yml | 2 +- .github/workflows/deploy-adoptopenjdk.yml | 2 +- .github/workflows/publish.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cc53d5f3..048ffff3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: adoptopenjdk) echo "ARGS=-Padoptopenjdk,-adoptium" >> $GITHUB_ENV ;; esac - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: persist-credentials: false diff --git a/.github/workflows/deploy-adoptium.yml b/.github/workflows/deploy-adoptium.yml index 7a3a2f96d..8cc47546c 100644 --- a/.github/workflows/deploy-adoptium.yml +++ b/.github/workflows/deploy-adoptium.yml @@ -14,7 +14,7 @@ jobs: if: startsWith(github.repository, 'adoptium/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Login to Azure uses: ./.github/actions/azure-login diff --git a/.github/workflows/deploy-adoptopenjdk.yml b/.github/workflows/deploy-adoptopenjdk.yml index 7c855bd35..e7070e03f 100644 --- a/.github/workflows/deploy-adoptopenjdk.yml +++ b/.github/workflows/deploy-adoptopenjdk.yml @@ -14,7 +14,7 @@ jobs: if: startsWith(github.repository, 'adoptium/') runs-on: ubuntu-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Login to Azure uses: ./.github/actions/azure-login diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 84ad4f2a5..a05b176dc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,7 @@ jobs: contents: write # for Git to git push steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: From fb9f5de38e538708385dcf951e16bfee0bfb9b38 Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 18 Oct 2023 10:40:00 +0100 Subject: [PATCH 20/62] store build-marketplace action in main to get dependabot updates --- .github/workflows/build-marketplace.yml | 50 +++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/build-marketplace.yml diff --git a/.github/workflows/build-marketplace.yml b/.github/workflows/build-marketplace.yml new file mode 100644 index 000000000..78770c6a0 --- /dev/null +++ b/.github/workflows/build-marketplace.yml @@ -0,0 +1,50 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven + +name: Marketplace build + +on: + push: + branches: [ marketplace ] + pull_request: + branches: [ marketplace ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + + - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 + with: + java-version: '21' + distribution: 'temurin' + cache: 'maven' + + - name: Build api + run: ./mvnw --batch-mode clean install -Padoptium + + - name: Build app + run: | + cd marketplace/ + ../mvnw --batch-mode clean install + + - name: Upload yaml schema + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: schema.yaml + path: marketplace/adoptium-marketplace-schema/target/generated/openapi.yaml + + - name: Upload json schema + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: schema.json + path: marketplace/adoptium-marketplace-schema/target/generated/openapi.json + + - name: Upload example data + uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + with: + name: example.json + path: marketplace/adoptium-marketplace-schema-tests/src/test/resources/net/adoptium/marketplace/schema/example.json From 49383d8bf08b2578f992ed70b7ea393ea5d9cbb9 Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 18 Oct 2023 10:47:52 +0100 Subject: [PATCH 21/62] add custom paths to actions for dependabot --- .github/dependabot.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 0c408139a..512e01262 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,6 +4,20 @@ updates: directory: "/" schedule: interval: "daily" + # Maintain dependencies for GitHub composite Actions (/.github/actions) + # Waiting for supporting wildcards see https://github.com/dependabot/dependabot-core/issues/5137 + - package-ecosystem: "github-actions" + directory: "/.github/actions/azure-login" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/.github/actions/do-login" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/.github/actions/docker-build" + schedule: + interval: "daily" - package-ecosystem: "maven" directory: "/" schedule: From 187f16176e0f2250c0a361b008711ff590a5ee8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:56:16 +0000 Subject: [PATCH 22/62] build(deps): bump docker/build-push-action Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4.2.1 to 5.0.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/0a97817b6ade9f46837855d676c4cca3a2471fc9...0565240e2d4ab88bba5387d719585280857ece09) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/actions/docker-build/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/docker-build/action.yml b/.github/actions/docker-build/action.yml index d17ed5eba..824e14dc6 100644 --- a/.github/actions/docker-build/action.yml +++ b/.github/actions/docker-build/action.yml @@ -11,7 +11,7 @@ runs: using: composite steps: - name: Build container image and push to Azure - uses: docker/build-push-action@0a97817b6ade9f46837855d676c4cca3a2471fc9 # v4.2.1 + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 with: file: ./deploy/Dockerfile tags: ${{ inputs.DOCKER_REPO }}:latest From 772922aaf1fd624d85bddb0ac616b61c23f532e9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:56:25 +0000 Subject: [PATCH 23/62] build(deps): bump docker/login-action in /.github/actions/azure-login Bumps [docker/login-action](https://github.com/docker/login-action) from 2.2.0 to 3.0.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/465a07811f14bebb1938fbed4728c6a1ff8901fc...343f7c4344506bcbf9b4de18042ae17996df046d) --- updated-dependencies: - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/actions/azure-login/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/azure-login/action.yml b/.github/actions/azure-login/action.yml index e92942e40..ea4a44d5a 100644 --- a/.github/actions/azure-login/action.yml +++ b/.github/actions/azure-login/action.yml @@ -27,7 +27,7 @@ runs: subscription-id: ${{ inputs.AZURE_SUBSCRIPTION_ID }} - name: Login to Azure Container Registry - uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0 + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 with: registry: adoptopenjdkacr.azurecr.io username: ${{ inputs.AZURE_CLIENT_ID }} From a38c447ed87732fa51e9ce713453dd2369299edc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:56:41 +0000 Subject: [PATCH 24/62] build(deps): bump actions/checkout from 4.1.0 to 4.1.1 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.0...b4ffde65f46336ab88eb53be808477a3936bae11) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/build-marketplace.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-marketplace.yml b/.github/workflows/build-marketplace.yml index 78770c6a0..017a4b017 100644 --- a/.github/workflows/build-marketplace.yml +++ b/.github/workflows/build-marketplace.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 with: From 5a44a25a7bfb33a26b997c1b24e00e023e71aff8 Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Wed, 18 Oct 2023 15:11:18 +0200 Subject: [PATCH 25/62] Add parameter to endpoints with: releaseType: ReleaseType = ReleaseType.ga --- .../v3/routes/stats/DownloadStatsResource.kt | 36 ++++++++++++------- .../net/adoptium/api/v3/models/ReleaseType.kt | 3 +- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt index 9055bc393..178758412 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt @@ -63,17 +63,19 @@ class DownloadStatsResource { @GET @Schema(hidden = true) @Path("/total/{feature_version}") - @Operation(summary = "Get download stats for feature verson", description = "stats", hidden = true) + @Operation(summary = "Get download stats for feature version", description = "stats", hidden = true) fun getTotalDownloadStats( @Parameter(name = "feature_version", description = "Feature version (i.e 8, 9, 10...)", required = true) @PathParam("feature_version") - featureVersion: Int + featureVersion: Int, + @Parameter(name = "release_type", description = "Release type (i.e all, ga, ea)", required = false) + @PathParam("release_type") + releaseType: ReleaseType = ReleaseType.ga ): Map { val release = apiDataStore.getAdoptRepos().getFeatureRelease(featureVersion) ?: throw BadRequestException("Unable to find version $featureVersion") - return getAdoptReleases(release) - .filter { it.release_type == ReleaseType.ga } + return getAdoptReleases(release, releaseType, null) .map { grouped -> Pair( grouped.release_name, @@ -96,14 +98,15 @@ class DownloadStatsResource { featureVersion: Int, @Parameter(name = "release_name", description = "Release Name i.e jdk-11.0.4+11", required = true) @PathParam("release_name") - releaseName: String + releaseName: String, + @Parameter(name = "release_type", description = "Release type (i.e all, ga, ea)", required = false) + @PathParam("release_type") + releaseType: ReleaseType = ReleaseType.ga ): Map { val release = apiDataStore.getAdoptRepos().getFeatureRelease(featureVersion) ?: throw BadRequestException("Unable to find version $featureVersion") - return getAdoptReleases(release) - .filter { it.release_type == ReleaseType.ga } - .filter { it.release_name == releaseName } + return getAdoptReleases(release, releaseType, releaseName) .flatMap { it.binaries.asSequence() } .flatMap { val archive = Pair(it.`package`.name, it.download_count) @@ -116,17 +119,26 @@ class DownloadStatsResource { .toMap() } - private fun getAdoptReleases(release: FeatureRelease): Sequence { - return release + private fun getAdoptReleases(release: FeatureRelease, releaseType: ReleaseType, releaseName: String?): Sequence { + var releases = release .releases .getReleases() + + if(releaseType != ReleaseType.all) { + releases = releases.filter { it.release_type == releaseType } + } + if(releaseName != null) { + releases = releases.filter { it.release_name == releaseName } + } + + return releases .filter { it.vendor == Vendor.getDefault() } } @GET @Schema(hidden = true) @Path("/tracking") - @Operation(summary = "Get download stats for feature verson", description = "stats", hidden = true) + @Operation(summary = "Get download stats for feature version", description = "stats", hidden = true) fun tracking( @Parameter(name = "days", description = "Number of days to display, if used in conjunction with from/to then this will limit the request to x days before the end of the given period", schema = Schema(defaultValue = "30", type = SchemaType.INTEGER), required = false) @QueryParam("days") @@ -166,7 +178,7 @@ class DownloadStatsResource { @GET @Schema(hidden = true) @Path("/monthly") - @Operation(summary = "Get download stats for feature verson", description = "stats", hidden = true) + @Operation(summary = "Get download stats for feature version", description = "stats", hidden = true) fun monthly( @Parameter(name = "source", description = "Stats data source", schema = Schema(defaultValue = "all"), required = false) @QueryParam("source") diff --git a/adoptium-models-parent/adoptium-api-v3-models/src/main/kotlin/net/adoptium/api/v3/models/ReleaseType.kt b/adoptium-models-parent/adoptium-api-v3-models/src/main/kotlin/net/adoptium/api/v3/models/ReleaseType.kt index 3f7825dce..7e5e3883d 100644 --- a/adoptium-models-parent/adoptium-api-v3-models/src/main/kotlin/net/adoptium/api/v3/models/ReleaseType.kt +++ b/adoptium-models-parent/adoptium-api-v3-models/src/main/kotlin/net/adoptium/api/v3/models/ReleaseType.kt @@ -3,8 +3,9 @@ package net.adoptium.api.v3.models import org.eclipse.microprofile.openapi.annotations.enums.SchemaType import org.eclipse.microprofile.openapi.annotations.media.Schema -@Schema(type = SchemaType.STRING, defaultValue = "ga", enumeration = ["ga", "ea"]) +@Schema(type = SchemaType.STRING, defaultValue = "ga", enumeration = ["all", "ga", "ea"]) enum class ReleaseType { + all, ga, ea; } From 932606fb4f1df582a30018777207742fa5147325 Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Wed, 18 Oct 2023 17:07:10 +0200 Subject: [PATCH 26/62] Use List of ReleaseType as parameter --- .../v3/routes/stats/DownloadStatsResource.kt | 20 +++++++++---------- .../net/adoptium/api/v3/models/ReleaseType.kt | 3 +-- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt index 178758412..171036201 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt @@ -68,14 +68,13 @@ class DownloadStatsResource { @Parameter(name = "feature_version", description = "Feature version (i.e 8, 9, 10...)", required = true) @PathParam("feature_version") featureVersion: Int, - @Parameter(name = "release_type", description = "Release type (i.e all, ga, ea)", required = false) - @PathParam("release_type") - releaseType: ReleaseType = ReleaseType.ga + @Parameter(name = "release_types", description = "List of release types to include in computation (i.e &release_types=ga,ea)", required = false) + @QueryParam("release_types") releaseTypes: List = listOf(ReleaseType.ga) ): Map { val release = apiDataStore.getAdoptRepos().getFeatureRelease(featureVersion) ?: throw BadRequestException("Unable to find version $featureVersion") - return getAdoptReleases(release, releaseType, null) + return getAdoptReleases(release, releaseTypes, null) .map { grouped -> Pair( grouped.release_name, @@ -99,14 +98,13 @@ class DownloadStatsResource { @Parameter(name = "release_name", description = "Release Name i.e jdk-11.0.4+11", required = true) @PathParam("release_name") releaseName: String, - @Parameter(name = "release_type", description = "Release type (i.e all, ga, ea)", required = false) - @PathParam("release_type") - releaseType: ReleaseType = ReleaseType.ga + @Parameter(name = "release_types", description = "List of release types to include in computation (i.e &release_types=ga,ea)", required = false) + @QueryParam("release_types") releaseTypes: List = listOf(ReleaseType.ga) ): Map { val release = apiDataStore.getAdoptRepos().getFeatureRelease(featureVersion) ?: throw BadRequestException("Unable to find version $featureVersion") - return getAdoptReleases(release, releaseType, releaseName) + return getAdoptReleases(release, releaseTypes, releaseName) .flatMap { it.binaries.asSequence() } .flatMap { val archive = Pair(it.`package`.name, it.download_count) @@ -119,13 +117,13 @@ class DownloadStatsResource { .toMap() } - private fun getAdoptReleases(release: FeatureRelease, releaseType: ReleaseType, releaseName: String?): Sequence { + private fun getAdoptReleases(release: FeatureRelease, releaseTypes: List, releaseName: String?): Sequence { var releases = release .releases .getReleases() - if(releaseType != ReleaseType.all) { - releases = releases.filter { it.release_type == releaseType } + if(releaseTypes.isNotEmpty()) { + releases = releases.filter { releaseTypes.contains(it.release_type) } } if(releaseName != null) { releases = releases.filter { it.release_name == releaseName } diff --git a/adoptium-models-parent/adoptium-api-v3-models/src/main/kotlin/net/adoptium/api/v3/models/ReleaseType.kt b/adoptium-models-parent/adoptium-api-v3-models/src/main/kotlin/net/adoptium/api/v3/models/ReleaseType.kt index 7e5e3883d..3f7825dce 100644 --- a/adoptium-models-parent/adoptium-api-v3-models/src/main/kotlin/net/adoptium/api/v3/models/ReleaseType.kt +++ b/adoptium-models-parent/adoptium-api-v3-models/src/main/kotlin/net/adoptium/api/v3/models/ReleaseType.kt @@ -3,9 +3,8 @@ package net.adoptium.api.v3.models import org.eclipse.microprofile.openapi.annotations.enums.SchemaType import org.eclipse.microprofile.openapi.annotations.media.Schema -@Schema(type = SchemaType.STRING, defaultValue = "ga", enumeration = ["all", "ga", "ea"]) +@Schema(type = SchemaType.STRING, defaultValue = "ga", enumeration = ["ga", "ea"]) enum class ReleaseType { - all, ga, ea; } From 68ab2eda6b27474a52dd4525989fee1167310273 Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Wed, 18 Oct 2023 17:14:47 +0200 Subject: [PATCH 27/62] Improve readability --- .../net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt index 171036201..bb8d3862e 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt @@ -121,16 +121,17 @@ class DownloadStatsResource { var releases = release .releases .getReleases() + .filter { it.vendor == Vendor.getDefault() } if(releaseTypes.isNotEmpty()) { releases = releases.filter { releaseTypes.contains(it.release_type) } } + if(releaseName != null) { releases = releases.filter { it.release_name == releaseName } } return releases - .filter { it.vendor == Vendor.getDefault() } } @GET From 0bb5814e7e9ac450eeffbc58018ff458c761589f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:53:09 +0000 Subject: [PATCH 28/62] build(deps): bump io.quarkus:quarkus-maven-plugin from 3.4.3 to 3.5.0 Bumps io.quarkus:quarkus-maven-plugin from 3.4.3 to 3.5.0. --- updated-dependencies: - dependency-name: io.quarkus:quarkus-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0c19678cc..442a97869 100644 --- a/pom.xml +++ b/pom.xml @@ -82,7 +82,7 @@ 4.7.3 UTF-8 UTF-8 - 3.4.3 + 3.5.0 From d722bd766464b61aefcbc628780439511a41d740 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Oct 2023 00:53:23 +0000 Subject: [PATCH 29/62] build(deps): bump quarkus.version from 3.4.3 to 3.5.0 Bumps `quarkus.version` from 3.4.3 to 3.5.0. Updates `io.quarkus:quarkus-bom` from 3.4.3 to 3.5.0 - [Release notes](https://github.com/quarkusio/quarkus/releases) - [Commits](https://github.com/quarkusio/quarkus/compare/3.4.3...3.5.0) Updates `io.quarkus:quarkus-security` from 3.4.3 to 3.5.0 Updates `io.quarkus:quarkus-core` from 3.4.3 to 3.5.0 Updates `io.quarkus:quarkus-elytron-security-properties-file` from 3.4.3 to 3.5.0 Updates `io.quarkus:quarkus-resteasy-reactive` from 3.4.3 to 3.5.0 --- updated-dependencies: - dependency-name: io.quarkus:quarkus-bom dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.quarkus:quarkus-security dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.quarkus:quarkus-core dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.quarkus:quarkus-elytron-security-properties-file dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.quarkus:quarkus-resteasy-reactive dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index fd56a1eb8..a2d4124ff 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -20,7 +20,7 @@ 3.4.5 UTF-8 UTF-8 - 3.4.3 + 3.5.0 5.3.2 From 118228fa57ab6d9bcc594940ba8a1202c390b585 Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Thu, 19 Oct 2023 10:52:07 +0200 Subject: [PATCH 30/62] Add parameter with default value --- .../v3/routes/stats/DownloadStatsResource.kt | 20 +++++++++++++------ .../net/adoptium/api/DownloadStatsPathTest.kt | 8 ++++---- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt index bb8d3862e..c48d545b8 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/stats/DownloadStatsResource.kt @@ -21,6 +21,7 @@ import java.util.concurrent.CompletionStage import jakarta.enterprise.context.ApplicationScoped import jakarta.inject.Inject import jakarta.ws.rs.BadRequestException +import jakarta.ws.rs.DefaultValue import jakarta.ws.rs.GET import jakarta.ws.rs.Path import jakarta.ws.rs.PathParam @@ -68,8 +69,11 @@ class DownloadStatsResource { @Parameter(name = "feature_version", description = "Feature version (i.e 8, 9, 10...)", required = true) @PathParam("feature_version") featureVersion: Int, - @Parameter(name = "release_types", description = "List of release types to include in computation (i.e &release_types=ga,ea)", required = false) - @QueryParam("release_types") releaseTypes: List = listOf(ReleaseType.ga) + + @Parameter(name = "release_types", description = "List of release types to include in computation (i.e &release_types=ga&release_types=ea)", required = false) + @QueryParam("release_types") + @DefaultValue("ga") + releaseTypes: List? ): Map { val release = apiDataStore.getAdoptRepos().getFeatureRelease(featureVersion) ?: throw BadRequestException("Unable to find version $featureVersion") @@ -95,11 +99,15 @@ class DownloadStatsResource { @Parameter(name = "feature_version", description = "Feature version (i.e 8, 9, 10...)", required = true) @PathParam("feature_version") featureVersion: Int, + @Parameter(name = "release_name", description = "Release Name i.e jdk-11.0.4+11", required = true) @PathParam("release_name") releaseName: String, - @Parameter(name = "release_types", description = "List of release types to include in computation (i.e &release_types=ga,ea)", required = false) - @QueryParam("release_types") releaseTypes: List = listOf(ReleaseType.ga) + + @Parameter(name = "release_types", description = "List of release types to include in computation (i.e &release_types=ga&release_types=ea)", required = false) + @QueryParam("release_types") + @DefaultValue("ga") + releaseTypes: List? ): Map { val release = apiDataStore.getAdoptRepos().getFeatureRelease(featureVersion) ?: throw BadRequestException("Unable to find version $featureVersion") @@ -117,13 +125,13 @@ class DownloadStatsResource { .toMap() } - private fun getAdoptReleases(release: FeatureRelease, releaseTypes: List, releaseName: String?): Sequence { + private fun getAdoptReleases(release: FeatureRelease, releaseTypes: List?, releaseName: String?): Sequence { var releases = release .releases .getReleases() .filter { it.vendor == Vendor.getDefault() } - if(releaseTypes.isNotEmpty()) { + if(releaseTypes != null && releaseTypes.isNotEmpty()) { releases = releases.filter { releaseTypes.contains(it.release_type) } } diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/test/kotlin/net/adoptium/api/DownloadStatsPathTest.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/test/kotlin/net/adoptium/api/DownloadStatsPathTest.kt index 4a6d25e7e..947d05586 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/test/kotlin/net/adoptium/api/DownloadStatsPathTest.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/test/kotlin/net/adoptium/api/DownloadStatsPathTest.kt @@ -158,14 +158,14 @@ class DownloadStatsPathTest : FrontendTest() { @Test fun totalVersionReturnsSaneData() { - val stats = downloadStatsResource.getTotalDownloadStats(8) + val stats = downloadStatsResource.getTotalDownloadStats(8, listOf(ReleaseType.ga)) assertTrue { return@assertTrue stats.isNotEmpty() && !stats.containsValue(0L) } } @Test fun badTotalVersionReturnsSaneData() { assertThrows { - downloadStatsResource.getTotalDownloadStats(101) + downloadStatsResource.getTotalDownloadStats(101, listOf(ReleaseType.ga)) } } @@ -179,7 +179,7 @@ class DownloadStatsPathTest : FrontendTest() { .filter { it.vendor == Vendor.getDefault() } .first() - val stats = downloadStatsResource.getTotalDownloadStatsForTag(release.version_data.major, release.release_name) + val stats = downloadStatsResource.getTotalDownloadStatsForTag(release.version_data.major, release.release_name, listOf(ReleaseType.ga)) assertTrue { return@assertTrue stats.isNotEmpty() && !stats.containsValue(0L) } } } @@ -187,7 +187,7 @@ class DownloadStatsPathTest : FrontendTest() { @Test fun badTotalTagReturnsSaneData() { assertThrows { - downloadStatsResource.getTotalDownloadStatsForTag(101, "fooBar") + downloadStatsResource.getTotalDownloadStatsForTag(101, "fooBar", listOf(ReleaseType.ga)) } } From 56720a2b203bd2b4ff5ce22fb57656ee6223f359 Mon Sep 17 00:00:00 2001 From: George Adams Date: Fri, 20 Oct 2023 14:26:22 +0100 Subject: [PATCH 31/62] cleanup unused files in prep for marketplace split --- .github/actions/docker-build/action.yml | 5 ++- .github/workflows/build-marketplace.yml | 50 ----------------------- .github/workflows/deploy-adoptium.yml | 1 + .github/workflows/deploy-adoptopenjdk.yml | 1 + .s2i/bin/assemble | 37 ----------------- .s2i/bin/save-artifacts | 7 ---- speccy.yaml | 14 ------- 7 files changed, 6 insertions(+), 109 deletions(-) delete mode 100644 .github/workflows/build-marketplace.yml delete mode 100644 .s2i/bin/assemble delete mode 100644 .s2i/bin/save-artifacts delete mode 100644 speccy.yaml diff --git a/.github/actions/docker-build/action.yml b/.github/actions/docker-build/action.yml index 824e14dc6..84596fe68 100644 --- a/.github/actions/docker-build/action.yml +++ b/.github/actions/docker-build/action.yml @@ -4,6 +4,9 @@ inputs: DOCKER_REPO: description: 'Docker repository' required: true + DOCKER_FILE: + description: 'Dockerfile path' + required: true BUILD_ARGS: description: 'Build arguments' required: false @@ -13,7 +16,7 @@ runs: - name: Build container image and push to Azure uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 with: - file: ./deploy/Dockerfile + file: ${{ inputs.DOCKER_FILE }} tags: ${{ inputs.DOCKER_REPO }}:latest build-args: ${{ inputs.BUILD_ARGS }} push: true diff --git a/.github/workflows/build-marketplace.yml b/.github/workflows/build-marketplace.yml deleted file mode 100644 index 017a4b017..000000000 --- a/.github/workflows/build-marketplace.yml +++ /dev/null @@ -1,50 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Marketplace build - -on: - push: - branches: [ marketplace ] - pull_request: - branches: [ marketplace ] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0 - with: - java-version: '21' - distribution: 'temurin' - cache: 'maven' - - - name: Build api - run: ./mvnw --batch-mode clean install -Padoptium - - - name: Build app - run: | - cd marketplace/ - ../mvnw --batch-mode clean install - - - name: Upload yaml schema - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - name: schema.yaml - path: marketplace/adoptium-marketplace-schema/target/generated/openapi.yaml - - - name: Upload json schema - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - name: schema.json - path: marketplace/adoptium-marketplace-schema/target/generated/openapi.json - - - name: Upload example data - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 - with: - name: example.json - path: marketplace/adoptium-marketplace-schema-tests/src/test/resources/net/adoptium/marketplace/schema/example.json diff --git a/.github/workflows/deploy-adoptium.yml b/.github/workflows/deploy-adoptium.yml index 8cc47546c..be7251fbc 100644 --- a/.github/workflows/deploy-adoptium.yml +++ b/.github/workflows/deploy-adoptium.yml @@ -36,6 +36,7 @@ jobs: uses: ./.github/actions/docker-build with: DOCKER_REPO: adoptopenjdkacr.azurecr.io/adoptopenjdk-${{ env.NAMESPACE }} + DOCKER_FILE: ./deploy/Dockerfile - name: Redeploy Kubernetes Updater and Frontend uses: ./.github/actions/kubectl-redeploy diff --git a/.github/workflows/deploy-adoptopenjdk.yml b/.github/workflows/deploy-adoptopenjdk.yml index e7070e03f..3249a3d69 100644 --- a/.github/workflows/deploy-adoptopenjdk.yml +++ b/.github/workflows/deploy-adoptopenjdk.yml @@ -36,6 +36,7 @@ jobs: uses: ./.github/actions/docker-build with: DOCKER_REPO: adoptopenjdkacr.azurecr.io/azure-${{ env.NAMESPACE }} + DOCKER_FILE: ./deploy/Dockerfile BUILD_ARGS: MAVEN_FLAGS="-Padoptopenjdk,-adoptium" - name: Redeploy Kubernetes Updater and Frontend diff --git a/.s2i/bin/assemble b/.s2i/bin/assemble deleted file mode 100644 index 25f5e3e21..000000000 --- a/.s2i/bin/assemble +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -# BUILDS FOR ADOPTOPENJDK, NOT ADOPTIUM - -set -euxo pipefail - -if [ "$(ls /tmp/artifacts/ 2>/dev/null)" ]; then - mv /tmp/artifacts/.m2 ${HOME}/ -fi - -cd /tmp/src -./mvnw -B clean install -Padoptopenjdk,-adoptium - -if [ -v SWAGGERHUB_APIKEY ]; then - cd adoptium-frontend-parent/adoptium-api-v3-frontend - unzip target/quarkus-app/quarkus/generated-bytecode.jar META-INF/quarkus-generated-openapi-doc.JSON || true - ../../mvnw io.swagger:swaggerhub-maven-plugin:upload || true - cd ../.. -fi - -mkdir -p /deployments - -cp -r adoptium-frontend-parent/adoptium-api-v3-frontend/target/quarkus-app/* /deployments/ - -cp adoptium-updater-parent/adoptium-api-v3-updater/target/adoptium-api-v3-updater-*-jar-with-dependencies.jar /deployments/adoptium-api-v3-updater-runner.jar -mv /deployments/quarkus-run.jar /deployments/adoptium-api-v3-frontend.jar - -mkdir -p /deployments/scripts -chmod +x scripts/* -cp scripts/* /deployments/scripts/ - -rm -rf /tmp/jboss || true -rm -rf /tmp/hsperfdata_* || true -rm -rf /tmp/vert* || true -rm -rf /logs/ || true -rm /tmp/updater.log || true -rm /tmp/frontend.log || true diff --git a/.s2i/bin/save-artifacts b/.s2i/bin/save-artifacts deleted file mode 100644 index 83f41cea1..000000000 --- a/.s2i/bin/save-artifacts +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -pushd ${HOME} >/dev/null - -tar cf - ./.m2 - -popd >/dev/null \ No newline at end of file diff --git a/speccy.yaml b/speccy.yaml deleted file mode 100644 index 2435628b5..000000000 --- a/speccy.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Output a lot of information about what is happening (wont work if you have quiet on) -# Default stdout = 1 -verbose: 2 -# Rules specific to the lint command -lint: - # rules files to load - rules: - - strict - # rules to skip - skip: - - info-contact - - operation-operationId - - short-summary - - tag-description \ No newline at end of file From 2a4ae5cc043a78528fa8607cafe68d793fc20159 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:51:52 +0000 Subject: [PATCH 32/62] build(deps): bump maven.surefire-plugin.version from 3.1.2 to 3.2.1 Bumps `maven.surefire-plugin.version` from 3.1.2 to 3.2.1. Updates `org.apache.maven.plugins:maven-failsafe-plugin` from 3.1.2 to 3.2.1 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1) Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.1.2 to 3.2.1 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-failsafe-plugin dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 442a97869..899217aee 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ 4.0.0-M11 3.3.0 4.7.3.6 - 3.1.2 + 3.2.1 1.0.10 1.2.0 3.1.0 From 7fd22e3ce0437cf68f68f8a909643b4d35cab0bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:52:03 +0000 Subject: [PATCH 33/62] build(deps): bump org.apache.maven.plugins:maven-jxr-plugin Bumps [org.apache.maven.plugins:maven-jxr-plugin](https://github.com/apache/maven-jxr) from 3.3.0 to 3.3.1. - [Commits](https://github.com/apache/maven-jxr/compare/jxr-3.3.0...jxr-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-jxr-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 442a97869..ca767a489 100644 --- a/pom.xml +++ b/pom.xml @@ -55,7 +55,7 @@ 2.0 3.0.0-alpha-1 3.1.2 - 3.3.0 + 3.3.1 2.2.0 7.0.1 1.15.1 From c199ffb10b35142e8bc97582df3143cbf55ce7da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:52:08 +0000 Subject: [PATCH 34/62] build(deps): bump org.apache.maven.plugins:maven-dependency-plugin Bumps [org.apache.maven.plugins:maven-dependency-plugin](https://github.com/apache/maven-dependency-plugin) from 3.6.0 to 3.6.1. - [Commits](https://github.com/apache/maven-dependency-plugin/compare/maven-dependency-plugin-3.6.0...maven-dependency-plugin-3.6.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-dependency-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 442a97869..a492ba447 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ 17 17 17 - 3.6.0 + 3.6.1 2.0.4 3.1.1 1.0 From bb9927494b4aa9234ccbe330c9fce57964cf7111 Mon Sep 17 00:00:00 2001 From: George Adams Date: Tue, 24 Oct 2023 14:06:35 +0100 Subject: [PATCH 35/62] add favicon to remove file not found error --- .../resources/META-INF/resources/favicon.ico | Bin 0 -> 4286 bytes .../resources/META-INF/resources/favicon.ico | Bin 0 -> 5430 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 adoptium-frontend-parent/adoptium-frontend-assets/src/main/resources/META-INF/resources/favicon.ico create mode 100644 adoptium-frontend-parent/adoptopenjdk-frontend-assets/src/main/resources/META-INF/resources/favicon.ico diff --git a/adoptium-frontend-parent/adoptium-frontend-assets/src/main/resources/META-INF/resources/favicon.ico b/adoptium-frontend-parent/adoptium-frontend-assets/src/main/resources/META-INF/resources/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..19260dad5a02688666cc301f4d421db9e5a78fd9 GIT binary patch literal 4286 zcmcJTdr(y88OBdZl*W^DSx+ldMC%q&A45Z6X~NIsIT_k6M+b?t@ak=|9LkI4=%urktWO-VZ<{d7E%Ue z{BDhWrqk1nmA|;w$3OY*9===U3;&yEY?K}wE_UzEs|4KV?almBZfn%)yIYvfYQ3S3O3lP_YiV(}Ae z(cQ(h*E zWIHR6ag1CdYH>&I8ue^RI!mr85oZx3v3CQs$o zAUWb9RgFaLG0Be&T1kEul_}$h>xpAePLcfm<+Dz*<@qz@{8Rml^Jho$F4=c?nz#l> zU-og6Bfe(;SIRMn56(h-&@0qhYK!p-}LScJ1xTd@c2Ie>nV zfjpI4!Ovg9q$|h5@WYrLyn)I_eDFHP@Uo2KuggA=u{YIq!1ln`!{+z)FV4T+tM^NO z{eN8aUqPnemQm-ZGcf8(F;DXb`I~y;SdTd&*|>V)rsVHkTi^TqAF}^@`xob*ZPW{B zYj(;Qwi#+9*C@E!FR0Vh=P-o*i_9&U6TF!*eEED^vj@w5R>Ae#=lo}1i1Ux< z&j9n!-@nLz4(1+{@2fm{$Hz_7e#ZG%g2eEXSg0+=ypUY-|3YoSSH)N4^F=!v{PUmh z?O*VpAGeYFk$2Bu^M`UWPmz6s+~XYoW7H8m7q*9c(sr!+?LQ^kM_cxN=FaP_W{0siNr*?RK zb#!6rxRc}^qKe2q2m{%M@DH)*vG?Ha@b=S&spZ@=d-y~6HwNE5e+L?WHUGU(QY&L9 ze7%O;k2&wi4f~Kf!2bUL2VSd^_b-&#>3zWb*WbU(d;U$SQO{rh`QJPLe%W}e)+xs$w#Km#^ef8I1 z{(nIIC+5G?s=qDs{@!f$GwaW2)}IwWQvFxK`ZHQ(4c3}8vi_b=|NFT9YPtSfSpPaW z{~YXp2m7CGF58_{o`dx-Rp4O#OBFd-|2nw-snQnizqPEt_gVCp<_}hXcPh&IW<`0p gPEoWc6eVzjqTDB>i2pYDKT3V?2{P))5=_DVFCR9Ef&c&j literal 0 HcmV?d00001 diff --git a/adoptium-frontend-parent/adoptopenjdk-frontend-assets/src/main/resources/META-INF/resources/favicon.ico b/adoptium-frontend-parent/adoptopenjdk-frontend-assets/src/main/resources/META-INF/resources/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..6dcd214b52b082780a457625fc659d104c1e7991 GIT binary patch literal 5430 zcmeHK%WB&|6uo*&mMqEg6Wei=I5>_8d6X7P7bSF2y2vVYQ9=lzi;`9Fs+15)7a^@ZiV+yAxKnDQQ zbkhHd`~bNwa(Ib~36J5wY;j=kcbDTkM!l4~poO*@;gC6su5GLpL+4QBs)=`2j@|dq zHp*khNPnlJ+sT@fd({y$f);^9Rg}+yFJqQ=~kTBK8oJk5p3*CG&Cv&ptlm=i~q0bYsznY&-GR`njRPX zm4bWB+TBj^r#Lo!?bt?3Jzx31=-*#0@jfh7{7V_AM&&()`|F)dM?BUozxO}ZD(6{R z-v4~>MU9=MXtceSJjg)xEPI3JhZ~uWc&rl-Si8Ae_@1S8EWJ+JMgRWQ`qlq;x;7B| z|GNI5{F-yjEg9&H%zGMZmQ8KS~_!QX*CUO)~cu+SVRZLlJ@OWqt@AYI>aTE literal 0 HcmV?d00001 From ab79196ddef9c1858717f0650217bc79a4d35e1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 00:18:21 +0000 Subject: [PATCH 36/62] build(deps): bump org.codehaus.mojo:license-maven-plugin Bumps [org.codehaus.mojo:license-maven-plugin](https://github.com/mojohaus/license-maven-plugin) from 2.2.0 to 2.3.0. - [Release notes](https://github.com/mojohaus/license-maven-plugin/releases) - [Commits](https://github.com/mojohaus/license-maven-plugin/compare/2.2.0...2.3.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:license-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e4fb314cc..aa2a0af45 100644 --- a/pom.xml +++ b/pom.xml @@ -56,7 +56,7 @@ 3.0.0-alpha-1 3.1.2 3.3.1 - 2.2.0 + 2.3.0 7.0.1 1.15.1 3.21.0 From 7f2b1cb7e8c6a54da82c56a567d5985a7566401f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 Oct 2023 00:18:41 +0000 Subject: [PATCH 37/62] build(deps): bump org.pitest:pitest-maven from 1.15.1 to 1.15.2 Bumps [org.pitest:pitest-maven](https://github.com/hcoles/pitest) from 1.15.1 to 1.15.2. - [Release notes](https://github.com/hcoles/pitest/releases) - [Commits](https://github.com/hcoles/pitest/compare/1.15.1...1.15.2) --- updated-dependencies: - dependency-name: org.pitest:pitest-maven dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e4fb314cc..9cb82b212 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ 3.3.1 2.2.0 7.0.1 - 1.15.1 + 1.15.2 3.21.0 3.4.5 0.15 From a1f86e6161a6a6fb5bf2dcbe601536d65d1e2ca4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 00:31:44 +0000 Subject: [PATCH 38/62] build(deps): bump digitalocean/action-doctl in /.github/actions/do-login Bumps [digitalocean/action-doctl](https://github.com/digitalocean/action-doctl) from 2.4.1 to 2.5.0. - [Release notes](https://github.com/digitalocean/action-doctl/releases) - [Commits](https://github.com/digitalocean/action-doctl/compare/cf10ddb4467f6fb84c01f7cc5f099cec71eabc93...e5cb5b0cde9789f79c5115c2c4d902f38a708804) --- updated-dependencies: - dependency-name: digitalocean/action-doctl dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/actions/do-login/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/do-login/action.yml b/.github/actions/do-login/action.yml index 9670c59e5..7b28fdfe9 100644 --- a/.github/actions/do-login/action.yml +++ b/.github/actions/do-login/action.yml @@ -8,7 +8,7 @@ runs: using: composite steps: - name: Login to DigitalOcean - uses: digitalocean/action-doctl@cf10ddb4467f6fb84c01f7cc5f099cec71eabc93 # v2.4.1 + uses: digitalocean/action-doctl@e5cb5b0cde9789f79c5115c2c4d902f38a708804 # v2.5.0 with: token: ${{ inputs.DIGITALOCEAN_ACCESS_TOKEN }} From be8236674f6f95b12c7a561a1dd8bcec82a3a578 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 Oct 2023 00:32:00 +0000 Subject: [PATCH 39/62] build(deps-dev): bump io.smallrye:smallrye-open-api-core Bumps [io.smallrye:smallrye-open-api-core](https://github.com/smallrye/smallrye-open-api) from 3.6.2 to 3.7.0. - [Release notes](https://github.com/smallrye/smallrye-open-api/releases) - [Commits](https://github.com/smallrye/smallrye-open-api/compare/3.6.2...3.7.0) --- updated-dependencies: - dependency-name: io.smallrye:smallrye-open-api-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index a2d4124ff..9ba17a0e0 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -343,7 +343,7 @@ io.smallrye smallrye-open-api-core - 3.6.2 + 3.7.0 test From fb7850b992a757a38bc4a5562e68ad2bf06aa173 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Oct 2023 00:24:27 +0000 Subject: [PATCH 40/62] build(deps): bump org.apache.maven.plugins:maven-clean-plugin Bumps [org.apache.maven.plugins:maven-clean-plugin](https://github.com/apache/maven-clean-plugin) from 3.3.1 to 3.3.2. - [Release notes](https://github.com/apache/maven-clean-plugin/releases) - [Commits](https://github.com/apache/maven-clean-plugin/compare/maven-clean-plugin-3.3.1...maven-clean-plugin-3.3.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-clean-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2b9a49a18..19245c5a5 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 3.4.0 2.12.1 3.3.0 - 3.3.1 + 3.3.2 3.11.0 17 17 From 86d3b6f80c161be9607eacfc4288805808bf4a75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 27 Oct 2023 00:24:31 +0000 Subject: [PATCH 41/62] build(deps): bump de.flapdoodle.embed:de.flapdoodle.embed.mongo Bumps [de.flapdoodle.embed:de.flapdoodle.embed.mongo](https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo) from 4.9.2 to 4.9.3. - [Commits](https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/compare/de.flapdoodle.embed.mongo-4.9.2...de.flapdoodle.embed.mongo-4.9.3) --- updated-dependencies: - dependency-name: de.flapdoodle.embed:de.flapdoodle.embed.mongo dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index a2d4124ff..7f87b1421 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -200,7 +200,7 @@ de.flapdoodle.embed de.flapdoodle.embed.mongo - 4.9.2 + 4.9.3 test From 3a84aec21d8dca82e00d0b5a4ed53361d844ec65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 00:43:55 +0000 Subject: [PATCH 42/62] build(deps): bump kotlin.version from 1.9.10 to 1.9.20 Bumps `kotlin.version` from 1.9.10 to 1.9.20. Updates `org.jetbrains.kotlin:kotlin-bom` from 1.9.10 to 1.9.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) Updates `org.jetbrains.kotlin:kotlin-test-junit5` from 1.9.10 to 1.9.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/commits) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-bom dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-test-junit5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 7f87b1421..26056a11e 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -13,7 +13,7 @@ 17 4.10.0 17 - 1.9.10 + 1.9.20 1.4.11 17 3.9.5 From f09f8d5003a3c4ea4c6d4313997b73d1a6ae75eb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 00:44:16 +0000 Subject: [PATCH 43/62] build(deps-dev): bump org.eclipse.jetty:jetty-server Bumps org.eclipse.jetty:jetty-server from 12.0.2 to 12.0.3. --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-server dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 7f87b1421..0d20253a1 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -349,7 +349,7 @@ org.eclipse.jetty jetty-server - 12.0.2 + 12.0.3 test From a74a117ff783c0a81d0f6c047357b340d8ea6334 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 31 Oct 2023 00:44:24 +0000 Subject: [PATCH 44/62] build(deps): bump org.eclipse.jetty:jetty-client from 12.0.2 to 12.0.3 Bumps org.eclipse.jetty:jetty-client from 12.0.2 to 12.0.3. --- updated-dependencies: - dependency-name: org.eclipse.jetty:jetty-client dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 7f87b1421..d59abd07a 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -355,7 +355,7 @@ org.eclipse.jetty jetty-client - 12.0.2 + 12.0.3 org.bouncycastle From 425f9d7393f3004b8ef92a627031e47ccc0e81a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 00:49:14 +0000 Subject: [PATCH 45/62] build(deps): bump kotlin.version from 1.9.10 to 1.9.20 Bumps `kotlin.version` from 1.9.10 to 1.9.20. Updates `org.jetbrains.kotlin:kotlin-maven-plugin` from 1.9.10 to 1.9.20 Updates `org.jetbrains.kotlin:kotlin-maven-allopen` from 1.9.10 to 1.9.20 --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-maven-allopen dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19245c5a5..1c8a5ce05 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ 0.8.11 17 17 - 1.9.10 + 1.9.20 3.1.0 3.6.0 3.4.0 From 71c774c1b7ca9f097595c84b99ff690ac8babcc3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 00:49:18 +0000 Subject: [PATCH 46/62] build(deps): bump org.pitest:pitest-maven from 1.15.2 to 1.15.3 Bumps [org.pitest:pitest-maven](https://github.com/hcoles/pitest) from 1.15.2 to 1.15.3. - [Release notes](https://github.com/hcoles/pitest/releases) - [Commits](https://github.com/hcoles/pitest/compare/1.15.2...1.15.3) --- updated-dependencies: - dependency-name: org.pitest:pitest-maven dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 19245c5a5..a66bab733 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ 3.3.1 2.3.0 7.0.1 - 1.15.2 + 1.15.3 3.21.0 3.4.5 0.15 From 962cb62b643c165ba4a6a19b0a79688b5869b893 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 00:49:24 +0000 Subject: [PATCH 47/62] build(deps): bump com.microsoft.azure:applicationinsights-runtime-attach Bumps [com.microsoft.azure:applicationinsights-runtime-attach](https://github.com/Microsoft/ApplicationInsights-Java) from 3.4.17 to 3.4.18. - [Release notes](https://github.com/Microsoft/ApplicationInsights-Java/releases) - [Changelog](https://github.com/microsoft/ApplicationInsights-Java/blob/main/CHANGELOG.md) - [Commits](https://github.com/Microsoft/ApplicationInsights-Java/compare/3.4.17...3.4.18) --- updated-dependencies: - dependency-name: com.microsoft.azure:applicationinsights-runtime-attach dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 5872c5374..93a71ea03 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -263,7 +263,7 @@ com.microsoft.azure applicationinsights-runtime-attach - 3.4.17 + 3.4.18 io.opentelemetry.javaagent.instrumentation From b5a6ef2b713f728098ac796ec328e37bd19f9deb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 00:27:45 +0000 Subject: [PATCH 48/62] build(deps): bump org.junit.jupiter:junit-jupiter from 5.10.0 to 5.10.1 Bumps [org.junit.jupiter:junit-jupiter](https://github.com/junit-team/junit5) from 5.10.0 to 5.10.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.10.0...r5.10.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 93a71ea03..712b2a04d 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -337,7 +337,7 @@ org.junit.jupiter junit-jupiter - 5.10.0 + 5.10.1 test From bfd67a57428b168d70cb107c44fee360f52314cd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 00:27:51 +0000 Subject: [PATCH 49/62] build(deps): bump de.flapdoodle.embed:de.flapdoodle.embed.mongo Bumps [de.flapdoodle.embed:de.flapdoodle.embed.mongo](https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo) from 4.9.3 to 4.10.0. - [Commits](https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/compare/de.flapdoodle.embed.mongo-4.9.3...de.flapdoodle.embed.mongo-4.10.0) --- updated-dependencies: - dependency-name: de.flapdoodle.embed:de.flapdoodle.embed.mongo dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 93a71ea03..139167b8d 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -200,7 +200,7 @@ de.flapdoodle.embed de.flapdoodle.embed.mongo - 4.9.3 + 4.10.0 test From e0a443994650ab768edb5dd1dcda4d8459edea1c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 00:28:01 +0000 Subject: [PATCH 50/62] build(deps): bump org.apache.maven.plugins:maven-pmd-plugin Bumps [org.apache.maven.plugins:maven-pmd-plugin](https://github.com/apache/maven-pmd-plugin) from 3.21.0 to 3.21.2. - [Release notes](https://github.com/apache/maven-pmd-plugin/releases) - [Commits](https://github.com/apache/maven-pmd-plugin/compare/maven-pmd-plugin-3.21.0...maven-pmd-plugin-3.21.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-pmd-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e7014609..ef3df70b1 100644 --- a/pom.xml +++ b/pom.xml @@ -59,7 +59,7 @@ 2.3.0 7.0.1 1.15.3 - 3.21.0 + 3.21.2 3.4.5 0.15 3.0.1 From 9256c0a6b7161d5d3da5d5f05d2fe0be001d118d Mon Sep 17 00:00:00 2001 From: George Adams Date: Mon, 6 Nov 2023 08:55:42 +0000 Subject: [PATCH 51/62] Update adoptium-api-versions/pom.xml Co-authored-by: Xavier FACQ --- adoptium-api-versions/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 9ba17a0e0..bd42326ce 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -346,6 +346,12 @@ 3.7.0 test + + io.smallrye + smallrye-open-api-jaxrs + 3.7.0 + test + org.eclipse.jetty jetty-server From 5c2496b8386502062f9a3f2badcf7f11cc357bfe Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Mon, 6 Nov 2023 19:39:46 +0100 Subject: [PATCH 52/62] updated-dependencies: graphql-kotlin from 7.0.1 to 7.0.2 --- adoptium-api-versions/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index e0e0e4463..e4ae70c97 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -411,7 +411,7 @@ com.expediagroup graphql-kotlin-ktor-client - 7.0.1 + 7.0.2 org.jetbrains.kotlinx @@ -422,7 +422,7 @@ com.expediagroup graphql-kotlin-client-jackson - 7.0.1 + 7.0.2 From ec1b753bfa8f8aaa7753bf0e850c4b2c8c0402fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 00:32:08 +0000 Subject: [PATCH 53/62] build(deps): bump maven.surefire-plugin.version from 3.2.1 to 3.2.2 Bumps `maven.surefire-plugin.version` from 3.2.1 to 3.2.2. Updates `org.apache.maven.plugins:maven-failsafe-plugin` from 3.2.1 to 3.2.2 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2) Updates `org.apache.maven.plugins:maven-surefire-plugin` from 3.2.1 to 3.2.2 - [Release notes](https://github.com/apache/maven-surefire/releases) - [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.2.1...surefire-3.2.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-failsafe-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.apache.maven.plugins:maven-surefire-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef3df70b1..b8bcfac59 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ 4.0.0-M11 3.3.0 4.7.3.6 - 3.2.1 + 3.2.2 1.0.10 1.2.0 3.1.0 From 3e84c4597154bfb4459cc3b6da23712e45a5677d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 00:32:12 +0000 Subject: [PATCH 54/62] build(deps): bump org.apache.maven.plugins:maven-javadoc-plugin Bumps [org.apache.maven.plugins:maven-javadoc-plugin](https://github.com/apache/maven-javadoc-plugin) from 3.6.0 to 3.6.2. - [Release notes](https://github.com/apache/maven-javadoc-plugin/releases) - [Commits](https://github.com/apache/maven-javadoc-plugin/compare/maven-javadoc-plugin-3.6.0...maven-javadoc-plugin-3.6.2) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-javadoc-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ef3df70b1..1f537b1a6 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ 0.8.10 3.3.0 - 3.6.0 + 3.6.2 2.0 3.0.0-alpha-1 From d042520e559c0c5aae6e3341b465e9e57cdb23b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 7 Nov 2023 00:32:25 +0000 Subject: [PATCH 55/62] build(deps): bump org.jboss.weld:weld-junit5 Bumps [org.jboss.weld:weld-junit5](https://github.com/weld/weld-junit) from 4.0.0.Final to 4.0.1.Final. - [Release notes](https://github.com/weld/weld-junit/releases) - [Commits](https://github.com/weld/weld-junit/compare/4.0.0.Final...4.0.1.Final) --- updated-dependencies: - dependency-name: org.jboss.weld:weld-junit5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index e4ae70c97..78f3b473c 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -278,7 +278,7 @@ org.jboss.weld weld-junit5 - 4.0.0.Final + 4.0.1.Final test From 399c05108bacf15be4b4c544998fa1e5aff5106d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 00:07:39 +0000 Subject: [PATCH 56/62] build(deps): bump kmongo.version from 4.10.0 to 4.11.0 Bumps `kmongo.version` from 4.10.0 to 4.11.0. Updates `org.litote.kmongo:kmongo-coroutine` from 4.10.0 to 4.11.0 - [Release notes](https://github.com/Litote/kmongo/releases) - [Commits](https://github.com/Litote/kmongo/compare/kmongo-4.10.0...kmongo-4.11.0) Updates `org.litote.kmongo:kmongo-flapdoodle` from 4.10.0 to 4.11.0 - [Release notes](https://github.com/Litote/kmongo/releases) - [Commits](https://github.com/Litote/kmongo/compare/kmongo-4.10.0...kmongo-4.11.0) Updates `org.litote.kmongo:kmongo-id-jackson` from 4.10.0 to 4.11.0 - [Release notes](https://github.com/Litote/kmongo/releases) - [Commits](https://github.com/Litote/kmongo/compare/kmongo-4.10.0...kmongo-4.11.0) --- updated-dependencies: - dependency-name: org.litote.kmongo:kmongo-coroutine dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.litote.kmongo:kmongo-flapdoodle dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: org.litote.kmongo:kmongo-id-jackson dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 78f3b473c..cbea94bea 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -11,7 +11,7 @@ 1.7.3 2.15.3 17 - 4.10.0 + 4.11.0 17 1.9.20 1.4.11 From 258f524647db63a0f061f9b498873d762af415cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 00:07:55 +0000 Subject: [PATCH 57/62] build(deps): bump com.github.spotbugs:spotbugs-maven-plugin Bumps [com.github.spotbugs:spotbugs-maven-plugin](https://github.com/spotbugs/spotbugs-maven-plugin) from 4.7.3.6 to 4.8.1.0. - [Release notes](https://github.com/spotbugs/spotbugs-maven-plugin/releases) - [Commits](https://github.com/spotbugs/spotbugs-maven-plugin/compare/spotbugs-maven-plugin-4.7.3.6...spotbugs-maven-plugin-4.8.1.0) --- updated-dependencies: - dependency-name: com.github.spotbugs:spotbugs-maven-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bc113ea1b..0aba3a69a 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ 2.0.1 4.0.0-M11 3.3.0 - 4.7.3.6 + 4.8.1.0 3.2.2 1.0.10 1.2.0 From 4ab79c5736bc1bf05f0bad7ff391e0800971636f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Nov 2023 00:08:08 +0000 Subject: [PATCH 58/62] build(deps): bump de.flapdoodle.embed:de.flapdoodle.embed.mongo Bumps [de.flapdoodle.embed:de.flapdoodle.embed.mongo](https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo) from 4.10.0 to 4.10.1. - [Commits](https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/compare/de.flapdoodle.embed.mongo-4.10.0...de.flapdoodle.embed.mongo-4.10.1) --- updated-dependencies: - dependency-name: de.flapdoodle.embed:de.flapdoodle.embed.mongo dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 78f3b473c..96530f2fe 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -200,7 +200,7 @@ de.flapdoodle.embed de.flapdoodle.embed.mongo - 4.10.0 + 4.10.1 test From 015a6ec42f78802f34b46ecf66a213768427b6b7 Mon Sep 17 00:00:00 2001 From: Xavier FACQ Date: Wed, 8 Nov 2023 15:17:40 +0100 Subject: [PATCH 59/62] Ensure no duplicate is returned --- .../net/adoptium/api/v3/routes/info/ReleaseListResource.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/info/ReleaseListResource.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/info/ReleaseListResource.kt index f1426036b..70a273a66 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/info/ReleaseListResource.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/routes/info/ReleaseListResource.kt @@ -151,6 +151,7 @@ constructor( semver ) .map { it.release_name } + .distinct() val pagedReleases = getPage(pageSize, page, releases, showPageCount ?: false) From 57a32084d3a96c030a5fa175ea357042db352a1d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 00:56:06 +0000 Subject: [PATCH 60/62] build(deps): bump io.quarkus:quarkus-maven-plugin from 3.5.0 to 3.5.1 Bumps io.quarkus:quarkus-maven-plugin from 3.5.0 to 3.5.1. --- updated-dependencies: - dependency-name: io.quarkus:quarkus-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0aba3a69a..8d0928d69 100644 --- a/pom.xml +++ b/pom.xml @@ -82,7 +82,7 @@ 4.7.3 UTF-8 UTF-8 - 3.5.0 + 3.5.1 From c259c05eaf9499f3ba36b046cd8406283916d0cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 9 Nov 2023 00:56:27 +0000 Subject: [PATCH 61/62] build(deps): bump quarkus.version from 3.5.0 to 3.5.1 Bumps `quarkus.version` from 3.5.0 to 3.5.1. Updates `io.quarkus:quarkus-bom` from 3.5.0 to 3.5.1 - [Release notes](https://github.com/quarkusio/quarkus/releases) - [Commits](https://github.com/quarkusio/quarkus/compare/3.5.0...3.5.1) Updates `io.quarkus:quarkus-security` from 3.5.0 to 3.5.1 Updates `io.quarkus:quarkus-core` from 3.5.0 to 3.5.1 Updates `io.quarkus:quarkus-elytron-security-properties-file` from 3.5.0 to 3.5.1 Updates `io.quarkus:quarkus-resteasy-reactive` from 3.5.0 to 3.5.1 --- updated-dependencies: - dependency-name: io.quarkus:quarkus-bom dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus:quarkus-security dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus:quarkus-core dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus:quarkus-elytron-security-properties-file dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.quarkus:quarkus-resteasy-reactive dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- adoptium-api-versions/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adoptium-api-versions/pom.xml b/adoptium-api-versions/pom.xml index 3e100f32f..543329fde 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -20,7 +20,7 @@ 3.4.5 UTF-8 UTF-8 - 3.5.0 + 3.5.1 5.3.2 From bbe9ff25c983fdccccf03ff073fa3998a2258695 Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 8 Nov 2023 21:05:09 +0000 Subject: [PATCH 62/62] add support for using GitHub app-based authentication --- CONTRIBUTING.md | 18 ++++ .../src/main/resources/application.properties | 2 + .../src/main/resources/logback.xml | 2 + .../kotlin/net/adoptium/api/GitHubAuthTest.kt | 12 +-- .../adoptium-github-datasource/pom.xml | 22 +++++ .../api/v3/dataSources/github/GitHubAuth.kt | 86 +++++++++++++++++-- .../graphql/clients/GraphQLRequestImpl.kt | 11 +-- .../adoptium-http-client-datasource/pom.xml | 22 +++++ .../dataSources/DefaultUpdaterHtmlClient.kt | 24 ++++-- .../adoptium/api/v3/dataSources/GitHubAuth.kt | 82 ++++++++++++++++-- docker-compose.yml | 4 +- 11 files changed, 250 insertions(+), 35 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a5a966516..4f66ec001 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,6 +34,24 @@ If you want to use the updater tool to add entries into the database, you need t The production server uses mongodb to store data, however you can also use Fongo. If you would like to install mongodb and are on mac, I used this [guide](https://zellwk.com/blog/install-mongodb/) which utilizes homebrew. You can also install `mongo` which is a command-line tool that gives you access to your mongodb, allowing you to manually search through the database. +### GitHub App Authentication + +The updater can be used with a GitHub Token or GitHub App. To use a GitHub app you need to generate an app on GitHub. Once you've done that you need to convert the key to PKCS#8 format using the following command: + +```bash +openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in your-rsa-private-key.pem -out pkcs8-key.pem +``` + +Once this is done you can export the following variables at runtime: + +```bash +export GITHUB_APP_ID="1234" +export GITHUB_APP_INSTALLATION_ID="1234" +export GITHUB_APP_PRIVATE_KEY=$'-----BEGIN PRIVATE KEY----- + +-----END PRIVATE KEY-----' +``` + ### Build Tool [Maven](https://maven.apache.org/index.html) is used to build the project. diff --git a/adoptium-updater-parent/adoptium-api-v3-updater/src/main/resources/application.properties b/adoptium-updater-parent/adoptium-api-v3-updater/src/main/resources/application.properties index ae811897b..cc774661d 100644 --- a/adoptium-updater-parent/adoptium-api-v3-updater/src/main/resources/application.properties +++ b/adoptium-updater-parent/adoptium-api-v3-updater/src/main/resources/application.properties @@ -12,6 +12,8 @@ quarkus.log.category."org.mongodb".level=INFO quarkus.log.category."net.adoptium.api.v3.dataSources.APIDataStore".level=WARN quarkus.log.category."org.apache.http.client.protocol.ResponseProcessCookies".level=ERROR quarkus.log.category."io.netty".level=INFO +quarkus.log.category."org.kohsuke".level=WARN +quarkus.log.category."jdk.event.security".level=WARN quarkus.http.host=localhost diff --git a/adoptium-updater-parent/adoptium-api-v3-updater/src/main/resources/logback.xml b/adoptium-updater-parent/adoptium-api-v3-updater/src/main/resources/logback.xml index 64dfd08a5..a441e7b11 100644 --- a/adoptium-updater-parent/adoptium-api-v3-updater/src/main/resources/logback.xml +++ b/adoptium-updater-parent/adoptium-api-v3-updater/src/main/resources/logback.xml @@ -5,6 +5,8 @@ + + /tmp/updater.log diff --git a/adoptium-updater-parent/adoptium-api-v3-updater/src/test/kotlin/net/adoptium/api/GitHubAuthTest.kt b/adoptium-updater-parent/adoptium-api-v3-updater/src/test/kotlin/net/adoptium/api/GitHubAuthTest.kt index 8e75513e7..eb854d75b 100644 --- a/adoptium-updater-parent/adoptium-api-v3-updater/src/test/kotlin/net/adoptium/api/GitHubAuthTest.kt +++ b/adoptium-updater-parent/adoptium-api-v3-updater/src/test/kotlin/net/adoptium/api/GitHubAuthTest.kt @@ -50,14 +50,14 @@ class GitHubAuthTest { } @Test - fun `readToken prioritizes system property if env var is not defined`() { + suspend fun `readToken prioritizes system property if env var is not defined`() { assertFalse(System.getenv().containsKey(tokenKey)) val prevTokenProperty: String? = System.getProperty(tokenKey) System.setProperty(tokenKey, "system-property-token") try { - val actualToken = GitHubAuth.readToken() + val actualToken = GitHubAuth.getAuthenticationToken().token assertEquals("system-property-token", actualToken) } finally { if (prevTokenProperty == null) { @@ -69,7 +69,7 @@ class GitHubAuthTest { } @Test - fun `readToken falls back to property file if env var and system property are not defined`() { + suspend fun `readToken falls back to property file if env var and system property are not defined`() { assertFalse(System.getenv().containsKey(tokenKey)) assertFalse(System.getProperties().containsKey(tokenKey)) @@ -81,7 +81,7 @@ class GitHubAuthTest { } try { - val actualToken = GitHubAuth.readToken() + val actualToken = GitHubAuth.getAuthenticationToken().token assertEquals("real-file-token", actualToken) } finally { tokenDir.deleteRecursively() @@ -89,11 +89,11 @@ class GitHubAuthTest { } @Test - fun readsTokenNullFromFile() { + suspend fun readsTokenNullFromFile() { assertFalse(System.getenv().containsKey(tokenKey)) assertFalse(File(tempDir, ".adopt_api").exists()) - val actualToken = GitHubAuth.readToken() + val actualToken = GitHubAuth.getAuthenticationToken().token assertThat(actualToken, oneOf(null, "")) } } diff --git a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/pom.xml b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/pom.xml index e61ce282c..c468bd490 100644 --- a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/pom.xml +++ b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/pom.xml @@ -16,6 +16,23 @@ net.adoptium.api adoptium-http-client-datasource + + io.jsonwebtoken + jjwt-api + 0.12.3 + + + io.jsonwebtoken + jjwt-impl + 0.12.3 + runtime + + + io.jsonwebtoken + jjwt-jackson + 0.12.3 + runtime + com.expediagroup graphql-kotlin-ktor-client @@ -30,6 +47,11 @@ com.expediagroup graphql-kotlin-client-jackson + + org.kohsuke + github-api + 1.317 + net.adoptium.api adoptium-api-v3-persistence diff --git a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/GitHubAuth.kt b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/GitHubAuth.kt index 85f1ab5e0..354b9187b 100644 --- a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/GitHubAuth.kt +++ b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/GitHubAuth.kt @@ -1,22 +1,59 @@ package net.adoptium.api.v3.dataSources.github -import org.slf4j.LoggerFactory import java.io.File import java.nio.file.Files import java.util.Properties +import org.slf4j.LoggerFactory +import io.jsonwebtoken.Jwts +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import org.kohsuke.github.GHAppInstallation +import org.kohsuke.github.GHAppInstallationToken +import java.security.KeyFactory +import java.security.spec.PKCS8EncodedKeySpec +import java.util.Base64 +import java.util.Date +import org.kohsuke.github.GitHub +import org.kohsuke.github.GitHubBuilder class GitHubAuth { + data class AuthInfo(val token: String, val type: AuthType, val expirationTime: Date?) + enum class AuthType { + APP, TOKEN + } companion object { @JvmStatic private val LOGGER = LoggerFactory.getLogger(this::class.java) + private var TOKEN: AuthInfo? = null + private val appId = System.getenv("GITHUB_APP_ID") + private val privateKey = System.getenv("GITHUB_APP_PRIVATE_KEY") + private val installationId = System.getenv("GITHUB_APP_INSTALLATION_ID") + private val mutex = Mutex() - fun readToken(): String? { - var token = System.getenv("GITHUB_TOKEN") - if (token.isNullOrEmpty()) { - token = System.getProperty("GITHUB_TOKEN") - } + suspend fun getAuthenticationToken(): AuthInfo { + return mutex.withLock { + // Detect if we are using a GitHub App + if (!appId.isNullOrEmpty() && !privateKey.isNullOrEmpty() && !installationId.isNullOrEmpty()) { + if (TOKEN == null || (TOKEN!!.expirationTime != null && TOKEN!!.expirationTime!!.before(Date()))) { + LOGGER.info("Using GitHub App for authentication") + LOGGER.info("Generating a new installation token") + val token = authenticateAsGitHubApp(appId, privateKey, installationId) + TOKEN = AuthInfo(token.token, AuthType.APP, token.expiresAt) + } + } else { + if (TOKEN == null) { + val token = readToken() + LOGGER.info("Using Personal Access Token for authentication") + TOKEN = AuthInfo(token, AuthType.TOKEN, null) + } + } + TOKEN!! + } + } + private fun readToken(): String { + var token = System.getenv("GITHUB_TOKEN") if (token.isNullOrEmpty()) { val userHome = System.getProperty("user.home") @@ -33,8 +70,45 @@ class GitHubAuth { } if (token.isNullOrEmpty()) { LOGGER.error("Could not find GITHUB_TOKEN") + throw FailedToAuthenticateException() } return token } + + private suspend fun authenticateAsGitHubApp(appId: String, privateKey: String, installationId: String): GHAppInstallationToken { + try { + // Remove the first and last lines + val sanitizedKey = privateKey + .replace("-----BEGIN PRIVATE KEY-----", "") + .replace("-----END PRIVATE KEY-----", "") + .replace("\\s".toRegex(), "") + + // Decode the Base64 encoded key + val keyBytes = Base64.getDecoder().decode(sanitizedKey) + + // Generate the private key + val keySpec = PKCS8EncodedKeySpec(keyBytes) + val keyFactory = KeyFactory.getInstance("RSA") + val privateKey = keyFactory.generatePrivate(keySpec) + + // Create and sign the JWT + val nowMillis = System.currentTimeMillis() + val jwtToken = Jwts.builder() + .issuer(appId) + .issuedAt(Date(nowMillis)) + .expiration(Date(nowMillis + 60000)) // Token valid for 1 minute + .signWith(privateKey, Jwts.SIG.RS256) + .compact() + + val gitHubApp: GitHub = GitHubBuilder().withJwtToken(jwtToken).build() + val appInstallation: GHAppInstallation = gitHubApp.getApp().getInstallationById(installationId.toLong()) + return appInstallation.createToken().create() + } catch (e: Exception) { + LOGGER.error("Error authenticating as GitHub App", e) + throw FailedToAuthenticateException() + } + } } + + class FailedToAuthenticateException : Exception("Failed to authenticate to GitHub") {} } diff --git a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/graphql/clients/GraphQLRequestImpl.kt b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/graphql/clients/GraphQLRequestImpl.kt index 8b34e7578..ac2ea79f3 100644 --- a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/graphql/clients/GraphQLRequestImpl.kt +++ b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-github-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/github/graphql/clients/GraphQLRequestImpl.kt @@ -8,6 +8,7 @@ import io.ktor.client.* import jakarta.enterprise.context.ApplicationScoped import net.adoptium.api.v3.dataSources.UpdaterJsonMapper import net.adoptium.api.v3.dataSources.github.GitHubAuth +import net.adoptium.api.v3.dataSources.github.GitHubAuth.AuthInfo import java.net.URL @ApplicationScoped @@ -16,15 +17,8 @@ open class GraphQLRequestImpl : GraphQLRequest { private val client: GraphQLKtorClient private val httpClient: HttpClient val BASE_URL = "https://api.github.com/graphql" - private val TOKEN: String init { - val token = GitHubAuth.readToken() - if (token == null) { - throw IllegalStateException("No token provided") - } else { - TOKEN = token - } httpClient = HttpClient() client = GraphQLKtorClient( url = URL(BASE_URL), @@ -34,8 +28,9 @@ open class GraphQLRequestImpl : GraphQLRequest { } override suspend fun request(query: GraphQLClientRequest): GraphQLClientResponse { + val authInfo: AuthInfo = GitHubAuth.getAuthenticationToken() return client.execute(query) { - headers.append("Authorization", "Bearer $TOKEN") + headers.append("Authorization", "Bearer ${authInfo.token}") } } } diff --git a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/pom.xml b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/pom.xml index f6daf7478..7d6657284 100644 --- a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/pom.xml +++ b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/pom.xml @@ -48,6 +48,28 @@ org.slf4j slf4j-api + + io.jsonwebtoken + jjwt-api + 0.12.3 + + + io.jsonwebtoken + jjwt-impl + 0.12.3 + runtime + + + io.jsonwebtoken + jjwt-jackson + 0.12.3 + runtime + + + org.kohsuke + github-api + 1.317 + diff --git a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/DefaultUpdaterHtmlClient.kt b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/DefaultUpdaterHtmlClient.kt index 1187d4a1e..07e75b73e 100644 --- a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/DefaultUpdaterHtmlClient.kt +++ b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/DefaultUpdaterHtmlClient.kt @@ -19,6 +19,7 @@ import kotlin.coroutines.Continuation import kotlin.coroutines.resume import kotlin.coroutines.resumeWithException import kotlin.coroutines.suspendCoroutine +import net.adoptium.api.v3.dataSources.GitHubAuth.AuthInfo @Default @ApplicationScoped @@ -33,7 +34,6 @@ open class DefaultUpdaterHtmlClient @Inject constructor( companion object { @JvmStatic private val LOGGER = LoggerFactory.getLogger(this::class.java) - private val TOKEN: String? = GitHubAuth.readToken() private const val REQUEST_TIMEOUT = 12_000L private val GITHUB_DOMAINS = listOf("api.github.com", "github.com") @@ -50,7 +50,8 @@ open class DefaultUpdaterHtmlClient @Inject constructor( class ResponseHandler( val client: DefaultUpdaterHtmlClient, private val continuation: Continuation, - val request: UrlRequest? + val request: UrlRequest?, + val token: String? ) : FutureCallback { override fun cancelled() { continuation.resumeWithException(Exception("cancelled")) @@ -64,7 +65,7 @@ open class DefaultUpdaterHtmlClient @Inject constructor( } isARedirect(response) -> { - client.getData(UrlRequest(response.getFirstHeader("location").value, request?.lastModified), continuation) + client.getData(UrlRequest(response.getFirstHeader("location").value, request?.lastModified), continuation, token) } response.statusLine.statusCode == 404 -> { @@ -93,14 +94,14 @@ open class DefaultUpdaterHtmlClient @Inject constructor( override fun failed(e: java.lang.Exception?) { if (e == null) { - continuation.resumeWithException(Exception("Failed Uknown reason")) + continuation.resumeWithException(Exception("Failed Unknown reason")) } else { continuation.resumeWithException(e) } } } - private fun getData(urlRequest: UrlRequest, continuation: Continuation) { + private fun getData(urlRequest: UrlRequest, continuation: Continuation, token: String?) { try { val url = URL(urlRequest.url) val request = RequestBuilder @@ -112,8 +113,8 @@ open class DefaultUpdaterHtmlClient @Inject constructor( request.addHeader("If-Modified-Since", urlRequest.lastModified) } - if (GITHUB_DOMAINS.contains(url.host) && TOKEN != null) { - request.setHeader("Authorization", "token $TOKEN") + if (token != null && GITHUB_DOMAINS.contains(url.host)) { + request.setHeader("Authorization", "token $token") } val client = @@ -123,20 +124,25 @@ open class DefaultUpdaterHtmlClient @Inject constructor( redirectingHttpClient } - client.execute(request, ResponseHandler(this, continuation, urlRequest)) + client.execute(request, ResponseHandler(this, continuation, urlRequest, token)) } catch (e: Exception) { continuation.resumeWith(Result.failure(e)) } } override suspend fun getFullResponse(request: UrlRequest): HttpResponse? { + val requestURL = URL(request.url) + var authInfo: AuthInfo? = null + if (GITHUB_DOMAINS.contains(requestURL.host)) { + authInfo = GitHubAuth.getAuthenticationToken() + } // Retry up to 10 times for (retryCount in 1..10) { try { LOGGER.debug("Getting ${request.url} ${request.lastModified}") val response: HttpResponse = withTimeout(REQUEST_TIMEOUT) { suspendCoroutine { continuation -> - getData(request, continuation) + getData(request, continuation, authInfo?.token) } } LOGGER.debug("Got ${request.url}") diff --git a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/GitHubAuth.kt b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/GitHubAuth.kt index 76892930f..c2cc24a74 100644 --- a/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/GitHubAuth.kt +++ b/adoptium-updater-parent/adoptium-datasources-parent/adoptium-http-client-datasource/src/main/kotlin/net/adoptium/api/v3/dataSources/GitHubAuth.kt @@ -1,22 +1,57 @@ package net.adoptium.api.v3.dataSources +import io.jsonwebtoken.Jwts +import kotlinx.coroutines.sync.Mutex +import kotlinx.coroutines.sync.withLock +import org.kohsuke.github.GHAppInstallation +import org.kohsuke.github.GHAppInstallationToken +import org.kohsuke.github.GitHub +import org.kohsuke.github.GitHubBuilder import org.slf4j.LoggerFactory import java.io.File import java.nio.file.Files -import java.util.Properties +import java.security.KeyFactory +import java.security.spec.PKCS8EncodedKeySpec +import java.util.* class GitHubAuth { + data class AuthInfo(val token: String, val type: AuthType, val expirationTime: Date?) + enum class AuthType { + APP, TOKEN + } companion object { @JvmStatic private val LOGGER = LoggerFactory.getLogger(this::class.java) + private var TOKEN: AuthInfo? = null + private val appId = System.getenv("GITHUB_APP_ID") + private val privateKey = System.getenv("GITHUB_APP_PRIVATE_KEY") + private val installationId = System.getenv("GITHUB_APP_INSTALLATION_ID") + private val mutex = Mutex() - fun readToken(): String? { - var token = System.getenv("GITHUB_TOKEN") - if (token.isNullOrEmpty()) { - token = System.getProperty("GITHUB_TOKEN") + suspend fun getAuthenticationToken(): AuthInfo { + return mutex.withLock { + // Detect if we are using a GitHub App + if (!appId.isNullOrEmpty() && !privateKey.isNullOrEmpty() && !installationId.isNullOrEmpty()) { + if (TOKEN == null || (TOKEN!!.expirationTime != null && TOKEN!!.expirationTime!!.before(Date()))) { + LOGGER.info("Using GitHub App for authentication") + LOGGER.info("Generating a new installation token") + val token = authenticateAsGitHubApp(appId, privateKey, installationId) + TOKEN = AuthInfo(token.token, AuthType.APP, token.expiresAt) + } + } else { + if (TOKEN == null) { + val token = readToken() + LOGGER.info("Using Personal Access Token for authentication") + TOKEN = AuthInfo(token, AuthType.TOKEN, null) + } + } + TOKEN!! } + } + private fun readToken(): String { + var token = System.getenv("GITHUB_TOKEN") if (token.isNullOrEmpty()) { val userHome = System.getProperty("user.home") @@ -33,8 +68,45 @@ class GitHubAuth { } if (token.isNullOrEmpty()) { LOGGER.error("Could not find GITHUB_TOKEN") + throw FailedToAuthenticateException() } return token } + + private suspend fun authenticateAsGitHubApp(appId: String, privateKey: String, installationId: String): GHAppInstallationToken { + try { + // Remove the first and last lines + val sanitizedKey = privateKey + .replace("-----BEGIN PRIVATE KEY-----", "") + .replace("-----END PRIVATE KEY-----", "") + .replace("\\s".toRegex(), "") + + // Decode the Base64 encoded key + val keyBytes = Base64.getDecoder().decode(sanitizedKey) + + // Generate the private key + val keySpec = PKCS8EncodedKeySpec(keyBytes) + val keyFactory = KeyFactory.getInstance("RSA") + val privateKey = keyFactory.generatePrivate(keySpec) + + // Create and sign the JWT + val nowMillis = System.currentTimeMillis() + val jwtToken = Jwts.builder() + .issuer(appId) + .issuedAt(Date(nowMillis)) + .expiration(Date(nowMillis + 60000)) // Token valid for 1 minute + .signWith(privateKey, Jwts.SIG.RS256) + .compact() + + val gitHubApp: GitHub = GitHubBuilder().withJwtToken(jwtToken).build() + val appInstallation: GHAppInstallation = gitHubApp.getApp().getInstallationById(installationId.toLong()) + return appInstallation.createToken().create() + } catch (e: Exception) { + LOGGER.error("Error authenticating as GitHub App", e) + throw FailedToAuthenticateException() + } + } } + + class FailedToAuthenticateException : Exception("Failed to authenticate as GitHub App") {} } diff --git a/docker-compose.yml b/docker-compose.yml index 1d7bce14b..a98a67e0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,4 +26,6 @@ services: environment: MONGODB_HOST: mongodb GITHUB_TOKEN: "${GITHUB_TOKEN}" - + GITHUB_APP_ID: "${GITHUB_APP_ID}" + GITHUB_APP_PRIVATE_KEY: "${GITHUB_APP_PRIVATE_KEY}" + GITHUB_APP_INSTALLATION_ID: "${GITHUB_APP_INSTALLATION_ID}"