fix: grpc-alts is used not only in tests#761
Conversation
This reverts commit c8ef46f.
|
cc @mohanli-ml |
Codecov Report
@@ Coverage Diff @@
## master #761 +/- ##
=========================================
Coverage 84.99% 85.00%
Complexity 2562 2562
=========================================
Files 143 143
Lines 13983 14007 +24
Branches 1335 1338 +3
=========================================
+ Hits 11885 11906 +21
- Misses 1537 1538 +1
- Partials 561 563 +2
Continue to review full report at Codecov.
|
google-cloud-spanner/pom.xml
Outdated
| <dependency> | ||
| <groupId>io.grpc</groupId> | ||
| <artifactId>grpc-alts</artifactId> | ||
| <scope>runtime</scope> |
There was a problem hiding this comment.
grpc-alts is already a compile time dependency as it is a transitive dependency of gax-grpc. This degrades it to a runtime dependency. Is there a reason that we need to downgrade it here, and that we can't just let it be a compile time dependency?
| <scope>runtime</scope> |
This is the dependency tree completely without the grpc-alts dependency declaration:
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO] ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]
[INFO] ---------------< com.google.cloud:google-cloud-spanner >----------------
[INFO] Building Google Cloud Spanner 3.1.4-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) @ google-cloud-spanner ---
[INFO] com.google.cloud:google-cloud-spanner:jar:3.1.4-SNAPSHOT
[INFO] +- io.grpc:grpc-api:jar:1.34.1:compile
[INFO] | +- com.google.errorprone:error_prone_annotations:jar:2.4.0:compile
[INFO] | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.19:runtime
[INFO] +- io.grpc:grpc-auth:jar:1.34.1:compile
[INFO] +- io.grpc:grpc-context:jar:1.34.1:compile
[INFO] +- io.grpc:grpc-core:jar:1.34.1:compile
[INFO] | +- com.google.android:annotations:jar:4.1.1.4:runtime
[INFO] | \- io.perfmark:perfmark-api:jar:0.19.0:runtime
[INFO] +- io.grpc:grpc-netty-shaded:jar:1.34.1:compile
[INFO] +- io.grpc:grpc-protobuf:jar:1.34.1:compile
[INFO] | \- io.grpc:grpc-protobuf-lite:jar:1.34.1:compile
[INFO] +- io.grpc:grpc-stub:jar:1.34.1:compile
[INFO] +- com.google.api:api-common:jar:1.10.1:compile
[INFO] | \- com.google.auto.value:auto-value-annotations:jar:1.7.4:compile
[INFO] +- com.google.protobuf:protobuf-java:jar:3.14.0:compile
[INFO] +- com.google.protobuf:protobuf-java-util:jar:3.14.0:compile
[INFO] +- com.google.api.grpc:proto-google-common-protos:jar:2.0.1:compile
[INFO] +- com.google.api.grpc:grpc-google-common-protos:jar:2.0.1:compile
[INFO] | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] | +- org.checkerframework:checker-compat-qual:jar:2.5.5:compile
[INFO] | \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] +- com.google.api.grpc:proto-google-iam-v1:jar:1.0.5:compile
[INFO] +- com.google.cloud:google-cloud-core:jar:1.94.0:compile
[INFO] | \- com.google.http-client:google-http-client-jackson2:jar:1.38.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.12.0:compile
[INFO] +- com.google.cloud:google-cloud-core-grpc:jar:1.94.0:compile
[INFO] +- io.opencensus:opencensus-api:jar:0.24.0:compile
[INFO] +- io.opencensus:opencensus-contrib-grpc-util:jar:0.24.0:compile
[INFO] +- com.google.auth:google-auth-library-oauth2-http:jar:0.22.2:compile
[INFO] +- com.google.http-client:google-http-client:jar:1.38.0:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | | \- commons-codec:commons-codec:jar:1.11:compile
[INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile
[INFO] | \- io.opencensus:opencensus-contrib-http-util:jar:0.24.0:compile
[INFO] +- com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:jar:3.1.4-SNAPSHOT:compile
[INFO] +- com.google.api.grpc:proto-google-cloud-spanner-v1:jar:3.1.4-SNAPSHOT:compile
[INFO] +- com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:jar:3.1.4-SNAPSHOT:compile
[INFO] +- com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:jar:3.1.4-SNAPSHOT:compile
[INFO] +- com.google.api.grpc:grpc-google-cloud-spanner-v1:jar:3.1.4-SNAPSHOT:compile
[INFO] +- com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:jar:3.1.4-SNAPSHOT:compile
[INFO] +- com.google.guava:guava:jar:30.1-android:compile
[INFO] +- com.google.api:gax:jar:1.60.1:compile
[INFO] +- com.google.api:gax-grpc:jar:1.60.1:compile
[INFO] | \- io.grpc:grpc-alts:jar:1.34.1:compile
[INFO] | +- io.grpc:grpc-grpclb:jar:1.34.1:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.5:compile
[INFO] | \- org.conscrypt:conscrypt-openjdk-uber:jar:2.5.1:compile
[INFO] +- org.threeten:threetenbp:jar:1.5.0:compile
[INFO] +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] +- com.google.code.gson:gson:jar:2.8.6:compile
[INFO] +- com.google.auth:google-auth-library-credentials:jar:0.22.2:compile
[INFO] +- junit:junit:jar:4.13.1:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- com.google.api:gax-grpc:jar:testlib:1.60.1:test
[INFO] +- com.google.truth:truth:jar:1.1:test
[INFO] | +- org.checkerframework:checker-qual:jar:3.7.0:test
[INFO] | \- org.ow2.asm:asm:jar:9.0:test
[INFO] +- org.mockito:mockito-all:jar:1.10.19:test
[INFO] +- org.json:json:jar:20201115:test
[INFO] +- com.google.guava:guava-testlib:jar:30.1-android:test
[INFO] +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] +- org.openjdk.jmh:jmh-core:jar:1.27:test
[INFO] | +- net.sf.jopt-simple:jopt-simple:jar:4.6:test
[INFO] | \- org.apache.commons:commons-math3:jar:3.2:test
[INFO] +- org.openjdk.jmh:jmh-generator-annprocess:jar:1.27:test
[INFO] \- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.470 s
[INFO] Finished at: 2020-12-21T08:17:23+01:00
[INFO] ------------------------------------------------------------------------
|
@olavloite by removing the final SpannerOptions options = SpannerOptions.newBuilder().build();
final Spanner spanner = options.getService();
final DatabaseAdminClient databaseAdminClient = spanner.getDatabaseAdminClient();
final OperationFuture<Database, CreateDatabaseMetadata> op = databaseAdminClient
.createDatabase(
INSTANCE,
DATABASE,
Collections.<String>emptyList()
);
op.get();If you look at the dependency tree with the As you can see above, |
Yes, it seems to be needed as a compile time dependency. Removing it from the |
|
Added |
olavloite
left a comment
There was a problem hiding this comment.
The dependency is now included twice in the pom (once as runtime dependency and once as a compile dependency). I think we should only include it once.
Removes duplicate grpc-alts dependency
|
@olavloite thanks for spotting that, pushed the fix (removed the runtime dependency). |
* fix: grpc-alts is used not only in tests This reverts commit c8ef46f. * fix: adds grpc-alts as compile time dependency * fix: removes duplicate dependency Removes duplicate grpc-alts dependency
This is an auto-generated regeneration of the .pb.go files by cloud.google.com/go/internal/gapicgen. Once this PR is submitted, genbot will update the corresponding PR to depend on the newer version of go-genproto, and assign reviewers. Whilst this or any regen PR is open in go-genproto, genbot will not create any more regeneration PRs. If all regen PRs are closed, gapicgen will create a new set of regeneration PRs once per night. If you have been assigned to review this PR, please: - Ensure that CI is passing. If it's failing, it requires your manual attention. - Approve and submit this PR if you believe it's ready to ship. That will prompt genbot to assign reviewers to the google-cloud-go PR. Corresponding google-cloud-go PR: googleapis/google-cloud-go#5663 Changes: feat(orgpolicy): Deprecates AlternativePolicySpec PiperOrigin-RevId: 428897918 Source-Link: googleapis/googleapis@bbb3c1f chore: regenerate API index Source-Link: googleapis/googleapis@3f75ee1 fix!: remove showcase protos (googleapis#702) Source-Link: googleapis/googleapis@665a4f0 chore(bazel): update gapic-generator-php v1.4.4 Changes include: - protect against diregapic enum using reserved words - updated packaged version of composer and php for bazel PiperOrigin-RevId: 428886122 Source-Link: googleapis/googleapis@9f7048a fix(ruby)!: Remove the obsolete v1beta1 version from the Ruby google-cloud-video-transcoder client's dependencies PiperOrigin-RevId: 428881386 Source-Link: googleapis/googleapis@d3659fc Synchronize new proto/yaml changes. PiperOrigin-RevId: 428863885 Source-Link: googleapis/googleapis@86978fd Synchronize new proto/yaml changes. PiperOrigin-RevId: 428863285 Source-Link: googleapis/googleapis@298784c Synchronize new proto/yaml changes. PiperOrigin-RevId: 428861556 Source-Link: googleapis/googleapis@4b022d9 Synchronize new proto/yaml changes. PiperOrigin-RevId: 428857389 Source-Link: googleapis/googleapis@fccbb78 Synchronize new proto/yaml changes. PiperOrigin-RevId: 428856882 Source-Link: googleapis/googleapis@1ce14f5 Synchronize new proto/yaml changes. PiperOrigin-RevId: 428856087 Source-Link: googleapis/googleapis@a618f00 Synchronize new proto/yaml changes. PiperOrigin-RevId: 428853987 Source-Link: googleapis/googleapis@08a6f94 Synchronize new proto/yaml changes. PiperOrigin-RevId: 428853672 Source-Link: googleapis/googleapis@58fbca6 Synchronize new proto/yaml changes. PiperOrigin-RevId: 428853083 Source-Link: googleapis/googleapis@8c50f1d fix(channel): clarify language PiperOrigin-RevId: 428802866 Source-Link: googleapis/googleapis@8cb4699 build: library of v1beta3 showcase onboarded to SAM PiperOrigin-RevId: 428800970 Source-Link: googleapis/googleapis@b4792ab feat(documentai): add `symbols` field, and auto-format comments PiperOrigin-RevId: 428800506 Source-Link: googleapis/googleapis@ea20380 build: library of v1 showcase onboarded to SAM PiperOrigin-RevId: 428800466 Source-Link: googleapis/googleapis@c23aef2 build: library of v1beta1 showcase onboarded to SAM PiperOrigin-RevId: 428800060 Source-Link: googleapis/googleapis@0eb4364 feat(documentai): add `symbols` field, and auto-format comments PiperOrigin-RevId: 428799963 Source-Link: googleapis/googleapis@8b6181f chore: regenerate API index Source-Link: googleapis/googleapis@36a7e1d build: library of v1 showcase onboarded to SAM PiperOrigin-RevId: 428796832 Source-Link: googleapis/googleapis@ea51465 chore: regenerate API index Source-Link: googleapis/googleapis@4f919d1 build: library of v1beta2 showcase onboarded to SAM PiperOrigin-RevId: 428795809 Source-Link: googleapis/googleapis@59f9a97 build: library of v1beta3 showcase onboarded to SAM PiperOrigin-RevId: 428795767 Source-Link: googleapis/googleapis@1673d57 build: library of v1beta1 showcase onboarded to SAM PiperOrigin-RevId: 428795675 Source-Link: googleapis/googleapis@79bec21 chore: regenerate API index Source-Link: googleapis/googleapis@e8fea5a feat: add WarmAndPing request for channel priming PiperOrigin-RevId: 428795660 Source-Link: googleapis/googleapis@6cce671
This reverts commit c8ef46f.
Without having grpc-alts in
runtime/compilescope I get the following error when running the client library: