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

refactor(dependency): add explicit dependency of google-http-client-jackson2 while upgrading spockframework 2.3 #1061

Merged
merged 1 commit into from
Oct 2, 2024

Commits on Oct 2, 2024

  1. refactor(dependency): add explicit dependency of google-http-client-j…

    …ackson2 in kayenta-google while upgrading spockframework 2.3
    
    While upgrading spockframework 2.3-groovy-4.0, encountered below error during the build process of kayenta-google module:
    ```
    /kayenta/kayenta-google/src/main/java/com/netflix/kayenta/google/security/GoogleClientFactory.java:24: error: package com.google.api.client.json.jackson2 does not exist
    import com.google.api.client.json.jackson2.JacksonFactory;
    ```
    Further, dependency insight does not show the dependency of `google-http-client-jackson2`:
    ```
    > Task :kayenta-google:dependencyInsight
    No dependencies matching given input were found in configuration ':kayenta-google:compileClasspath'
    ```
    
    Whereas, before the spockframework upgrade this dependency transitively appears in insight:
    ```
    > Task :kayenta-google:dependencyInsight
    com.google.http-client:google-http-client-jackson2:1.41.7
      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                |
       Selection reasons:
          - By constraint
          - Forced
    
    com.google.http-client:google-http-client-jackson2:1.41.7
    \--- io.spinnaker.orca:orca-bom:8.55.0
         \--- compileClasspath
    
    com.google.http-client:google-http-client-jackson2:1.36.0 -> 1.41.7
    \--- com.google.api-client:google-api-client:1.30.10
         +--- io.spinnaker.orca:orca-bom:8.55.0
         |    \--- compileClasspath
         +--- com.google.apis:google-api-services-monitoring:v3-rev477-1.25.0 (requested com.google.api-client:google-api-client:1.25.0)
         |    +--- compileClasspath (requested com.google.apis:google-api-services-monitoring)
         |    \--- io.spinnaker.orca:orca-bom:8.55.0 (*)
         \--- com.google.apis:google-api-services-storage:v1-rev141-1.25.0 (requested com.google.api-client:google-api-client:1.25.0)
              +--- compileClasspath (requested com.google.apis:google-api-services-storage)
              \--- io.spinnaker.orca:orca-bom:8.55.0 (*)
    ```
    So, adding explicit dependency of `google-http-client-jackson2` in kayenta-google.gradle
    
    Dependency insight after refactor:
    ```
    > Task :kayenta-google:dependencyInsight
    com.google.http-client:google-http-client-jackson2:1.41.7
      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                |
       Selection reasons:
          - By constraint
          - Forced
    
    com.google.http-client:google-http-client-jackson2:1.41.7
    \--- io.spinnaker.orca:orca-bom:spock-2-3-SNAPSHOT
         \--- compileClasspath
    
    com.google.http-client:google-http-client-jackson2 -> 1.41.7
    \--- compileClasspath
    ```
    j-sandy committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    0ac081d View commit details
    Browse the repository at this point in the history