Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(dependency): add explicit resilience4j-vavr dependency with …
…spring boot upgrade to 3.x While upgrading the spring boot to 3.0.13 and spring cloud 2022.0.5, encountered the below error: ``` > Task :fiat-sql:compileKotlin FAILED e: /fiat/fiat-sql/src/main/kotlin/com/netflix/spinnaker/fiat/permissions/SqlPermissionsRepository.kt: (36, 11): Unresolved reference: vavr e: /fiat/fiat-sql/src/main/kotlin/com/netflix/spinnaker/fiat/permissions/SqlPermissionsRepository.kt: (49, 25): Unresolved reference: PreDestroy e: /fiat/fiat-sql/src/main/kotlin/com/netflix/spinnaker/fiat/permissions/SqlPermissionsRepository.kt: (550, 13): Unresolved reference: Try e: /fiat/fiat-sql/src/main/kotlin/com/netflix/spinnaker/fiat/permissions/SqlPermissionsRepository.kt: (561, 13): Unresolved reference: Try e: /fiat/fiat-sql/src/main/kotlin/com/netflix/spinnaker/fiat/permissions/SqlPermissionsRepository.kt: (599, 6): Unresolved reference: PreDestroy FAILURE: Build completed with 2 failures. ``` The root cause of this issue is removal of `io.vavr` dependency from resilience4j:2.0.2. https://github.com/resilience4j/resilience4j/releases/tag/v2.0.0 Resilience4j comes as transitive dependency of spring-cloud-dependencies. https://mvnrepository.com/artifact/org.springframework.cloud/spring-cloud-dependencies/2022.0.5 Dependency insight before spring cloud upgrade: ``` $ ./gradlew fiat-sql:dI --dependency io.vavr:vavr: > Task :fiat-sql:dependencyInsight io.vavr:vavr:0.10.2 Variant compile: | Attribute Name | Provided | Requested | |------------------------------------|----------|-------------------| | org.gradle.status | release | | | org.gradle.category | library | library | | org.gradle.libraryelements | jar | classes+resources | | org.gradle.usage | java-api | java-api | | org.gradle.dependency.bundling | | external | | org.gradle.jvm.environment | | standard-jvm | | org.gradle.jvm.version | | 17 | | org.jetbrains.kotlin.platform.type | | jvm | io.vavr:vavr:0.10.2 +--- io.github.resilience4j:resilience4j-annotations:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 | | \--- compileClasspath | +--- io.spinnaker.kork:kork-core:7.247.0 | | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | | +--- io.spinnaker.kork:kork-sql:7.247.0 | | | +--- compileClasspath (requested io.spinnaker.kork:kork-sql) | | | \--- io.spinnaker.kork:kork-bom:7.247.0 (*) | | \--- io.spinnaker.kork:kork-web:7.247.0 | | +--- compileClasspath (requested io.spinnaker.kork:kork-web) | | \--- io.spinnaker.kork:kork-bom:7.247.0 (*) | \--- io.github.resilience4j:resilience4j-spring:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | \--- io.github.resilience4j:resilience4j-spring-boot2:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | \--- io.spinnaker.kork:kork-core:7.247.0 (*) +--- io.github.resilience4j:resilience4j-bulkhead:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | \--- io.github.resilience4j:resilience4j-framework-common:1.7.0 | \--- io.github.resilience4j:resilience4j-spring:1.7.0 (*) +--- io.github.resilience4j:resilience4j-circuitbreaker:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | \--- io.github.resilience4j:resilience4j-framework-common:1.7.0 (*) +--- io.github.resilience4j:resilience4j-circularbuffer:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | \--- io.github.resilience4j:resilience4j-consumer:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | \--- io.github.resilience4j:resilience4j-spring:1.7.0 (*) +--- io.github.resilience4j:resilience4j-consumer:1.7.0 (*) +--- io.github.resilience4j:resilience4j-core:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | +--- io.github.resilience4j:resilience4j-framework-common:1.7.0 (*) | +--- io.github.resilience4j:resilience4j-retry:1.7.0 | | +--- compileClasspath (requested io.github.resilience4j:resilience4j-retry) | | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | | +--- io.spinnaker.kork:kork-core:7.247.0 (*) | | \--- io.github.resilience4j:resilience4j-framework-common:1.7.0 (*) | +--- io.github.resilience4j:resilience4j-consumer:1.7.0 (*) | +--- io.github.resilience4j:resilience4j-circuitbreaker:1.7.0 (*) | +--- io.github.resilience4j:resilience4j-ratelimiter:1.7.0 | | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | | \--- io.github.resilience4j:resilience4j-framework-common:1.7.0 (*) | +--- io.github.resilience4j:resilience4j-bulkhead:1.7.0 (*) | \--- io.github.resilience4j:resilience4j-timelimiter:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | \--- io.github.resilience4j:resilience4j-framework-common:1.7.0 (*) +--- io.github.resilience4j:resilience4j-framework-common:1.7.0 (*) +--- io.github.resilience4j:resilience4j-micrometer:1.7.0 | +--- io.spinnaker.kork:kork-bom:7.247.0 (*) | \--- io.github.resilience4j:resilience4j-spring-boot2:1.7.0 (*) +--- io.github.resilience4j:resilience4j-ratelimiter:1.7.0 (*) +--- io.github.resilience4j:resilience4j-retry:1.7.0 (*) +--- io.github.resilience4j:resilience4j-spring:1.7.0 (*) +--- io.github.resilience4j:resilience4j-spring-boot2:1.7.0 (*) \--- io.github.resilience4j:resilience4j-timelimiter:1.7.0 (*) ``` After spring cloud upgrade: ``` $ ./gradlew fiat-sql:dI --dependency io.vavr:vavr: > Task :fiat-sql:dependencyInsight No dependencies matching given input were found in configuration ':fiat-sql:compileClasspath' ``` In order to fix this issue adding explicit dependency of `resilience4j-vavr`. After adding dependency: ``` $ ./gradlew fiat-sql:dI --dependency io.vavr:vavr: > Task :fiat-sql:dependencyInsight io.vavr:vavr:0.10.2 Variant compile: | Attribute Name | Provided | Requested | |------------------------------------|----------|-------------------| | org.gradle.status | release | | | org.gradle.category | library | library | | org.gradle.libraryelements | jar | classes+resources | | org.gradle.usage | java-api | java-api | | org.gradle.dependency.bundling | | external | | org.gradle.jvm.environment | | standard-jvm | | org.gradle.jvm.version | | 17 | | org.jetbrains.kotlin.platform.type | | jvm | io.vavr:vavr:0.10.2 \--- io.github.resilience4j:resilience4j-vavr:2.0.2 +--- compileClasspath (requested io.github.resilience4j:resilience4j-vavr) \--- io.spinnaker.kork:kork-bom:sb-3-0-13-2-SNAPSHOT \--- compileClasspath ```
- Loading branch information