Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump grpc version to 1.58.0 and protobuf to 3.24.0 #1989

Merged
merged 26 commits into from
Sep 20, 2023

Conversation

mpeddada1
Copy link
Contributor

@mpeddada1 mpeddada1 commented Sep 13, 2023

Notable changes in this PR:

cc/ @suztomo

@mpeddada1 mpeddada1 requested a review from a team as a code owner September 13, 2023 17:56
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Sep 13, 2023
@mpeddada1
Copy link
Contributor Author

mpeddada1 commented Sep 13, 2023

Stacktrace:

Error:  +-com.google.api.grpc:grpc-google-common-protos:2.24.1-SNAPSHOT
Error:    +-com.google.protobuf:protobuf-java:3.23.2
Error:  and
Error:  +-com.google.api.grpc:grpc-google-common-protos:2.24.1-SNAPSHOT
Error:    +-io.grpc:grpc-protobuf:1.58.0
Error:      +-com.google.protobuf:protobuf-java:3.23.2 (managed) <-- com.google.protobuf:protobuf-java:3.24.0

The release notes of gRPC mention that protobuf was updated to 3.24.0.

@mpeddada1 mpeddada1 changed the title build(deps): bump grpc version to 1.58.0 build(deps): bump grpc version to 1.58.0 and protobuf to 3.24.0 Sep 13, 2023
@product-auto-label product-auto-label bot added size: s Pull request size is small. and removed size: xs Pull request size is extra small. labels Sep 13, 2023
@mpeddada1 mpeddada1 changed the title build(deps): bump grpc version to 1.58.0 and protobuf to 3.24.0 build(deps): bump grpc version to 1.58.0 and protobuf to 3.24.0 [WIP] Sep 14, 2023
@suztomo
Copy link
Member

suztomo commented Sep 14, 2023

Error:  Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.3.0:enforce (enforce) on project gax-grpc: 
Error:  Rule 2: org.apache.maven.enforcer.rules.dependency.RequireUpperBoundDeps failed with message:
Error:  Failed while enforcing RequireUpperBoundDeps. The error(s) are [
Error:  Require upper bound dependencies error for com.google.errorprone:error_prone_annotations:2.18.0 paths to dependency are:
Error:  +-com.google.api:gax-grpc:2.33.1-SNAPSHOT
Error:    +-com.google.api:api-common:2.16.1-SNAPSHOT
Error:      +-com.google.errorprone:error_prone_annotations:2.18.0
Error:  and
Error:  +-com.google.api:gax-grpc:2.33.1-SNAPSHOT
Error:    +-io.grpc:grpc-api:1.58.0
Error:      +-com.google.errorprone:error_prone_annotations:2.20.0
Error:  and
Error:  +-com.google.api:gax-grpc:2.33.1-SNAPSHOT
Error:    +-io.grpc:grpc-stub:1.58.0
Error:      +-com.google.errorprone:error_prone_annotations:2.20.0 [runtime]
Error:  and
Error:  +-com.google.api:gax-grpc:2.33.1-SNAPSHOT
Error:    +-io.grpc:grpc-netty-shaded:1.58.0 [runtime]
Error:      +-com.google.errorprone:error_prone_annotations:2.20.0 [runtime]
Error:  and
Error:  +-com.google.api:gax-grpc:2.33.1-SNAPSHOT
Error:    +-com.google.auth:google-auth-library-oauth2-http:1.19.0
Error:      +-com.google.http-client:google-http-client:1.43.3 (managed) <-- com.google.http-client:google-http-client:1.42.3
Error:        +-com.google.errorprone:error_prone_annotations:2.18.0
Error:  and
Error:  +-com.google.api:gax-grpc:2.33.1-SNAPSHOT
Error:    +-io.grpc:grpc-alts:1.58.0
Error:      +-io.grpc:grpc-grpclb:1.58.0 (managed) <-- io.grpc:grpc-grpclb:1.58.0
Error:        +-com.google.errorprone:error_prone_annotations:2.20.0 [runtime]
Error:  and
Error:  +-com.google.api:gax-grpc:2.33.1-SNAPSHOT
Error:    +-io.grpc:grpc-alts:1.58.0
Error:      +-io.grpc:grpc-grpclb:1.58.0 (managed) <-- io.grpc:grpc-grpclb:1.58.0
Error:        +-com.google.protobuf:protobuf-java-util:3.24.0 [runtime] (managed) <-- com.google.protobuf:protobuf-java-util:3.24.0 [runtime]
Error:          +-com.google.errorprone:error_prone_annotations:2.18.0 [runtime]
Error:  and
Error:  +-com.google.api:gax-grpc:2.33.1-SNAPSHOT
Error:    +-io.grpc:grpc-googleapis:1.58.0 [runtime]
Error:      +-io.grpc:grpc-xds:1.58.0 [runtime] (managed) <-- io.grpc:grpc-xds:1.58.0 [runtime]
Error:        +-io.grpc:grpc-services:1.58.0 [runtime] (managed) <-- io.grpc:grpc-services:1.58.0 [runtime]
Error:          +-com.google.errorprone:error_prone_annotations:2.20.0 [runtime]
Error:  ]

@mpeddada1 Try upgrading https://github.com/googleapis/sdk-platform-java/blob/main/java-shared-dependencies/third-party-dependencies/pom.xml#L31

@mpeddada1
Copy link
Contributor Author

Thanks Tomo! Making some progress. Running into a different error now:

Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:testCompile (default-testCompile) on project gax-grpc: Compilation failure: Compilation failure: 
Error:  /home/runner/work/sdk-platform-java/sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/testing/InProcessServer.java:[40,25] package io.grpc.inprocess does not exist
Error:  /home/runner/work/sdk-platform-java/sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/GrpcDirectServerStreamingCallableTest.java:[54,25] package io.grpc.inprocess does not exist
Error:  /home/runner/work/sdk-platform-java/sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/GrpcDirectStreamingCallableTest.java:[52,25] package io.grpc.inprocess does not exist
Error:  /home/runner/work/sdk-platform-java/sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/testing/MockServiceHelper.java:[36,25] package io.grpc.inprocess does not exist
Error:  /home/runner/work/sdk-platform-java/sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/testing/LocalChannelProvider.java:[48,25] package io.grpc.inprocess does not exist
Error:  /home/runner/work/sdk-platform-java/sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/GrpcCallableFactoryTest.java:[53,25] package io.grpc.inprocess does not exist
Error:  /home/runner/work/sdk-platform-java/sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/GrpcResponseMetadataTest.java:[50,25] package io.grpc.inprocess does not exist

@mpeddada1
Copy link
Contributor Author

From the GRPC Github Releases page; grpc-inprocess and grpc-util have been moved out of grpc-core to be their own artifacts.

core, inprocess, util: 2 new artifacts grpc-inprocess and grpc-util have been created by moving code from grpc-core to facilitate Java module support (https://github.com/grpc/grpc-java/pull/10362, https://github.com/grpc/grpc-java/pull/10390)

@product-auto-label product-auto-label bot added size: l Pull request size is large. and removed size: s Pull request size is small. labels Sep 15, 2023
@mpeddada1
Copy link
Contributor Author

Showcase golden files were updated but we are still running into:

diff -ru /home/runner/work/sdk-platform-java/sdk-platform-java/showcase/scripts/../grpc-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ComplianceGrpc.java /home/runner/work/sdk-platform-java/sdk-platform-java/showcase/scripts/output/showcase-output/grpc-showcase-output/src/main/java/com/google/showcase/v1beta1/ComplianceGrpc.java
--- /home/runner/work/sdk-platform-java/sdk-platform-java/showcase/scripts/../grpc-gapic-showcase-v1beta1/src/main/java/com/google/showcase/v1beta1/ComplianceGrpc.java	2023-09-15 22:43:21.740534658 +0000
+++ /home/runner/work/sdk-platform-java/sdk-platform-java/showcase/scripts/output/showcase-output/grpc-showcase-output/src/main/java/com/google/showcase/v1beta1/ComplianceGrpc.java	2023-09-15 22:45:08.711177045 +0000
@@ -17,7 +17,7 @@
 
   private ComplianceGrpc() {}
 
-  public static final String SERVICE_NAME = "google.showcase.v1beta1.Compliance";
+  public static final java.lang.String SERVICE_NAME = "google.showcase.v1beta1.Compliance";
 
   // Static method descriptors that strictly reflect the proto.
   private static volatile io.grpc.MethodDescriptor<com.google.showcase.v1beta1.RepeatRequest,
@@ -1124,9 +1124,9 @@
   private static final class ComplianceMethodDescriptorSupplier
       extends ComplianceBaseDescriptorSupplier
       implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
-    private final String methodName;
+    private final java.lang.String methodName;
 
-    ComplianceMethodDescriptorSupplier(String methodName) {
+    ComplianceMethodDescriptorSupplier(java.lang.String methodName) {
       this.methodName = methodName;
     }

@mpeddada1
Copy link
Contributor Author

ci/gapic-generator-java-bom failing with:

Error:  Failed to execute goal on project bom-validation-canary-project: Could not resolve dependencies for project com.google.cloud:bom-validation-canary-project:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: io.grpc:grpc-android:jar:1.58.0, io.grpc:grpc-binder:jar:1.58.0, androidx.annotation:annotation:jar:1.6.0, androidx.core:core:jar:1.10.1, androidx.lifecycle:lifecycle-common:jar:2.6.1, io.grpc:grpc-cronet:jar:1.58.0, org.chromium.net:cronet-api:jar:108.5359.79: Could not find artifact io.grpc:grpc-android:jar:1.58.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
Error:  

@suztomo
Copy link
Member

suztomo commented Sep 18, 2023

Can you remove unnecessary artifacts from the canary project?

@mpeddada1
Copy link
Contributor Author

mpeddada1 commented Sep 19, 2023

Can you remove unnecessary artifacts from the canary project?

Thanks for the suggestion, @suztomo. Done in googleapis/java-cloud-bom#6189

.github/workflows/ci.yaml Outdated Show resolved Hide resolved
@mpeddada1
Copy link
Contributor Author

mpeddada1 commented Sep 19, 2023

Removal of deprecated MetadataUtils#attachHeader in grpc-stub:1.58.0 is causing compilation errors in ITKmsTest.java.

Comment on lines +41 to +48
# Perform testing on HEAD for google-cloud-java
if [ $repo == "google-cloud-java" ]; then
git clone "https://github.com/googleapis/$repo.git" --depth=1
else
# Perform testing on last release, not HEAD
last_release=$(find_last_release_version "$repo")
git clone "https://github.com/googleapis/$repo.git" --depth=1 --branch "v$last_release"
fi
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The downstream checks for java-kms were failing with a compilation error due to a removal of a method in grpc-stub:1.58.0. Needed to make this update to verify the changes in the monorepo: googleapis/google-cloud-java#9854.

@sonarqubecloud
Copy link

[gapic-generator-java-root] SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 53 Code Smells

0.0% 0.0% Coverage
48.3% 48.3% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@@ -282,7 +282,7 @@ jobs:
run: |
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
- name: Validate gapic-generator-java-bom
uses: googleapis/java-cloud-bom/tests/validate-bom@v26.13.0
uses: googleapis/java-cloud-bom/tests/validate-bom@2414e159ab8f882717ab7f6ae4c4a02c096b94fa
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To test with changes included in googleapis/java-cloud-bom#6191

@mpeddada1 mpeddada1 changed the title build(deps): bump grpc version to 1.58.0 and protobuf to 3.24.0 [WIP] build(deps): bump grpc version to 1.58.0 and protobuf to 3.24.0 Sep 20, 2023
@sonarqubecloud
Copy link

[java_showcase_integration_tests] SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 53 Code Smells

0.0% 0.0% Coverage
48.2% 48.2% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@mpeddada1 mpeddada1 requested a review from suztomo September 20, 2023 19:03
@sonarqubecloud
Copy link

[java_showcase_unit_tests] SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 53 Code Smells

0.0% 0.0% Coverage
48.2% 48.2% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@mpeddada1
Copy link
Contributor Author

We've not counted golden file coverage as a blocker for merging this PR in the past (ex, #1755). However, in the future, it may be helpful to re-evaluate the use of our Sonarcloud coverage.
cc/ @burkedavison

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants