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-json in clouddriver-web while upgrading groovy 3.x #6060

Merged
merged 1 commit into from
Sep 28, 2023

Conversation

j-sandy
Copy link
Contributor

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

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

startup failed:
/clouddriver/clouddriver-web/src/test/groovy/com/netflix/spinnaker/clouddriver/controllers/CredentialsControllerSpec.groovy: 27: unable to resolve class groovy.json.JsonSlurper
 @ line 27, column 1.
   import groovy.json.JsonSlurper
   ^
1 error
> Task :clouddriver-web:compileTestGroovy FAILED

So, adding explicit dependency of groovy-json in clouddriver-web.gradle.

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

$ ./gradlew clouddriver-web:dI --dependency groovy-json --configuration testCompileClasspath

> Task :clouddriver-web:dependencyInsight
org.codehaus.groovy:groovy-json: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-json:2.5.15
\--- io.spinnaker.kork:kork-bom:7.191.0
     \--- testCompileClasspath

org.codehaus.groovy:groovy-json: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.191.0
          \--- testCompileClasspath

…ver-web while upgrading groovy 3.x

While upgrading groovy 3.0.10 and spockframework 2.0-groovy-3.0, groovy-json 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:
```
startup failed:
/clouddriver/clouddriver-web/src/test/groovy/com/netflix/spinnaker/clouddriver/controllers/CredentialsControllerSpec.groovy: 27: unable to resolve class groovy.json.JsonSlurper
 @ line 27, column 1.
   import groovy.json.JsonSlurper
   ^
1 error
> Task :clouddriver-web:compileTestGroovy FAILED

```
So, adding explicit dependency of groovy-json in clouddriver-web.gradle.

With groovy 2.5.15 and spockframework 1.3-groovy-2.5, groovy-json appear as transitive dependency of [spockframework](https://mvnrepository.com/artifact/org.spockframework/spock-core/1.3-groovy-2.5) as shown below:

```
$ ./gradlew clouddriver-web:dI --dependency groovy-json --configuration testCompileClasspath

> Task :clouddriver-web:dependencyInsight
org.codehaus.groovy:groovy-json: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-json:2.5.15
\--- io.spinnaker.kork:kork-bom:7.191.0
     \--- testCompileClasspath

org.codehaus.groovy:groovy-json: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.191.0
          \--- testCompileClasspath

```
@dbyron-sf dbyron-sf added the ready to merge Approved and ready for a merge label Sep 28, 2023
@mergify mergify bot added the auto merged Merged automatically by a bot label Sep 28, 2023
@mergify mergify bot merged commit 6fb89dc into spinnaker:master Sep 28, 2023
17 checks passed
@j-sandy j-sandy deleted the groovy-json branch September 28, 2023 17:03
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
Development

Successfully merging this pull request may close these issues.

3 participants