-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
dependenciespriority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
The shaded release of google-cloud-nio (we are currently on release 0.81.0-alpha:shaded) does not shade all of its dependencies. In particular, classes in google-cloud-core-* (such as google-cloud-core-http) are not being shaded.
As a result, we run into problems such as this one: com.google.cloud.http.HttpTransportOptions is not itself shaded, but its method getHttpTransportFactory() returns an instance of a shaded class shaded.cloud_nio.com.google.auth.http.HttpTransportFactory, which calling code from outside the library cannot handle. This results in the error below:
Exception in thread "main" java.lang.NoSuchMethodError: com.google.cloud.http.HttpTransportOptions.getHttpTransportFactory()Lcom/google/auth/http/HttpTransportFactory;
at com.google.cloud.bigquery.spi.v2.HttpBigQueryRpc.<init>(HttpBigQueryRpc.java:89)
at com.google.cloud.bigquery.BigQueryOptions$DefaultBigQueryRpcFactory.create(BigQueryOptions.java:56)
at com.google.cloud.bigquery.BigQueryOptions$DefaultBigQueryRpcFactory.create(BigQueryOptions.java:50)
at com.google.cloud.ServiceOptions.getRpc(ServiceOptions.java:510)
at com.google.cloud.bigquery.BigQueryOptions.getBigQueryRpcV2(BigQueryOptions.java:123)
at com.google.cloud.bigquery.BigQueryImpl.<init>(BigQueryImpl.java:150)
at com.google.cloud.bigquery.BigQueryOptions$DefaultBigQueryFactory.create(BigQueryOptions.java:46)
at com.google.cloud.bigquery.BigQueryOptions$DefaultBigQueryFactory.create(BigQueryOptions.java:40)
at com.google.cloud.ServiceOptions.getService(ServiceOptions.java:498)
at org.broadinstitute.hellbender.tools.examples.ExampleBigQueryReader.traverse(ExampleBigQueryReader.java:108)
at org.broadinstitute.hellbender.engine.GATKTool.doWork(GATKTool.java:984)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:139)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:191)
at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:210)
at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:162)
at org.broadinstitute.hellbender.Main.mainEntry(Main.java:205)
Would it be possible to shade these classes from google-cloud-core-* in the shaded google-cloud-nio jar?
Metadata
Metadata
Labels
dependenciespriority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.