Skip to content

Commit

Permalink
chore(dependencies): Autobump korkVersion (#6233)
Browse files Browse the repository at this point in the history
* chore(dependencies): Autobump korkVersion

* refactor(mysql): update mysql connector coordinate during upgrade to spring boot 2.7.x

In spring boot 2.7.8 onwards mysql connector coordinate `mysql:mysql-connector-java` has been removed and only `com.mysql:mysql-connector-j` coordinate exist.

https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#mysql-jdbc-driver

So, updating the mysql connector coordinate as `com.mysql:mysql-connector-j` with spring boot upgrade to 2.7.18.

https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.7.18/spring-boot-dependencies-2.7.18.pom

* refactor(test): remove extracting() method due to breaking change during upgrade to spring boot 2.7.x

While upgrading spring boot 2.7.18, encounter below error during execution of tests under clouddriver-google module:
```
> Task :clouddriver-google:test

AbstractGoogleServerGroupCachingAgentTest > serverGroupAutoscalingPolicy_allFields() FAILED
    java.lang.AssertionError:
    Expecting actual not to be null
        at com.netflix.spinnaker.clouddriver.google.provider.agent.AbstractGoogleServerGroupCachingAgentTest.serverGroupAutoscalingPolicy_allFields(AbstractGoogleServerGroupCachingAgentTest.java:791)

646 tests completed, 1 failed, 1 skipped

> Task :clouddriver-google:test FAILED
```
The root cause is a breaking change brought by assertj-core:3.22.0 as transitive dependency of spring boot 2.7.18.
The breaking change is that extracting() now throws an assertion error if actual is null.

https://assertj.github.io/doc/#assertj-core-3-22-0-release-notes

Before:
```
$ ./gradlew clouddriver-google:dI --dependency assertj-core --configuration testRuntimeClasspath

> Task :clouddriver-google:dependencyInsight
org.assertj:assertj-core:3.21.0
  Variant runtime:
    | Attribute Name                     | Provided     | Requested    |
    |------------------------------------|--------------|--------------|
    | org.gradle.status                  | release      |              |
    | org.gradle.category                | library      | library      |
    | org.gradle.libraryelements         | jar          | jar          |
    | org.gradle.usage                   | java-runtime | java-runtime |
    | org.gradle.dependency.bundling     |              | external     |
    | org.gradle.jvm.environment         |              | standard-jvm |
    | org.gradle.jvm.version             |              | 11           |
    | org.jetbrains.kotlin.platform.type |              | jvm          |
   Selection reasons:
      - By constraint
      - Forced

org.assertj:assertj-core:3.21.0
\--- io.spinnaker.kork:kork-bom:7.227.0
     +--- testRuntimeClasspath
     +--- project :clouddriver-artifacts
     |    \--- testRuntimeClasspath
     +--- project :clouddriver-consul
     |    \--- testRuntimeClasspath
     +--- project :clouddriver-core
     |    +--- testRuntimeClasspath
     |    +--- project :clouddriver-artifacts (*)
     |    \--- project :clouddriver-consul (*)
     +--- project :clouddriver-security
     |    +--- testRuntimeClasspath
     |    \--- project :clouddriver-core (*)
     +--- project :cats:cats-redis
     |    \--- project :clouddriver-core (*)
     +--- project :cats:cats-core
     |    +--- testRuntimeClasspath
     |    +--- project :clouddriver-core (*)
     |    +--- project :clouddriver-security (*)
     |    \--- project :cats:cats-redis (*)
     +--- project :clouddriver-api
     |    +--- testRuntimeClasspath
     |    +--- project :clouddriver-artifacts (*)
     |    +--- project :clouddriver-core (*)
     |    +--- project :clouddriver-security (*)
     |    +--- project :cats:cats-redis (*)
     |    \--- project :cats:cats-core (*)
     +--- project :clouddriver-google-common
     |    \--- testRuntimeClasspath
     +--- project :clouddriver-saga
     |    \--- project :clouddriver-core (*)
     \--- project :clouddriver-event
          \--- project :clouddriver-saga (*)

org.assertj:assertj-core -> 3.21.0
\--- testRuntimeClasspath

org.assertj:assertj-core:3.20.2 -> 3.21.0
\--- org.junit.platform:junit-platform-testkit:1.8.2
     +--- io.spinnaker.kork:kork-bom:7.227.0
     |    +--- testRuntimeClasspath
     |    +--- project :clouddriver-artifacts
     |    |    \--- testRuntimeClasspath
     |    +--- project :clouddriver-consul
     |    |    \--- testRuntimeClasspath
     |    +--- project :clouddriver-core
     |    |    +--- testRuntimeClasspath
     |    |    +--- project :clouddriver-artifacts (*)
     |    |    \--- project :clouddriver-consul (*)
     |    +--- project :clouddriver-security
     |    |    +--- testRuntimeClasspath
     |    |    \--- project :clouddriver-core (*)
     |    +--- project :cats:cats-redis
     |    |    \--- project :clouddriver-core (*)
     |    +--- project :cats:cats-core
     |    |    +--- testRuntimeClasspath
     |    |    +--- project :clouddriver-core (*)
     |    |    +--- project :clouddriver-security (*)
     |    |    \--- project :cats:cats-redis (*)
     |    +--- project :clouddriver-api
     |    |    +--- testRuntimeClasspath
     |    |    +--- project :clouddriver-artifacts (*)
     |    |    +--- project :clouddriver-core (*)
     |    |    +--- project :clouddriver-security (*)
     |    |    +--- project :cats:cats-redis (*)
     |    |    \--- project :cats:cats-core (*)
     |    +--- project :clouddriver-google-common
     |    |    \--- testRuntimeClasspath
     |    +--- project :clouddriver-saga
     |    |    \--- project :clouddriver-core (*)
     |    \--- project :clouddriver-event
     |         \--- project :clouddriver-saga (*)
     +--- org.spockframework:spock-core:2.0-groovy-3.0 (requested org.junit.platform:junit-platform-testkit)
     |    +--- testRuntimeClasspath (requested org.spockframework:spock-core)
     |    +--- io.spinnaker.kork:kork-bom:7.227.0 (*)
     |    \--- org.spockframework:spock-spring:2.0-groovy-3.0
     |         +--- testRuntimeClasspath (requested org.spockframework:spock-spring)
     |         \--- io.spinnaker.kork:kork-bom:7.227.0 (*)
     \--- org.junit:junit-bom:5.8.2
          +--- org.spockframework:spock-spring:2.0-groovy-3.0 (requested org.junit:junit-bom:5.7.2) (*)
          +--- org.spockframework:spock-core:2.0-groovy-3.0 (requested org.junit:junit-bom:5.7.2) (*)
          +--- org.junit.jupiter:junit-jupiter-engine:5.8.2
          |    +--- testRuntimeClasspath (requested org.junit.jupiter:junit-jupiter-engine)
          |    +--- io.spinnaker.kork:kork-bom:7.227.0 (*)
          |    \--- org.junit:junit-bom:5.8.2 (*)
          +--- org.junit.jupiter:junit-jupiter-api:5.8.2
          |    +--- testRuntimeClasspath (requested org.junit.jupiter:junit-jupiter-api)
          |    +--- io.spinnaker.kork:kork-bom:7.227.0 (*)
          |    +--- org.junit.jupiter:junit-jupiter-engine:5.8.2 (*)
          |    +--- org.mockito:mockito-junit-jupiter:4.0.0 (requested org.junit.jupiter:junit-jupiter-api:5.8.1)
          |    |    +--- testRuntimeClasspath (requested org.mockito:mockito-junit-jupiter)
          |    |    \--- io.spinnaker.kork:kork-bom:7.227.0 (*)
          |    \--- org.junit:junit-bom:5.8.2 (*)
          +--- org.junit.platform:junit-platform-launcher:1.8.2
          |    +--- io.spinnaker.kork:kork-bom:7.227.0 (*)
          |    +--- org.junit:junit-bom:5.8.2 (*)
          |    \--- org.junit.platform:junit-platform-testkit:1.8.2 (*)
          +--- org.junit.platform:junit-platform-engine:1.8.2
          |    +--- io.spinnaker.kork:kork-bom:7.227.0 (*)
          |    +--- org.spockframework:spock-core:2.0-groovy-3.0 (requested org.junit.platform:junit-platform-engine) (*)
          |    +--- org.junit.jupiter:junit-jupiter-engine:5.8.2 (*)
          |    +--- org.junit.platform:junit-platform-launcher:1.8.2 (*)
          |    \--- org.junit:junit-bom:5.8.2 (*)
          +--- org.junit.platform:junit-platform-commons:1.8.2
          |    +--- io.spinnaker.kork:kork-bom:7.227.0 (*)
          |    +--- org.junit.jupiter:junit-jupiter-api:5.8.2 (*)
          |    +--- org.junit.platform:junit-platform-engine:1.8.2 (*)
          |    \--- org.junit:junit-bom:5.8.2 (*)
          \--- org.junit.platform:junit-platform-testkit:1.8.2 (*)

```

After
```
$ ./gradlew clouddriver-google:dI --dependency assertj-core --configuration testRuntimeClasspath

> Task :clouddriver-google:dependencyInsight
org.assertj:assertj-core:3.22.0
  Variant runtime:
    | Attribute Name                     | Provided     | Requested    |
    |------------------------------------|--------------|--------------|
    | org.gradle.status                  | release      |              |
    | org.gradle.category                | library      | library      |
    | org.gradle.libraryelements         | jar          | jar          |
    | org.gradle.usage                   | java-runtime | java-runtime |
    | org.gradle.dependency.bundling     |              | external     |
    | org.gradle.jvm.environment         |              | standard-jvm |
    | org.gradle.jvm.version             |              | 11           |
    | org.jetbrains.kotlin.platform.type |              | jvm          |
   Selection reasons:
      - By constraint
      - Forced

org.assertj:assertj-core:3.22.0
\--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT
     +--- testRuntimeClasspath
     +--- project :clouddriver-artifacts
     |    \--- testRuntimeClasspath
     +--- project :clouddriver-consul
     |    \--- testRuntimeClasspath
     +--- project :clouddriver-core
     |    +--- testRuntimeClasspath
     |    +--- project :clouddriver-artifacts (*)
     |    \--- project :clouddriver-consul (*)
     +--- project :clouddriver-security
     |    +--- testRuntimeClasspath
     |    \--- project :clouddriver-core (*)
     +--- project :cats:cats-redis
     |    \--- project :clouddriver-core (*)
     +--- project :cats:cats-core
     |    +--- testRuntimeClasspath
     |    +--- project :clouddriver-core (*)
     |    +--- project :clouddriver-security (*)
     |    \--- project :cats:cats-redis (*)
     +--- project :clouddriver-api
     |    +--- testRuntimeClasspath
     |    +--- project :clouddriver-artifacts (*)
     |    +--- project :clouddriver-core (*)
     |    +--- project :clouddriver-security (*)
     |    +--- project :cats:cats-redis (*)
     |    \--- project :cats:cats-core (*)
     +--- project :clouddriver-google-common
     |    \--- testRuntimeClasspath
     +--- project :clouddriver-saga
     |    \--- project :clouddriver-core (*)
     \--- project :clouddriver-event
          \--- project :clouddriver-saga (*)

org.assertj:assertj-core -> 3.22.0
\--- testRuntimeClasspath

org.assertj:assertj-core:3.20.2 -> 3.22.0
\--- org.junit.platform:junit-platform-testkit:1.8.2
     +--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT
     |    +--- testRuntimeClasspath
     |    +--- project :clouddriver-artifacts
     |    |    \--- testRuntimeClasspath
     |    +--- project :clouddriver-consul
     |    |    \--- testRuntimeClasspath
     |    +--- project :clouddriver-core
     |    |    +--- testRuntimeClasspath
     |    |    +--- project :clouddriver-artifacts (*)
     |    |    \--- project :clouddriver-consul (*)
     |    +--- project :clouddriver-security
     |    |    +--- testRuntimeClasspath
     |    |    \--- project :clouddriver-core (*)
     |    +--- project :cats:cats-redis
     |    |    \--- project :clouddriver-core (*)
     |    +--- project :cats:cats-core
     |    |    +--- testRuntimeClasspath
     |    |    +--- project :clouddriver-core (*)
     |    |    +--- project :clouddriver-security (*)
     |    |    \--- project :cats:cats-redis (*)
     |    +--- project :clouddriver-api
     |    |    +--- testRuntimeClasspath
     |    |    +--- project :clouddriver-artifacts (*)
     |    |    +--- project :clouddriver-core (*)
     |    |    +--- project :clouddriver-security (*)
     |    |    +--- project :cats:cats-redis (*)
     |    |    \--- project :cats:cats-core (*)
     |    +--- project :clouddriver-google-common
     |    |    \--- testRuntimeClasspath
     |    +--- project :clouddriver-saga
     |    |    \--- project :clouddriver-core (*)
     |    \--- project :clouddriver-event
     |         \--- project :clouddriver-saga (*)
     +--- org.spockframework:spock-core:2.0-groovy-3.0 (requested org.junit.platform:junit-platform-testkit)
     |    +--- testRuntimeClasspath (requested org.spockframework:spock-core)
     |    +--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT (*)
     |    \--- org.spockframework:spock-spring:2.0-groovy-3.0
     |         +--- testRuntimeClasspath (requested org.spockframework:spock-spring)
     |         \--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT (*)
     \--- org.junit:junit-bom:5.8.2
          +--- org.spockframework:spock-spring:2.0-groovy-3.0 (requested org.junit:junit-bom:5.7.2) (*)
          +--- org.spockframework:spock-core:2.0-groovy-3.0 (requested org.junit:junit-bom:5.7.2) (*)
          +--- org.junit.jupiter:junit-jupiter-engine:5.8.2
          |    +--- testRuntimeClasspath (requested org.junit.jupiter:junit-jupiter-engine)
          |    +--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT (*)
          |    \--- org.junit:junit-bom:5.8.2 (*)
          +--- org.junit.jupiter:junit-jupiter-api:5.8.2
          |    +--- testRuntimeClasspath (requested org.junit.jupiter:junit-jupiter-api)
          |    +--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT (*)
          |    +--- org.junit.jupiter:junit-jupiter-engine:5.8.2 (*)
          |    +--- org.mockito:mockito-junit-jupiter:4.5.1
          |    |    +--- testRuntimeClasspath (requested org.mockito:mockito-junit-jupiter)
          |    |    \--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT (*)
          |    \--- org.junit:junit-bom:5.8.2 (*)
          +--- org.junit.platform:junit-platform-launcher:1.8.2
          |    +--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT (*)
          |    +--- org.junit:junit-bom:5.8.2 (*)
          |    \--- org.junit.platform:junit-platform-testkit:1.8.2 (*)
          +--- org.junit.platform:junit-platform-engine:1.8.2
          |    +--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT (*)
          |    +--- org.spockframework:spock-core:2.0-groovy-3.0 (requested org.junit.platform:junit-platform-engine) (*)
          |    +--- org.junit.jupiter:junit-jupiter-engine:5.8.2 (*)
          |    +--- org.junit.platform:junit-platform-launcher:1.8.2 (*)
          |    \--- org.junit:junit-bom:5.8.2 (*)
          +--- org.junit.platform:junit-platform-commons:1.8.2
          |    +--- io.spinnaker.kork:kork-bom:sb2718-SNAPSHOT (*)
          |    +--- org.junit.jupiter:junit-jupiter-api:5.8.2 (*)
          |    +--- org.junit.platform:junit-platform-engine:1.8.2 (*)
          |    \--- org.junit:junit-bom:5.8.2 (*)
          \--- org.junit.platform:junit-platform-testkit:1.8.2 (*)

```

---------

Co-authored-by: root <root@51dce6428a99>
Co-authored-by: j-sandy <[email protected]>
  • Loading branch information
3 people authored Jun 12, 2024
1 parent ad1a8ef commit dd4d0a5
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cats/cats-sql/cats-sql.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ dependencies {
testImplementation "org.springframework:spring-test"
testImplementation "org.testcontainers:mysql"
testImplementation "org.testcontainers:postgresql"
testImplementation "mysql:mysql-connector-java"
testImplementation "com.mysql:mysql-connector-j"
testImplementation "org.postgresql:postgresql"
}
2 changes: 1 addition & 1 deletion clouddriver-artifacts/clouddriver-artifacts.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ dependencies {
integrationImplementation "org.testcontainers:testcontainers"
integrationImplementation "org.testcontainers:mysql"
integrationImplementation "org.testcontainers:junit-jupiter"
integrationImplementation "mysql:mysql-connector-java"
integrationImplementation "com.mysql:mysql-connector-j"
integrationImplementation ("io.rest-assured:rest-assured:4.0.0") {
// Exclude groovy pulled in by rest-assured, so we use kork's version
exclude group: "org.codehaus.groovy", module: "groovy"
Expand Down
2 changes: 1 addition & 1 deletion clouddriver-ecs/clouddriver-ecs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ dependencies {
integrationImplementation project(":clouddriver-web")
integrationImplementation "org.springframework:spring-test"
integrationImplementation "org.testcontainers:mysql"
integrationImplementation "mysql:mysql-connector-java"
integrationImplementation "com.mysql:mysql-connector-j"
integrationImplementation sourceSets.test.output
integrationImplementation sourceSets.main.output
integrationImplementation ("io.rest-assured:rest-assured:4.0.0") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,9 +787,10 @@ void serverGroupAutoscalingPolicy_allFields() {
assertThat(convertedCustomMetric.getMetric()).isEqualTo(inputCustomMetric.getMetric());
assertThat(convertedCustomMetric.getUtilizationTarget())
.isEqualTo(inputCustomMetric.getUtilizationTarget());
assertThat(convertedCustomMetric.getUtilizationTargetType())
.extracting(
enumValue -> Optional.ofNullable(enumValue).map(Object::toString).orElse(null))
assertThat(
Optional.ofNullable(convertedCustomMetric.getUtilizationTargetType())
.map(Object::toString)
.orElse(null))
.isEqualTo(inputCustomMetric.getUtilizationTargetType());
}
}
Expand Down
2 changes: 1 addition & 1 deletion clouddriver-integration/clouddriver-integration.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {
testImplementation "com.fasterxml.jackson.core:jackson-databind"
testImplementation "mysql:mysql-connector-java"
testImplementation "com.mysql:mysql-connector-j"
testImplementation "org.assertj:assertj-core"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.postgresql:postgresql"
Expand Down
2 changes: 1 addition & 1 deletion clouddriver-kubernetes/clouddriver-kubernetes.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ dependencies {
integrationImplementation "org.testcontainers:testcontainers"
integrationImplementation "org.testcontainers:mysql"
integrationImplementation "org.testcontainers:junit-jupiter"
integrationImplementation "mysql:mysql-connector-java"
integrationImplementation "com.mysql:mysql-connector-j"
integrationImplementation ("io.rest-assured:rest-assured:4.0.0") {
// Exclude groovy pulled in by rest-assured, so we use kork's version
exclude group: "org.codehaus.groovy", module: "groovy"
Expand Down
2 changes: 1 addition & 1 deletion clouddriver-sql-mysql/clouddriver-sql-mysql.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ dependencies {
implementation project(":cats:cats-sql")
implementation project(":clouddriver-sql")

runtimeOnly "mysql:mysql-connector-java"
runtimeOnly "com.mysql:mysql-connector-j"
}
2 changes: 1 addition & 1 deletion clouddriver-sql/clouddriver-sql.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies {

testImplementation "io.spinnaker.kork:kork-sql-test"
testImplementation "org.testcontainers:mysql"
testImplementation "mysql:mysql-connector-java"
testImplementation "com.mysql:mysql-connector-j"

testImplementation "cglib:cglib-nodep"
testImplementation "org.objenesis:objenesis"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
korkVersion=7.229.0
korkVersion=7.230.0
fiatVersion=1.47.0
org.gradle.parallel=true
spinnakerGradleVersion=8.32.1
Expand Down

0 comments on commit dd4d0a5

Please sign in to comment.