Skip to content

Cleanup old checkForUpdates restrictions#12687

Open
ejona86 wants to merge 5 commits intogrpc:masterfrom
ejona86:cleanup-checkForUpdates
Open

Cleanup old checkForUpdates restrictions#12687
ejona86 wants to merge 5 commits intogrpc:masterfrom
ejona86:cleanup-checkForUpdates

Conversation

@ejona86
Copy link
Member

@ejona86 ejona86 commented Mar 10, 2026

f36defa upgraded error_prone_annotations and 4de4718 bumped minSdkVersion for android-interop-testing.

f36defa upgraded error_prone_annotations and 4de4718 bumped
minSdkVersion for android-interop-testing.
@ejona86 ejona86 requested a review from shivaspeaks March 10, 2026 22:37
Copy link
Member

@shivaspeaks shivaspeaks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might also want to update google-auth-library-oauth2-http to <version>1.41.0</version> in https://github.com/grpc/grpc-java/blob/master/examples/example-gauth/pom.xml#L60 and in example-oauth/pom.xml.

@shivaspeaks
Copy link
Member

shivaspeaks commented Mar 11, 2026

Error:  Failed while enforcing RequireUpperBoundDeps. The error(s) are [
Error:  Require upper bound dependencies error for com.google.code.gson:gson:2.12.1 paths to dependency are:
Error:  +-io.grpc:example-gauth:1.81.0-SNAPSHOT
Error:    +-com.google.auth:google-auth-library-oauth2-http:1.40.0
Error:      +-com.google.code.gson:gson:2.12.1
Error:  and
Error:  +-io.grpc:example-gauth:1.81.0-SNAPSHOT
Error:    +-io.grpc:grpc-netty-shaded:1.81.0-SNAPSHOT [runtime]
Error:      +-io.grpc:grpc-core:1.81.0-SNAPSHOT [runtime] (managed) <-- io.grpc:grpc-core:1.81.0-SNAPSHOT [runtime]
Error:        +-com.google.code.gson:gson:2.13.2 [runtime]
Error:  and
Error:  +-io.grpc:example-gauth:1.81.0-SNAPSHOT
Error:    +-com.google.auth:google-auth-library-oauth2-http:1.40.0
Error:      +-com.google.http-client:google-http-client-gson:2.0.2
Error:        +-com.google.code.gson:gson:2.11.0
Error:  ]

gson is coming in transitively and causing to conflict with enforcer that's why we are seeing CI failures. Just updating version in pom.xml will not resolve this issue because Google Auth Library For Java OAuth2 HTTP: 1.41.0 uses google-http-client-gson: 2.0.2 and GSON Extensions to The Google HTTP Client Library For Java: 2.0.2 still uses gson: 2.11.0.

We should add the gson dependency in <dependencyManagement> in conflicting files of pom.xml, such that this doesn't add anything to our classpath and instead, it acts as just a version lookup table.

@shivaspeaks
Copy link
Member

bad class file: /root/.gradle/caches/8.14.3/transforms/3060166f931d79a77add1fe2f80315a2/transformed/cronet-api-143.7445.0-api.jar(/org/chromium/net/BidirectionalStream.class)
class file has wrong version 61.0, should be 55.0
Please remove or make sure it appears in the correct subdirectory of the classpath.

Looks like the upgraded Cronet library (143.7445.0) was compiled with Java 17 and the build env for kokoro job was setup with Java 11.

@ejona86
Copy link
Member Author

ejona86 commented Mar 11, 2026

You're kidding me. This is the nonsense error I faced with #12685 and thought I worked around. Apparently it can still fail (racy??). I'll re-run the test, but I'm worried.

Execution failed for task ':grpc-android-interop-testing:mergeExtDexDebug'.
> Could not resolve all files for configuration ':grpc-android-interop-testing:debugRuntimeClasspath'.
   > Failed to transform opencensus-contrib-grpc-metrics-0.31.1.jar (io.opencensus:opencensus-contrib-grpc-metrics:0.31.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Could not resolve all files for configuration ':grpc-android-interop-testing:debugRuntimeClasspath'.
         > Failed to transform grpc-api-1.81.0-SNAPSHOT.jar (project :grpc-api) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
            > Execution failed for IdentityTransform: /grpc-java/api/build/libs/grpc-api-1.81.0-SNAPSHOT.jar.
               > File/directory does not exist: /grpc-java/api/build/libs/grpc-api-1.81.0-SNAPSHOT.jar
> There is 1 more failure with an identical cause.

@ejona86
Copy link
Member Author

ejona86 commented Mar 13, 2026

I am now able to reliably reproduce the failure on my machine:

./gradlew clean :grpc-android-interop-testing:build -PskipAndroid=false -Pandroid.useAndroidX=true --no-build-cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants