-
Notifications
You must be signed in to change notification settings - Fork 78
Linkage Monitor detects a genuine error between proto-google-common-protos and appengine-api-1.0-sdk #2045
Description
From googleapis/java-common-protos#148 (comment) , where Neenu told me that the Linkage Monitor check is blocking the pull request.
Upon checking I think It's a genuine linkage error but how can we bring the check back to green?
The Linkage Monitor says:
May 05, 2021 4:03:30 PM com.google.cloud.tools.dependencies.linkagemonitor.LinkageMonitor run
INFO: BOM Coordinates: com.google.cloud:libraries-bom:20.2.0
May 05, 2021 4:06:57 PM com.google.cloud.tools.dependencies.linkagemonitor.LinkageMonitor run
INFO: The following problems in the baseline no longer appear in the snapshot:
Class com.google.api.VisibilityProto is not found
Class com.google.api.VisibilityProto is not found
Class com.google.api.VisibilityProto is not found
Class com.google.api.VisibilityProto is not found
Class com.google.api.VisibilityProto is not found
Class com.google.api.VisibilityProto is not found
May 05, 2021 4:06:57 PM com.google.cloud.tools.dependencies.linkagemonitor.LinkageMonitor run
SEVERE: Newly introduced problem:
(com.google.api.grpc:proto-google-common-protos:2.1.1-SNAPSHOT) com.google.api.VisibilityProto's method getDescriptor() is expected to return com.google.appengine.repackaged.com.google.protobuf.Descriptors$FileDescriptor but instead returns com.google.protobuf.Descriptors$FileDescriptor
referenced from com.google.appengine.repackaged.com.google.api.HttpProto (com.google.appengine:appengine-api-1.0-sdk:1.9.71)
referenced from com.google.appengine.repackaged.com.google.rpc.context.AbuseContextProto (com.google.appengine:appengine-api-1.0-sdk:1.9.71)
referenced from com.google.appengine.repackaged.com.google.rpc.context.ConditionContextProto (com.google.appengine:appengine-api-1.0-sdk:1.9.71)
referenced from com.google.appengine.repackaged.com.google.rpc.context.ContextExtensionsProto (com.google.appengine:appengine-api-1.0-sdk:1.9.71)
referenced from com.google.appengine.repackaged.com.google.rpc.context.QosContextProto (com.google.appengine:appengine-api-1.0-sdk:1.9.71)
referenced from com.google.appengine.repackaged.com.google.rpc.context.VisibilityContextProto (com.google.appengine:appengine-api-1.0-sdk:1.9.71)
com.google.api.grpc:proto-google-common-protos:2.1.1-SNAPSHOT is at:
com.google.api.grpc:proto-google-common-protos:2.1.1-SNAPSHOT (compile)
and 1 dependency path.
com.google.appengine:appengine-api-1.0-sdk:1.9.71 is at:
com.google.http-client:google-http-client-appengine:1.39.2 (compile) / com.google.appengine:appengine-api-1.0-sdk:1.9.71 (provided)
and 2 other dependency paths.
The error comes from the discrepancy between repackaged method reference (in appengine-api-1.0-sdk-1.9.71.jar) and non-repackaged implementation (in proto-google-common-protos).
appengine-api-1.0-sdk-1.9.71.jar
$ javap -verbose -cp ~/.m2/repository/com/google/appengine/appengine-api-1.0-sdk/1.9.71/appengine-api-1.0-sdk-1.9.71.jar com/google/appengine/repackaged/com/google/api/HttpProto |less
...
#149 = Methodref #130.#54 // com/google/api/VisibilityProto.getDescriptor:()Lcom/google/appengine/repackaged/com/google/protobuf/Descriptors$FileDescriptor;
VisibilityProto.java in this PR
The method in this PR returns non-repackaged version of FileDescriptors.FileDescriptor
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
}
In general, when one of the classes marked "not found" in appengine-api-1.0-sdk JAR file (dashboard) is introduced to proto-google-common-protos artifact, it may have such linkage errors on method references due to repackaged classes.
Solutions?
Ideal solution
If we can make the appengine-api-1.0-sdk artifact stop repackaging classes, then that's would be great.
Temporary Solution
We add the method reference to the default exclusion rule.
Others?
Other solution to unblock the pull request (googleapis/java-common-protos#148 (comment))?