Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dependency): add explicit dependency of groovy-templates in clouddriver-kubernetes while upgrading groovy 3.x #6053

Merged
merged 2 commits into from Sep 22, 2023

Conversation

j-sandy
Copy link
Contributor

@j-sandy j-sandy commented Sep 22, 2023

While upgrading groovy 3.0.10 and spockframework 2.0-groovy-3.0, groovy-templates is not part of spockframework and encounter below error during test compilation:

> Task :clouddriver-kubernetes:compileTestGroovy FAILED
startup failed:
/clouddriver/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/description/KubernetesManifestSpec.groovy: 25: unable to resolve class groovy.text.SimpleTemplateEngine
 @ line 25, column 1.
   import groovy.text.SimpleTemplateEngine
   ^
1 error

So, adding explicit dependency of groovy-templates in clouddriver-kubernetes.gradle

With groovy 2.5.15 and spockframework 1.3-groovy-2.5, groovy-templates appear as transitive dependency of spockframework as shown below:

Starting a Gradle Daemon, 34 stopped Daemons could not be reused, use --status for details

> Task :clouddriver-kubernetes:dependencyInsight
org.codehaus.groovy:groovy-templates:2.5.15
  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             |          | 11                |
    | org.jetbrains.kotlin.platform.type |          | jvm               |
   Selection reasons:
      - By constraint
      - Forced

org.codehaus.groovy:groovy-templates:2.5.15
\--- io.spinnaker.kork:kork-bom:7.190.0
     \--- testCompileClasspath

org.codehaus.groovy:groovy-templates:2.5.4 -> 2.5.15
+--- org.spockframework:spock-core:1.3-groovy-2.5
|    +--- testCompileClasspath (requested org.spockframework:spock-core)
|    +--- io.spinnaker.kork:kork-bom:7.190.0
|    |    \--- testCompileClasspath
|    \--- org.spockframework:spock-spring:1.3-groovy-2.5
|         +--- testCompileClasspath (requested org.spockframework:spock-spring)
|         \--- io.spinnaker.kork:kork-bom:7.190.0 (*)
\--- org.spockframework:spock-spring:1.3-groovy-2.5 (*)

…uddriver-kubernetes while upgrading groovy 3.x

While upgrading groovy 3.0.10 and spockframework 2.0-groovy-3.0, groovy-templates is not part of [spockframework](https://mvnrepository.com/artifact/org.spockframework/spock-core/2.0-groovy-3.0) and encounter below error during test compilation:

```
> Task :clouddriver-kubernetes:compileTestGroovy FAILED
startup failed:
/clouddriver/clouddriver-kubernetes/src/test/groovy/com/netflix/spinnaker/clouddriver/kubernetes/description/KubernetesManifestSpec.groovy: 25: unable to resolve class groovy.text.SimpleTemplateEngine
 @ line 25, column 1.
   import groovy.text.SimpleTemplateEngine
   ^
1 error
```
So, adding explicit dependency of groovy-templates in clouddriver-kubernetes.gradle

With groovy 2.5.15 and spockframework 1.3-groovy-2.5, groovy-templates appear as transitive dependency of [spockframework](https://mvnrepository.com/artifact/org.spockframework/spock-core/1.3-groovy-2.5) as shown below:
```$ ./gradlew clouddriver-kubernetes:dI --dependency groovy-templates --configuration testCompileClasspath
Starting a Gradle Daemon, 34 stopped Daemons could not be reused, use --status for details

> Task :clouddriver-kubernetes:dependencyInsight
org.codehaus.groovy:groovy-templates:2.5.15
  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             |          | 11                |
    | org.jetbrains.kotlin.platform.type |          | jvm               |
   Selection reasons:
      - By constraint
      - Forced

org.codehaus.groovy:groovy-templates:2.5.15
\--- io.spinnaker.kork:kork-bom:7.190.0
     \--- testCompileClasspath

org.codehaus.groovy:groovy-templates:2.5.4 -> 2.5.15
+--- org.spockframework:spock-core:1.3-groovy-2.5
|    +--- testCompileClasspath (requested org.spockframework:spock-core)
|    +--- io.spinnaker.kork:kork-bom:7.190.0
|    |    \--- testCompileClasspath
|    \--- org.spockframework:spock-spring:1.3-groovy-2.5
|         +--- testCompileClasspath (requested org.spockframework:spock-spring)
|         \--- io.spinnaker.kork:kork-bom:7.190.0 (*)
\--- org.spockframework:spock-spring:1.3-groovy-2.5 (*)
```
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for a merge label Sep 22, 2023
@mergify mergify bot added the auto merged Merged automatically by a bot label Sep 22, 2023
@mergify mergify bot merged commit ff7c74e into spinnaker:master Sep 22, 2023
16 checks passed
@j-sandy j-sandy deleted the k8s-groovy-templates branch September 22, 2023 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto merged Merged automatically by a bot ready to merge Approved and ready for a merge target-release/1.33
Projects
None yet
3 participants