Skip to content

grpc-auth's unit test fails with google-auth-library 0.25.X #8037

@suztomo

Description

@suztomo

Background: I'm surveying library compatibility across Google Java libraries.

I haven't figured out whether this is a bug in grpc-auth or google-auth-library.

What version of gRPC-Java are you using?

1.36.1

What is your environment?

Mac

What did you expect to see?

All tests pass

What did you see instead?

./gradlew :grpc-auth:test fails:

suztomo-macbookpro44% ./gradlew :grpc-auth:test
*** Skipping the build of codegen and compilation of proto files because skipCodegen=true
  * Skipping the build of Android projects because skipAndroid=true

> Task :grpc-auth:test

io.grpc.auth.GoogleAuthLibraryCallCredentialsTest > jwtAccessCredentialsInRequestMetadata FAILED
    org.junit.ComparisonFailure: expected:<https://example.com[:123/a.service]> but was:<https://example.com[/]>
        at org.junit.Assert.assertEquals(Assert.java:115)
        at org.junit.Assert.assertEquals(Assert.java:144)
        at io.grpc.auth.GoogleAuthLibraryCallCredentialsTest.jwtAccessCredentialsInRequestMetadata(GoogleAuthLibraryCallCredentialsTest.java:397)

16 tests completed, 1 failed

> Task :grpc-auth:test FAILED

Steps to reproduce the bug

Upgrade the version of googleauthVersion.

suztomo-macbookpro44% git diff                 
diff --git a/build.gradle b/build.gradle
index 9baf8e029..81fbc4d86 100644
--- a/build.gradle
+++ b/build.gradle
@@ -56,7 +56,7 @@ subprojects {
 
         nettyVersion = '4.1.52.Final'
         guavaVersion = '30.0-android'
-        googleauthVersion = '0.22.2'
+        googleauthVersion = '0.25.2'
         protobufVersion = '3.12.0'
         protocVersion = protobufVersion
         opencensusVersion = '0.28.0'

The variable is used in

            google_auth_credentials: "com.google.auth:google-auth-library-credentials:${googleauthVersion}",
            google_auth_oauth2_http: "com.google.auth:google-auth-library-oauth2-http:${googleauthVersion}",

Since when it doesn't work?

google-auth-library version :grpc-auth:test success/failure
0.25.2 fail
0.25.1 fail
0.25.0 fail
0.24.1 success
0.25.0 success

It seems the problem started after google-auth-library 0.25.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions