Skip to content

Commit

Permalink
fix(deps): update dependency org.shredzone.acme4j:acme4j-client to v3 (
Browse files Browse the repository at this point in the history
…#342)

* fix(deps): update dependency org.shredzone.acme4j:acme4j-client to v3

* latest acme4j-utils (2.16) isn't same as latest acme-client (3.1.0)

* acme4j 3.x moves acme-utils to acme-client lib

* major to 5.0.0-SNAPSHOT (due to acme4j major update to 3.0.0 with breaking changes)

* micronaut framework catalog version updates

* Fix timeout test for different HttpClient

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Dean Wette <[email protected]>
Co-authored-by: Tim Yates <[email protected]>
  • Loading branch information
3 people authored Nov 10, 2023
1 parent 2390a4d commit c04d56c
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
8 changes: 8 additions & 0 deletions acme-bom/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
plugins {
id "io.micronaut.build.internal.bom"
}

micronautBom {
suppressions {
// as of micronaut-acme 5.0.0
// acme removed this acme4j-utils and included it in the acme4j-client lib as of v3.0.0
acceptedLibraryRegressions.add("acme4j-utils")
}
}
1 change: 0 additions & 1 deletion acme/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies {
implementation mn.micronaut.http.server
implementation mn.micronaut.http.server.netty
implementation libs.managed.acme4j.client
implementation libs.managed.acme4j.utils
implementation libs.netty.tcnative.boringssl.static
compileOnly libs.netty.incubator.codec.http3
testImplementation(mnSerde.micronaut.serde.jackson)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ import org.testcontainers.shaded.org.apache.commons.lang3.exception.ExceptionUti
import spock.lang.AutoCleanup
import spock.lang.Shared
import spock.lang.Specification
import spock.lang.Stepwise
import spock.lang.Unroll

import java.net.http.HttpTimeoutException
import java.security.KeyPair
import java.time.Duration

@Stepwise
class AcmeCertRefresherTaskSetsTimeoutSpec extends Specification {

public static final String EXPECTED_DOMAIN = "localhost"
Expand Down Expand Up @@ -91,8 +89,7 @@ class AcmeCertRefresherTaskSetsTimeoutSpec extends Specification {
] as Map<String, Object>
}

@Unroll
def "validate timeout applied if signup is slow"(SlowServerConfig config) {
def "validate timeout applied if signup is #config"(SlowServerConfig config) {
given: "we have all the ports we could ever need"
expectedHttpPort = SocketUtils.findAvailableTcpPort()
expectedSecurePort = SocketUtils.findAvailableTcpPort()
Expand Down Expand Up @@ -121,8 +118,8 @@ class AcmeCertRefresherTaskSetsTimeoutSpec extends Specification {
ane?.message == "Network error"

Throwable rootEx = ExceptionUtils.getRootCause(ex)
rootEx instanceof SocketTimeoutException
rootEx.message == "Read timed out"
rootEx instanceof HttpTimeoutException
rootEx.message == "request timed out"

cleanup:
appServer?.stop()
Expand All @@ -136,9 +133,14 @@ class AcmeCertRefresherTaskSetsTimeoutSpec extends Specification {
}

class ActualSlowServerConfig implements SlowServerConfig {

boolean slowSignup
boolean slowOrdering
boolean slowAuthorization
Duration duration = Duration.ofSeconds(networkTimeoutInSecs + 2)

String toString() {
"slowSignup: $slowSignup, slowOrdering: $slowOrdering, slowAuthorization: $slowAuthorization, duration: $duration"
}
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
projectVersion=4.1.1-SNAPSHOT
projectVersion=5.0.0-SNAPSHOT
projectGroup=io.micronaut.acme

title=Micronaut Acme
Expand Down
13 changes: 6 additions & 7 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
[versions]
micronaut-docs = '2.0.0'
micronaut = "4.1.11"
micronaut-platform = "4.0.0-RC1"
micronaut-test = "4.0.0"
micronaut-platform = "4.1.6"
micronaut-test = "4.1.0"

groovy = "4.0.12"
groovy = "4.0.15"
spock = '2.3-groovy-4.0'
testcontainers = "1.19.1"
netty-http3 = "0.0.21.Final"

managed-acme4j = "2.16"
micronaut-serde = "2.3.0"
micronaut-validation = "4.0.3"
managed-acme4j = "3.1.0"
micronaut-serde = "2.3.3"
micronaut-validation = "4.1.0"
micronaut-gradle-plugin = "4.1.2"

[libraries]
# Core
micronaut-core = { module = 'io.micronaut:micronaut-core-bom', version.ref = 'micronaut' }

managed-acme4j-client = { module = 'org.shredzone.acme4j:acme4j-client', version.ref = 'managed-acme4j' }
managed-acme4j-utils = { module = 'org.shredzone.acme4j:acme4j-utils', version.ref = 'managed-acme4j' }

micronaut-serde = { module = 'io.micronaut.serde:micronaut-serde-bom', version.ref = 'micronaut-serde' }
micronaut-validation = { module = "io.micronaut.validation:micronaut-validation-bom", version.ref = "micronaut-validation" }
Expand Down

0 comments on commit c04d56c

Please sign in to comment.