From 2993beed13c046708889a84090635b190520c921 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 00:42:15 +0000 Subject: [PATCH 1/6] Bump de.flapdoodle.embed:de.flapdoodle.embed.mongo from 4.18.0 to 4.18.1 Bumps [de.flapdoodle.embed:de.flapdoodle.embed.mongo](https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo) from 4.18.0 to 4.18.1. - [Commits](https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/compare/de.flapdoodle.embed.mongo-4.18.0...de.flapdoodle.embed.mongo-4.18.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 d309a586f..aafe9ca3a 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -177,7 +177,7 @@ de.flapdoodle.embed de.flapdoodle.embed.mongo - 4.18.0 + 4.18.1 test From 355e6a935bd071e53534c0170769c77a751cadb4 Mon Sep 17 00:00:00 2001 From: John Oliver <1615532+johnoliver@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:05:42 +0000 Subject: [PATCH 2/6] Remove unused hexChecksum --- .../v3/dataSources/persitence/mongo/UpdatedInfo.kt | 4 ++-- .../net/adoptium/api/v3/CacheControlService.kt | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/adoptium-api-v3-persistence/src/main/kotlin/net/adoptium/api/v3/dataSources/persitence/mongo/UpdatedInfo.kt b/adoptium-api-v3-persistence/src/main/kotlin/net/adoptium/api/v3/dataSources/persitence/mongo/UpdatedInfo.kt index 0d8d63683..235757e87 100644 --- a/adoptium-api-v3-persistence/src/main/kotlin/net/adoptium/api/v3/dataSources/persitence/mongo/UpdatedInfo.kt +++ b/adoptium-api-v3-persistence/src/main/kotlin/net/adoptium/api/v3/dataSources/persitence/mongo/UpdatedInfo.kt @@ -1,16 +1,16 @@ package net.adoptium.api.v3.dataSources.persitence.mongo -import java.math.BigInteger +import com.fasterxml.jackson.annotation.JsonIgnoreProperties import java.time.ZoneId import java.time.ZonedDateTime import java.time.format.DateTimeFormatter import java.util.* +@JsonIgnoreProperties(ignoreUnknown = true) data class UpdatedInfo( val time: ZonedDateTime, val checksum: String, val hashCode: Int, - val hexChecksum: String? = BigInteger(1, Base64.getDecoder().decode(checksum)).toString(16), val lastModified: Date? = Date.from(time.toInstant()), val lastModifiedFormatted: String? = lastModified ?.toInstant() diff --git a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/CacheControlService.kt b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/CacheControlService.kt index 6f473ecc6..b175fcfa8 100644 --- a/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/CacheControlService.kt +++ b/adoptium-frontend-parent/adoptium-api-v3-frontend/src/main/kotlin/net/adoptium/api/v3/CacheControlService.kt @@ -33,8 +33,11 @@ class CacheControlService @Inject constructor(private var apiDataStore: APIDataS private fun calculateEtag(requestContext: ContainerRequestContext): String { val md = MessageDigest.getInstance("SHA1") - if (apiDataStore.getUpdateInfo().hexChecksum != null) { - md.update(HexFormat.of().parseHex(apiDataStore.getUpdateInfo().hexChecksum)) + try { + md.update(Base64.getDecoder().decode(apiDataStore.getUpdateInfo().checksum)) + } catch (e: Exception) { + // Should not happen as the hex checksum should always be a valid Base64 string + md.update(apiDataStore.getUpdateInfo().checksum.toByteArray()) } md.update(requestContext.uriInfo.requestUri.toString().toByteArray()) return BigInteger(1, md.digest()).toString(16) @@ -46,12 +49,12 @@ class CacheControlService @Inject constructor(private var apiDataStore: APIDataS val lastModified = apiDataStore.getUpdateInfo().lastModified - if (lastModified == null || etag == null) { + if (lastModified == null) { return } val builder = - requestContext!! + requestContext .request .evaluatePreconditions(lastModified, EntityTag(etag)) @@ -70,8 +73,7 @@ class CacheControlService @Inject constructor(private var apiDataStore: APIDataS ecc.maxAge = MAX_CACHE_AGE_IN_SEC ecc.sMaxAge = MAX_CACHE_AGE_IN_SEC - if (apiDataStore.getUpdateInfo().hexChecksum == null || - apiDataStore.getUpdateInfo().lastModifiedFormatted == null) { + if (apiDataStore.getUpdateInfo().lastModifiedFormatted == null) { return } From bd0e9cc65df2cbf9beaabb66985129e01a7eb601 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 00:51:39 +0000 Subject: [PATCH 3/6] Bump docker/build-push-action in /.github/actions/docker-build Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.9.0 to 6.10.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/4f58ea79222b3b9dc2c8bbdd6debcef730109a75...48aba3b46d1b1fec4febb7c5d0c644b249a11355) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-minor ... 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 a9ac87727..68fa0992f 100644 --- a/.github/actions/docker-build/action.yml +++ b/.github/actions/docker-build/action.yml @@ -14,7 +14,7 @@ runs: using: composite steps: - name: Build container image and push to Azure - uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0 + uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6.10.0 with: file: ${{ inputs.DOCKER_FILE }} tags: ${{ inputs.DOCKER_REPO }}:latest From 0cf6f0528dcd28b8eaf6b844f957cc031a31b02f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:42:28 +0000 Subject: [PATCH 4/6] Bump quarkus.version from 3.17.0 to 3.17.2 Bumps `quarkus.version` from 3.17.0 to 3.17.2. Updates `io.quarkus:quarkus-bom` from 3.17.0 to 3.17.2 - [Release notes](https://github.com/quarkusio/quarkus/releases) - [Commits](https://github.com/quarkusio/quarkus/compare/3.17.0...3.17.2) Updates `io.quarkus:quarkus-security` from 3.17.0 to 3.17.2 Updates `io.quarkus:quarkus-core` from 3.17.0 to 3.17.2 Updates `io.quarkus:quarkus-elytron-security-properties-file` from 3.17.0 to 3.17.2 Updates `io.quarkus:quarkus-rest` from 3.17.0 to 3.17.2 --- 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-rest 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 aafe9ca3a..7d3fdd973 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -20,7 +20,7 @@ 3.8.0 UTF-8 UTF-8 - 3.17.0 + 3.17.2 5.5.0 From 4a759e9608fa2f243c514bcf60fb05a015406523 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:42:30 +0000 Subject: [PATCH 5/6] Bump io.quarkus:quarkus-maven-plugin from 3.17.0 to 3.17.2 Bumps io.quarkus:quarkus-maven-plugin from 3.17.0 to 3.17.2. --- 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 e53c1c728..d01ab0d4d 100644 --- a/pom.xml +++ b/pom.xml @@ -82,7 +82,7 @@ 4.7.3 UTF-8 UTF-8 - 3.17.0 + 3.17.2 From 01a99ec26a1c61d52f8ec29fc359a89970f6e705 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 00:49:12 +0000 Subject: [PATCH 6/6] Bump jackson.version from 2.18.1 to 2.18.2 Bumps `jackson.version` from 2.18.1 to 2.18.2. Updates `com.fasterxml.jackson.module:jackson-module-kotlin` from 2.18.1 to 2.18.2 - [Commits](https://github.com/FasterXML/jackson-module-kotlin/compare/jackson-module-kotlin-2.18.1...jackson-module-kotlin-2.18.2) Updates `com.fasterxml.jackson.datatype:jackson-datatype-jsr310` from 2.18.1 to 2.18.2 Updates `com.fasterxml.jackson.datatype:jackson-datatype-jakarta-jsonp` from 2.18.1 to 2.18.2 - [Commits](https://github.com/FasterXML/jackson-datatypes-misc/compare/jackson-datatypes-misc-parent-2.18.1...jackson-datatypes-misc-parent-2.18.2) Updates `com.fasterxml.jackson.core:jackson-databind` from 2.18.1 to 2.18.2 - [Commits](https://github.com/FasterXML/jackson/commits) Updates `com.fasterxml.jackson.core:jackson-annotations` from 2.18.1 to 2.18.2 - [Commits](https://github.com/FasterXML/jackson/commits) Updates `com.fasterxml.jackson.datatype:jackson-datatype-jdk8` from 2.18.1 to 2.18.2 --- 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 aafe9ca3a..bad7451c4 100644 --- a/adoptium-api-versions/pom.xml +++ b/adoptium-api-versions/pom.xml @@ -9,7 +9,7 @@ 1.9.0 - 2.18.1 + 2.18.2 17 5.1.2 17