From d44de213c30fc49a8fb27c68376b3985600f5b50 Mon Sep 17 00:00:00 2001 From: "jan.kozlowski" Date: Fri, 6 Sep 2024 17:12:35 +0200 Subject: [PATCH 1/9] spring boot 3.3.2 --- CHANGELOG.md | 4 ++++ build.gradle | 5 +++-- envoy-control-core/build.gradle | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b9e3b0c7..f20435d91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ Lists all changes with user impact. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## [0.22.0] +### Changed +- Spring Boot update to 3.3.2 + ## [0.21.1] ### Changed - Added additional logs to SimpleCache diff --git a/build.gradle b/build.gradle index c8a49dac1..d61bc0327 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ plugins { id "org.jlleitschuh.gradle.ktlint-idea" version "10.2.0" id "io.gitlab.arturbosch.detekt" version "1.18.0" id 'io.github.gradle-nexus.publish-plugin' version '1.0.0' - id 'org.springframework.boot' version '3.1.2' apply false + id 'org.springframework.boot' version '3.3.2' apply false } @@ -49,7 +49,7 @@ allprojects { project.ext.versions = [ java_controlplane : '1.0.45', - spring_boot : '3.1.2', + spring_boot : '3.3.2', grpc : '1.48.1', ecwid_consul : '1.4.1', toxiproxy : '2.1.3', @@ -57,6 +57,7 @@ allprojects { cglib : '3.2.9', re2j : '1.3', xxhash : '0.10.1', + dropwizard : '4.2.26' ] dependencyManagement { diff --git a/envoy-control-core/build.gradle b/envoy-control-core/build.gradle index 8a7578b8a..cb9cc308d 100644 --- a/envoy-control-core/build.gradle +++ b/envoy-control-core/build.gradle @@ -9,7 +9,7 @@ dependencies { api group: 'com.fasterxml.jackson.module', name: 'jackson-module-afterburner' api group: 'com.fasterxml.jackson.module', name: 'jackson-module-kotlin' implementation group: 'org.jetbrains.kotlin', name: 'kotlin-reflect' - api group: 'io.dropwizard.metrics', name: 'metrics-core' + api group: 'io.dropwizard.metrics', name: 'metrics-core', version: versions.dropwizard api group: 'io.micrometer', name: 'micrometer-core' implementation group: 'com.google.re2j', name: 're2j', version: versions.re2j From 9627d5353fc2df2457ac3a1723841d2e12fa16cc Mon Sep 17 00:00:00 2001 From: "jan.kozlowski" Date: Fri, 13 Sep 2024 13:39:40 +0200 Subject: [PATCH 2/9] bump kotlin plugin versions --- build.gradle | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index d61bc0327..c4d79fae3 100644 --- a/build.gradle +++ b/build.gradle @@ -12,15 +12,14 @@ plugins { id 'signing' id 'pl.allegro.tech.build.axion-release' version '1.13.3' - id 'org.jetbrains.kotlin.jvm' version '1.8.22' - id 'org.jetbrains.kotlin.plugin.spring' version '1.8.22' - id 'org.jetbrains.kotlin.plugin.allopen' version '1.8.22' + id 'org.jetbrains.kotlin.jvm' version '1.9.25' + id 'org.jetbrains.kotlin.plugin.spring' version '1.9.25' + id 'org.jetbrains.kotlin.plugin.allopen' version '1.9.25' id "org.jlleitschuh.gradle.ktlint" version "10.2.1" id "org.jlleitschuh.gradle.ktlint-idea" version "10.2.0" id "io.gitlab.arturbosch.detekt" version "1.18.0" id 'io.github.gradle-nexus.publish-plugin' version '1.0.0' id 'org.springframework.boot' version '3.3.2' apply false - } scmVersion { From 7322ab6d15f95a5c491010604db163a41b407e89 Mon Sep 17 00:00:00 2001 From: "jan.kozlowski" Date: Fri, 13 Sep 2024 14:12:43 +0200 Subject: [PATCH 3/9] update detekt 1.23.6 --- build.gradle | 5 ++--- config/detekt/detekt.yml | 7 ++++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index c4d79fae3..3523b2066 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ plugins { id 'org.jetbrains.kotlin.plugin.allopen' version '1.9.25' id "org.jlleitschuh.gradle.ktlint" version "10.2.1" id "org.jlleitschuh.gradle.ktlint-idea" version "10.2.0" - id "io.gitlab.arturbosch.detekt" version "1.18.0" + id "io.gitlab.arturbosch.detekt" version "1.23.6" id 'io.github.gradle-nexus.publish-plugin' version '1.0.0' id 'org.springframework.boot' version '3.3.2' apply false } @@ -66,7 +66,6 @@ allprojects { } } - nexusPublishing { repositories { sonatype { @@ -177,7 +176,7 @@ subprojects { } detekt { - toolVersion = "1.18.0" + toolVersion = "1.23.6" input = files("src/main/kotlin", "src/test/kotlin") config = files("$rootDir/config/detekt/detekt.yml") buildUponDefaultConfig = true diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index 128f7858c..dcc6321d3 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -54,7 +54,7 @@ style: active: false # we want to be able to write todo comments MagicNumber: ignoreAnnotation: true - ignoreNumbers: '-1,0,1,2,3' + ignoreNumbers: ["-1", "0", "1", "2", "3"] excludes: [ "**/resources/**","**/build/**", '**/test/**', '**/**Test.kt', '**TestBase.kt', '**TestConfiguration.kt','**/**Spec.kt','**Container.kt', '**Assertions.kt', '**Extension.kt', '**Operations.kt' ] FunctionOnlyReturningConstant: active: true @@ -93,3 +93,8 @@ empty-blocks: naming: VariableNaming: excludes: [ "**/envoy-control-tests/**" ] + FunctionNaming: + ignoreAnnotated: + - "Test" + - "ParameterizedTest" + - "MethodSource" From edec691c969265d70f3c8cec70de7836ee1f8823 Mon Sep 17 00:00:00 2001 From: "jan.kozlowski" Date: Fri, 13 Sep 2024 14:13:09 +0200 Subject: [PATCH 4/9] replace org.springframework.boot plugin with io.spring.dependency-management --- build.gradle | 31 ++++++++++++------------ envoy-control-core/build.gradle | 4 --- envoy-control-runner/build.gradle | 1 - envoy-control-services/build.gradle | 4 --- envoy-control-source-consul/build.gradle | 4 --- envoy-control-tests/build.gradle | 4 --- 6 files changed, 16 insertions(+), 32 deletions(-) diff --git a/build.gradle b/build.gradle index 3523b2066..a4effa8e3 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,9 @@ - buildscript { repositories { mavenCentral() } dependencies { - classpath group: 'pl.allegro.tech.build', name: 'axion-release-plugin', version: '1.13.3' + classpath group: 'pl.allegro.tech.build', name: 'axion-release-plugin', version: '1.13.3' } } @@ -19,7 +18,7 @@ plugins { id "org.jlleitschuh.gradle.ktlint-idea" version "10.2.0" id "io.gitlab.arturbosch.detekt" version "1.23.6" id 'io.github.gradle-nexus.publish-plugin' version '1.0.0' - id 'org.springframework.boot' version '3.3.2' apply false + id "io.spring.dependency-management" version "1.1.6" } scmVersion { @@ -47,21 +46,23 @@ allprojects { apply plugin: 'io.spring.dependency-management' project.ext.versions = [ - java_controlplane : '1.0.45', - spring_boot : '3.3.2', - grpc : '1.48.1', - ecwid_consul : '1.4.1', - toxiproxy : '2.1.3', - consul_recipes : '0.9.1', - cglib : '3.2.9', - re2j : '1.3', - xxhash : '0.10.1', - dropwizard : '4.2.26' + java_controlplane: '1.0.45', + spring_boot : '3.3.2', + grpc : '1.48.1', + ecwid_consul : '1.4.1', + toxiproxy : '2.1.3', + consul_recipes : '0.9.1', + cglib : '3.2.9', + re2j : '1.3', + xxhash : '0.10.1', + dropwizard : '4.2.26' ] dependencyManagement { imports { - mavenBom org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES + mavenBom("org.springframework.boot:spring-boot-dependencies:3.3.2") { + bomProperty("kotlin.version", "1.9.23") + } } } } @@ -122,7 +123,7 @@ subprojects { pom { name = project.name description = 'Production-ready Control Plane for Service Mesh based on Envoy Proxy.' - url ='https://github.com/allegro/envoy-control' + url = 'https://github.com/allegro/envoy-control' inceptionYear = '2019' scm { diff --git a/envoy-control-core/build.gradle b/envoy-control-core/build.gradle index cb9cc308d..169d88d62 100644 --- a/envoy-control-core/build.gradle +++ b/envoy-control-core/build.gradle @@ -1,7 +1,3 @@ -plugins { - id 'org.springframework.boot' apply false -} - dependencies { api project(':envoy-control-services') diff --git a/envoy-control-runner/build.gradle b/envoy-control-runner/build.gradle index cee970308..fafd8f611 100644 --- a/envoy-control-runner/build.gradle +++ b/envoy-control-runner/build.gradle @@ -1,6 +1,5 @@ plugins { id 'application' - id 'org.springframework.boot' apply false } mainClassName = 'pl.allegro.tech.servicemesh.envoycontrol.EnvoyControl' diff --git a/envoy-control-services/build.gradle b/envoy-control-services/build.gradle index aeabef69a..724d8e4a2 100644 --- a/envoy-control-services/build.gradle +++ b/envoy-control-services/build.gradle @@ -1,7 +1,3 @@ -plugins { - id 'org.springframework.boot' apply false -} - dependencies { implementation group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib' api group: 'io.projectreactor', name: 'reactor-core' diff --git a/envoy-control-source-consul/build.gradle b/envoy-control-source-consul/build.gradle index d15e0c31c..20c070eec 100644 --- a/envoy-control-source-consul/build.gradle +++ b/envoy-control-source-consul/build.gradle @@ -1,7 +1,3 @@ -plugins { - id 'org.springframework.boot' apply false -} - dependencies { api project(':envoy-control-core') diff --git a/envoy-control-tests/build.gradle b/envoy-control-tests/build.gradle index 1c0826c56..108965573 100644 --- a/envoy-control-tests/build.gradle +++ b/envoy-control-tests/build.gradle @@ -1,7 +1,3 @@ -plugins { - id 'org.springframework.boot' apply false -} - dependencies { implementation project(':envoy-control-runner') From 5587d2de9e26765ee2ae4ba07590d6d0c39d8b9c Mon Sep 17 00:00:00 2001 From: "jan.kozlowski" Date: Sat, 14 Sep 2024 11:40:47 +0200 Subject: [PATCH 5/9] apply detekt fixes --- .../config/LocalReplyConfigFactory.kt | 23 ++++++++++--------- .../listeners/filters/RBACFilterFactory.kt | 7 ++++-- .../listeners/filters/SanUriMatcherFactory.kt | 4 ++-- .../routes/ServiceTagMetadataGenerator.kt | 5 ++-- .../envoycontrol/utils/ReactorUtils.kt | 4 ++-- .../config/envoy/EgressOperations.kt | 1 + .../envoycontrol/EnvoyControlTestApp.kt | 5 ++-- 7 files changed, 27 insertions(+), 22 deletions(-) diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/config/LocalReplyConfigFactory.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/config/LocalReplyConfigFactory.kt index 0dafc418a..4c8778338 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/config/LocalReplyConfigFactory.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/config/LocalReplyConfigFactory.kt @@ -67,6 +67,7 @@ class LocalReplyConfigFactory( ) responseMapperBuilder } + matcherAndMapper.responseFlagMatcher.isNotEmpty() -> { responseMapperBuilder.setFilter( AccessLogFilter.newBuilder().setResponseFlagFilter( @@ -75,6 +76,7 @@ class LocalReplyConfigFactory( ) responseMapperBuilder } + matcherAndMapper.statusCodeMatcher.isNotEmpty() -> { responseMapperBuilder.setFilter( AccessLogFilter.newBuilder().setStatusCodeFilter( @@ -83,6 +85,7 @@ class LocalReplyConfigFactory( ) responseMapperBuilder } + else -> { responseMapperBuilder } @@ -139,6 +142,7 @@ class LocalReplyConfigFactory( ) ) } + headerMatcher.exactMatch.isNotEmpty() -> { headerFilterBuilder.setHeader(headerMatcherBuilder.setExactMatch(headerMatcher.exactMatch)) } @@ -158,11 +162,13 @@ class LocalReplyConfigFactory( responseFormat.textFormat.isNotEmpty() -> { responseFormatBuilder.setTextFormat(responseFormat.textFormat).build() } + responseFormat.jsonFormat.isNotEmpty() -> { val responseBody = Struct.newBuilder() jsonParser.merge(responseFormat.jsonFormat, responseBody) responseFormatBuilder.setJsonFormat(responseBody.build()).build() } + else -> { null } @@ -184,25 +190,20 @@ class LocalReplyConfigFactory( validateHeaderMatcher(matcherAndMapper.headerMatcher) } - if (definitions != 1) { - throw IllegalArgumentException( - "One and only one of: headerMatcher, responseFlagMatcher, statusCodeMatcher has to be defined.") + require(definitions == 1) { + "One and only one of: headerMatcher, responseFlagMatcher, statusCodeMatcher has to be defined." } } private fun validateHeaderMatcher(headerMatcher: HeaderMatcherProperties) { - if (headerMatcher.exactMatch.isNotEmpty() && headerMatcher.regexMatch.isNotEmpty()) { - throw IllegalArgumentException( - "Only one of: exactMatch, regexMatch can be defined." - ) + require(headerMatcher.exactMatch.isEmpty() || headerMatcher.regexMatch.isEmpty()) { + "Only one of: exactMatch, regexMatch can be defined." } } private fun validateResponseFormatProperties(responseFormat: ResponseFormat) { - if (responseFormat.jsonFormat.isNotEmpty() && responseFormat.textFormat.isNotEmpty()) { - throw IllegalArgumentException( - "Only one of: jsonFormat, textFormat can be defined." - ) + require(responseFormat.jsonFormat.isEmpty() || responseFormat.textFormat.isEmpty()) { + "Only one of: jsonFormat, textFormat can be defined." } } } diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/RBACFilterFactory.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/RBACFilterFactory.kt index 572d7ad0c..3e0cdbd8e 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/RBACFilterFactory.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/RBACFilterFactory.kt @@ -54,8 +54,8 @@ class RBACFilterFactory( init { incomingPermissionsProperties.selectorMatching.forEach { - if (it.key !in incomingServicesIpRangeAuthentication && it.key !in incomingServicesSourceAuthentication) { - throw IllegalArgumentException("${it.key} is not defined in ip range or ip from discovery section.") + require(it.key in incomingServicesIpRangeAuthentication || it.key in incomingServicesSourceAuthentication) { + "${it.key} is not defined in ip range or ip from discovery section." } } } @@ -368,15 +368,18 @@ class RBACFilterFactory( principal ) ) + OAuth.Policy.STRICT -> mergePrincipals( listOf( strictPolicyPrincipal, principal ) ) + OAuth.Policy.ALLOW_MISSING_OR_FAILED -> { principal } + null -> { principal } diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/SanUriMatcherFactory.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/SanUriMatcherFactory.kt index 8de9f6acf..4bcb16850 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/SanUriMatcherFactory.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/SanUriMatcherFactory.kt @@ -35,8 +35,8 @@ class SanUriMatcherFactory( private fun getSanUriFormatSplit(): Pair { val format = tlsProperties.sanUriFormat val parts = format.split(serviceNameTemplate) - if (parts.size != 2) { - throw IllegalArgumentException("SAN URI $format does not properly contain $serviceNameTemplate") + require(parts.size == 2) { + "SAN URI $format does not properly contain $serviceNameTemplate" } return parts[0] to parts[1] } diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/routes/ServiceTagMetadataGenerator.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/routes/ServiceTagMetadataGenerator.kt index 2d641a693..7f33a9fb8 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/routes/ServiceTagMetadataGenerator.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/routes/ServiceTagMetadataGenerator.kt @@ -23,9 +23,8 @@ class ServiceTagMetadataGenerator(properties: ServiceTagsProperties = ServiceTag init { properties.allowedTagsCombinations.forEach { - if (it.tags.size < 2 || it.tags.size > 3) { - throw IllegalArgumentException( - "A tags combination must contain 2 or 3 tags. Combination with ${it.tags.size} tags found") + require(it.tags.size in 2..3) { + "A tags combination must contain 2 or 3 tags. Combination with ${it.tags.size} tags found" } } val combinationsByService = properties.allowedTagsCombinations diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt index d219efc29..00fccdc2d 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/utils/ReactorUtils.kt @@ -130,8 +130,8 @@ private fun measureScannableBuffer( * To access actual buffer size, we need to extract it from inners(). We don't know how many sources will * be available, so it must be stated explicitly as innerSources parameter. */ - (0 until innerSources).forEach { - meterRegistry.gauge("${bufferMetric(name)}_$it", scannable, innerBufferExtractor(it)) + for (i in 0 until innerSources) { + meterRegistry.gauge("${bufferMetric(name)}_$i", scannable, innerBufferExtractor(i)) } } diff --git a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/envoy/EgressOperations.kt b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/envoy/EgressOperations.kt index 6b6d89905..26b7eaff0 100644 --- a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/envoy/EgressOperations.kt +++ b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/envoy/EgressOperations.kt @@ -22,6 +22,7 @@ class EgressOperations(val envoy: EnvoyContainer) { body: RequestBody? = null ) = callWithHostHeader(service, headers, pathAndQuery, method, body) + @Suppress("detekt.ForEachOnRange") fun callServiceRepeatedly( service: String, stats: CallStats, diff --git a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/envoycontrol/EnvoyControlTestApp.kt b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/envoycontrol/EnvoyControlTestApp.kt index 168cd1b0f..2e72c3703 100644 --- a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/envoycontrol/EnvoyControlTestApp.kt +++ b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/envoycontrol/EnvoyControlTestApp.kt @@ -220,8 +220,9 @@ class EnvoyControlRunnerTestApp( .execute().addToCloseableResponses() } - override fun meterRegistry() = app.context().getBean(MeterRegistry::class.java) - ?: throw IllegalStateException("MeterRegistry bean not found in the context") + override fun meterRegistry() = checkNotNull(app.context().getBean(MeterRegistry::class.java)) { + "MeterRegistry bean not found in the context" + } companion object { val logger by logger() From 5dfd8e21d28a0b3a86c250f724e195fad00f4dd2 Mon Sep 17 00:00:00 2001 From: "jan.kozlowski" Date: Sat, 14 Sep 2024 11:45:37 +0200 Subject: [PATCH 6/9] apply ktlintFormat --- .../snapshot/resource/listeners/filters/SanUriMatcherFactory.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/SanUriMatcherFactory.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/SanUriMatcherFactory.kt index 4bcb16850..e4996444b 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/SanUriMatcherFactory.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/listeners/filters/SanUriMatcherFactory.kt @@ -3,7 +3,6 @@ package pl.allegro.tech.servicemesh.envoycontrol.snapshot.resource.listeners.fil import io.envoyproxy.envoy.type.matcher.v3.RegexMatcher import io.envoyproxy.envoy.type.matcher.v3.StringMatcher import pl.allegro.tech.servicemesh.envoycontrol.snapshot.TlsAuthenticationProperties -import java.lang.IllegalArgumentException class SanUriMatcherFactory( private val tlsProperties: TlsAuthenticationProperties From 0a5711cda7e372bed979048c219bfb8a197dea73 Mon Sep 17 00:00:00 2001 From: "jan.kozlowski" Date: Mon, 16 Sep 2024 08:29:30 +0200 Subject: [PATCH 7/9] use bytebuddy instead of cglib --- build.gradle | 2 +- envoy-control-core/build.gradle | 2 +- envoy-control-source-consul/build.gradle | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index a4effa8e3..6f1659bd8 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ allprojects { ecwid_consul : '1.4.1', toxiproxy : '2.1.3', consul_recipes : '0.9.1', - cglib : '3.2.9', + bytebuddy : '1.15.1', re2j : '1.3', xxhash : '0.10.1', dropwizard : '4.2.26' diff --git a/envoy-control-core/build.gradle b/envoy-control-core/build.gradle index 169d88d62..6d4295acf 100644 --- a/envoy-control-core/build.gradle +++ b/envoy-control-core/build.gradle @@ -21,7 +21,7 @@ dependencies { testImplementation group: 'io.grpc', name: 'grpc-testing', version: versions.grpc testImplementation group: 'io.projectreactor', name: 'reactor-test' testImplementation group: 'org.mockito', name: 'mockito-core' - testImplementation group: 'cglib', name: 'cglib-nodep', version: versions.cglib + testImplementation group: 'net.bytebuddy', name: 'byte-buddy', version: versions.bytebuddy testImplementation group: 'org.awaitility', name: 'awaitility' diff --git a/envoy-control-source-consul/build.gradle b/envoy-control-source-consul/build.gradle index 20c070eec..b42614c97 100644 --- a/envoy-control-source-consul/build.gradle +++ b/envoy-control-source-consul/build.gradle @@ -7,7 +7,7 @@ dependencies { api group: 'com.ecwid.consul', name: 'consul-api', version: versions.ecwid_consul testImplementation group: 'org.mockito', name: 'mockito-core' - testImplementation group: 'cglib', name: 'cglib-nodep', version: versions.cglib + testImplementation group: 'net.bytebuddy', name: 'byte-buddy', version: versions.bytebuddy testImplementation group: 'io.projectreactor', name: 'reactor-test' testImplementation group: 'org.testcontainers', name: 'testcontainers' From 2892d36fc6846ba096341cf95073d36b2a436b4b Mon Sep 17 00:00:00 2001 From: "jan.kozlowski" Date: Mon, 16 Sep 2024 08:34:12 +0200 Subject: [PATCH 8/9] clean up flaky test configuration --- envoy-control-tests/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/envoy-control-tests/build.gradle b/envoy-control-tests/build.gradle index 108965573..4e11132d9 100644 --- a/envoy-control-tests/build.gradle +++ b/envoy-control-tests/build.gradle @@ -38,7 +38,6 @@ task reliabilityTest(type: Test) { } task flakyTest(type: Test) { - systemProperty 'RELIABILITY_FAILURE_DURATION_SECONDS', System.getProperty('RELIABILITY_FAILURE_DURATION_SECONDS', '300') useJUnitPlatform { includeTags 'flaky' } From 6ce78d6420c62118d6457181dcb6cf0ccf58734a Mon Sep 17 00:00:00 2001 From: "jan.kozlowski" Date: Mon, 16 Sep 2024 09:44:49 +0200 Subject: [PATCH 9/9] fix testcontainers --- build.gradle | 2 +- .../servicemesh/envoycontrol/config/consul/ConsulContainer.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6f1659bd8..dd88f1c24 100644 --- a/build.gradle +++ b/build.gradle @@ -52,7 +52,7 @@ allprojects { ecwid_consul : '1.4.1', toxiproxy : '2.1.3', consul_recipes : '0.9.1', - bytebuddy : '1.15.1', + bytebuddy : '1.15.1', re2j : '1.3', xxhash : '0.10.1', dropwizard : '4.2.26' diff --git a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/consul/ConsulContainer.kt b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/consul/ConsulContainer.kt index cf734b212..3a7cdbb62 100644 --- a/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/consul/ConsulContainer.kt +++ b/envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/config/consul/ConsulContainer.kt @@ -27,7 +27,7 @@ class ConsulContainer( override fun configure() { super.configure() - portBindings.add("$externalPort:$internalPort") + portBindings = listOf("$externalPort:$internalPort") awaitConsulReady() }