From b43a82a81356753d8f4ee9de9a6085ae09c916d9 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 13 Mar 2023 12:04:58 -0400 Subject: [PATCH 01/17] chore: Add Showcase Callables IT --- showcase/gapic-showcase/pom.xml | 4 + .../showcase/v1beta1/it/ITCallables.java | 171 ++++++++++++++++++ showcase/pom.xml | 5 + 3 files changed, 180 insertions(+) create mode 100644 showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java diff --git a/showcase/gapic-showcase/pom.xml b/showcase/gapic-showcase/pom.xml index 8c3de921fd..9e9154f8a3 100644 --- a/showcase/gapic-showcase/pom.xml +++ b/showcase/gapic-showcase/pom.xml @@ -161,6 +161,10 @@ junit test + + com.google.truth + truth + com.google.api.grpc diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java new file mode 100644 index 0000000000..1b3951ec9e --- /dev/null +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java @@ -0,0 +1,171 @@ +package com.google.showcase.v1beta1.it; + +import com.google.api.client.http.javanet.NetHttpTransport; +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ServerStream; +import com.google.api.gax.rpc.StatusCode; +import com.google.protobuf.Timestamp; +import com.google.rpc.Status; +import com.google.showcase.v1beta1.EchoClient; +import com.google.showcase.v1beta1.EchoRequest; +import com.google.showcase.v1beta1.EchoResponse; +import com.google.showcase.v1beta1.EchoSettings; +import com.google.showcase.v1beta1.ExpandRequest; +import com.google.showcase.v1beta1.PagedExpandRequest; +import com.google.showcase.v1beta1.WaitMetadata; +import com.google.showcase.v1beta1.WaitRequest; +import com.google.showcase.v1beta1.WaitResponse; +import io.grpc.ManagedChannelBuilder; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.threeten.bp.Instant; +import org.threeten.bp.temporal.ChronoUnit; + +import java.io.IOException; +import java.security.GeneralSecurityException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutionException; + +import static com.google.common.truth.Truth.assertThat; + +public class ITCallables { + private static EchoClient grpcClient; + private static EchoClient httpjsonClient; + + @BeforeClass + public static void createClient() throws IOException, GeneralSecurityException { + EchoSettings grpcEchoSettings = + EchoSettings.newHttpJsonBuilder() + .setCredentialsProvider(NoCredentialsProvider.create()) + .setTransportChannelProvider( + InstantiatingGrpcChannelProvider.newBuilder() + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .build()) + .build(); + grpcClient = EchoClient.create(grpcEchoSettings); + EchoSettings httpjsonEchoSettings = + EchoSettings.newHttpJsonBuilder() + .setCredentialsProvider(NoCredentialsProvider.create()) + .setTransportChannelProvider( + EchoSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport( + new NetHttpTransport.Builder().doNotValidateCertificate().build()) + .setEndpoint("http://localhost:7469") + .build()) + .build(); + httpjsonClient = EchoClient.create(httpjsonEchoSettings); + } + + @AfterClass + public static void destroyClient() { + grpcClient.close(); + httpjsonClient.close(); + } + + @Test + public void testEchoHttpJson() { + String content = "httpjson-echo"; + EchoResponse echoResponse = + httpjsonClient.echo(EchoRequest.newBuilder().setContent(content).build()); + assertThat(echoResponse.getContent()).isEqualTo(content); + } + + /* + This tests has the server return an error back as the result. + We use 404 NOT_FOUND Status as that has the same gRPC <-> HttpJson code mapping (showcase sever + has a map that translates the code) + The showcase server expects a gRPC Status Code and the result is the HttpJson's mapped value + */ + @Test + public void testEchoHttpJson_checkError() { + StatusCode.Code cancelledStatusCode = StatusCode.Code.NOT_FOUND; + try { + httpjsonClient.echo( + EchoRequest.newBuilder() + .setError(Status.newBuilder().setCode(cancelledStatusCode.ordinal()).build()) + .build()); + } catch (ApiException e) { + assertThat(e.getStatusCode().getCode()).isEqualTo(cancelledStatusCode); + } + } + + /* This tests that server-side streaming returns the correct content and the server returns the + correct number of responses */ + @Test + public void testExpandHttpJson() { + String content = "Testing the entire response is the same"; + ServerStream echoResponses = + httpjsonClient + .expandCallable() + .call(ExpandRequest.newBuilder().setContent(content).build()); + int numResponses = 0; + List values = new ArrayList<>(); + for (EchoResponse echoResponse : echoResponses) { + values.add(echoResponse.getContent()); + numResponses++; + } + + String response = String.join(" ", values.toArray(new String[0])); + assertThat(numResponses).isEqualTo(content.split(" ").length); + assertThat(response).isEqualTo(content); + } + + /* This tests that pagination returns the correct number of pages + responses and the content is + correct */ + @Test + public void testPagedExpandHttpJson() { + int pageSize = 2; + int pageToken = 1; + String content = "A series of words that will be sent back one by one"; + + EchoClient.PagedExpandPagedResponse pagedExpandPagedResponse = + httpjsonClient.pagedExpand( + PagedExpandRequest.newBuilder() + .setContent(content) + .setPageSize(pageSize) + .setPageToken(String.valueOf(pageToken)) + .build()); + int numPages = 0; + int numResponses = 0; + List values = new ArrayList<>(); + for (EchoClient.PagedExpandPage page : pagedExpandPagedResponse.iteratePages()) { + for (EchoResponse echoResponse : page.getValues()) { + values.add(echoResponse.getContent()); + numResponses++; + } + numPages++; + } + + int contentLength = content.split(" ").length; + boolean isDivisible = ((contentLength - pageToken) % pageSize) == 0; + // If the responses can't be evenly split into pages, then the extra responses will go to an + // additional page + int numExpectedPages = ((contentLength - pageToken) / pageSize) + (isDivisible ? 0 : 1); + int numExpectedResponses = contentLength - pageToken; + String expectedResponse = "series of words that will be sent back one by one"; + + assertThat(numPages).isEqualTo(numExpectedPages); + assertThat(numResponses).isEqualTo(numExpectedResponses); + assertThat(String.join(" ", values.toArray(new String[0]))).isEqualTo(expectedResponse); + } + + @Test + public void testWaitHttpJson() throws ExecutionException, InterruptedException { + // We set the future timeout to be 10 seconds in the future to ensure a few GetOperation calls + String content = "content"; + long futureTimeInSecondsFromEpoch = Instant.now().plus(10, ChronoUnit.SECONDS).getEpochSecond(); + OperationFuture operationFutureSuccess = + httpjsonClient.waitAsync( + WaitRequest.newBuilder() + .setEndTime(Timestamp.newBuilder().setSeconds(futureTimeInSecondsFromEpoch)) + .setSuccess(WaitResponse.newBuilder().setContent(content).build()) + .build()); + WaitResponse waitResponseSuccess = operationFutureSuccess.get(); + assertThat(waitResponseSuccess.getContent()).isEqualTo(content); + } +} diff --git a/showcase/pom.xml b/showcase/pom.xml index c8899d01c7..68e66ec939 100644 --- a/showcase/pom.xml +++ b/showcase/pom.xml @@ -54,6 +54,11 @@ 4.13.2 test + + com.google.truth + truth + 1.1.3 + From 45bdea17d0b92c3a5a930a00d681674714efcdfa Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Mon, 13 Mar 2023 16:59:18 -0400 Subject: [PATCH 02/17] chore: Add test scope --- showcase/gapic-showcase/pom.xml | 1 + showcase/pom.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/showcase/gapic-showcase/pom.xml b/showcase/gapic-showcase/pom.xml index 9e9154f8a3..9fed42f22d 100644 --- a/showcase/gapic-showcase/pom.xml +++ b/showcase/gapic-showcase/pom.xml @@ -164,6 +164,7 @@ com.google.truth truth + test diff --git a/showcase/pom.xml b/showcase/pom.xml index 68e66ec939..424ac6b4c0 100644 --- a/showcase/pom.xml +++ b/showcase/pom.xml @@ -58,6 +58,7 @@ com.google.truth truth 1.1.3 + test From 5ef67e9ffeaa52f3b81db6391d741d37582792fd Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 14 Mar 2023 11:41:54 +0000 Subject: [PATCH 03/17] deps: update google http client dependencies to v1.43.1 (#1487) --- gax-java/dependencies.properties | 4 ++-- gax-java/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gax-java/dependencies.properties b/gax-java/dependencies.properties index 7c6d3ddcf1..c0559aa84e 100644 --- a/gax-java/dependencies.properties +++ b/gax-java/dependencies.properties @@ -67,8 +67,8 @@ maven.com_google_api_api_common=com.google.api:api-common:2.6.2 maven.org_threeten_threetenbp=org.threeten:threetenbp:1.6.5 maven.com_google_api_grpc_grpc_google_iam_v1=com.google.api.grpc:grpc-google-iam-v1:1.9.2 maven.com_google_api_grpc_proto_google_iam_v1=com.google.api.grpc:proto-google-iam-v1:1.9.2 -maven.com_google_http_client_google_http_client=com.google.http-client:google-http-client:1.43.0 -maven.com_google_http_client_google_http_client_gson=com.google.http-client:google-http-client-gson:1.43.0 +maven.com_google_http_client_google_http_client=com.google.http-client:google-http-client:1.43.1 +maven.com_google_http_client_google_http_client_gson=com.google.http-client:google-http-client-gson:1.43.1 maven.org_codehaus_mojo_animal_sniffer_annotations=org.codehaus.mojo:animal-sniffer-annotations:1.22 maven.javax_annotation_javax_annotation_api=javax.annotation:javax.annotation-api:1.3.2 maven.org_graalvm_sdk=org.graalvm.sdk:graal-sdk:22.3.1 diff --git a/gax-java/pom.xml b/gax-java/pom.xml index ff62aec5fa..e5a3c6614a 100644 --- a/gax-java/pom.xml +++ b/gax-java/pom.xml @@ -148,7 +148,7 @@ com.google.http-client google-http-client-bom - 1.43.0 + 1.43.1 pom import From ba9fb82afce095191482c6be973395d0de8e5136 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Tue, 14 Mar 2023 14:39:45 +0000 Subject: [PATCH 04/17] build(deps): update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.0.0 (#1488) Co-authored-by: Lawrence Qiu --- gapic-generator-java/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapic-generator-java/pom.xml b/gapic-generator-java/pom.xml index ba1e12c3e3..6fd25bf337 100644 --- a/gapic-generator-java/pom.xml +++ b/gapic-generator-java/pom.xml @@ -301,7 +301,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M9 + 3.0.0 From 1206c4c56dbf5dfe9a8be185e88063987983d481 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 14 Mar 2023 11:26:02 -0400 Subject: [PATCH 05/17] chore(main): release 2.15.3 (#1445) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Lawrence Qiu --- CHANGELOG.md | 28 +++++++++++++++++++ WORKSPACE | 2 +- api-common-java/pom.xml | 4 +-- gapic-generator-java-bom/pom.xml | 24 ++++++++-------- gapic-generator-java-pom-parent/pom.xml | 2 +- gapic-generator-java/pom.xml | 6 ++-- gax-java/dependencies.properties | 8 +++--- gax-java/gax-bom/pom.xml | 20 ++++++------- gax-java/gax-grpc/pom.xml | 4 +-- gax-java/gax-httpjson/pom.xml | 4 +-- gax-java/gax/pom.xml | 4 +-- gax-java/pom.xml | 14 +++++----- .../grpc-google-common-protos/pom.xml | 4 +-- java-common-protos/pom.xml | 8 +++--- .../proto-google-common-protos/pom.xml | 4 +-- java-iam/grpc-google-iam-v1/pom.xml | 4 +-- java-iam/grpc-google-iam-v2/pom.xml | 4 +-- java-iam/grpc-google-iam-v2beta/pom.xml | 4 +-- java-iam/pom.xml | 22 +++++++-------- java-iam/proto-google-iam-v1/pom.xml | 4 +-- java-iam/proto-google-iam-v2/pom.xml | 4 +-- java-iam/proto-google-iam-v2beta/pom.xml | 4 +-- showcase/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 24 files changed, 120 insertions(+), 92 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9e69fa94d..c7835dc7dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## [2.15.3](https://github.com/googleapis/gapic-generator-java/compare/v2.15.2...v2.15.3) (2023-03-14) + + +### Bug Fixes + +* Allow custom HttpRules for REST LROs ([#1288](https://github.com/googleapis/gapic-generator-java/issues/1288)) ([f8ccd2a](https://github.com/googleapis/gapic-generator-java/commit/f8ccd2a1428f96f0ff3231247964c272144b8dc9)) + + +### Dependencies + +* Update actions/checkout action to v3 ([#1365](https://github.com/googleapis/gapic-generator-java/issues/1365)) ([84036c7](https://github.com/googleapis/gapic-generator-java/commit/84036c706620a6c7aef05aeaa5969e7dd0b4674b)) +* Update dependency com.google.api.grpc:grpc-google-common-protos to v2.14.2 ([#1451](https://github.com/googleapis/gapic-generator-java/issues/1451)) ([9566040](https://github.com/googleapis/gapic-generator-java/commit/95660400209c114a460a7d4170da4f093e6e3526)) +* Update dependency com.google.api.grpc:grpc-google-iam-v1 to v1.9.2 ([#1452](https://github.com/googleapis/gapic-generator-java/issues/1452)) ([b30359b](https://github.com/googleapis/gapic-generator-java/commit/b30359bd2a35c3f267b58748012d080bf3f1edf8)) +* Update dependency com.google.code.gson:gson to v2.10.1 ([#1443](https://github.com/googleapis/gapic-generator-java/issues/1443)) ([0ccf457](https://github.com/googleapis/gapic-generator-java/commit/0ccf457a774bd3dbe3b101d82222bdc39f6e5b0e)) +* Update dependency com.google.errorprone:error_prone_annotations to v2.18.0 ([#1459](https://github.com/googleapis/gapic-generator-java/issues/1459)) ([2671dcf](https://github.com/googleapis/gapic-generator-java/commit/2671dcf9131591acaa96d474412ce414fef54a6f)) +* Update dependency io.grpc:grpc-core to v1.53.0 ([#1463](https://github.com/googleapis/gapic-generator-java/issues/1463)) ([6762df6](https://github.com/googleapis/gapic-generator-java/commit/6762df6e121382545cc6da1375553f3de79acb2d)) +* Update dependency io.perfmark:perfmark-api to v0.26.0 ([#1465](https://github.com/googleapis/gapic-generator-java/issues/1465)) ([174f3d8](https://github.com/googleapis/gapic-generator-java/commit/174f3d82408e569028ba5c025b1bc9823e8cdb93)) +* Update dependency net.bytebuddy:byte-buddy to v1.14.1 ([#1467](https://github.com/googleapis/gapic-generator-java/issues/1467)) ([c0d851a](https://github.com/googleapis/gapic-generator-java/commit/c0d851a2afde63b07a620771177c6eb2cf29dc25)) +* Update dependency net.bytebuddy:byte-buddy to v1.14.2 ([#1481](https://github.com/googleapis/gapic-generator-java/issues/1481)) ([cbceed2](https://github.com/googleapis/gapic-generator-java/commit/cbceed21237a5dba62cc318ad0c1903a8d7768f3)) +* Update dependency org.apache.commons:commons-lang3 to v3.12.0 ([#1468](https://github.com/googleapis/gapic-generator-java/issues/1468)) ([2506b91](https://github.com/googleapis/gapic-generator-java/commit/2506b91196f8cbf7f7297af15e01529e7ee51270)) +* Update dependency org.graalvm.sdk:graal-sdk to v22.3.1 ([#1444](https://github.com/googleapis/gapic-generator-java/issues/1444)) ([edb5d12](https://github.com/googleapis/gapic-generator-java/commit/edb5d12689400d0a127b240fc68f12c00e7db0a8)) +* Update dependency org.threeten:threetenbp to v1.6.5 ([#1446](https://github.com/googleapis/gapic-generator-java/issues/1446)) ([842b9e3](https://github.com/googleapis/gapic-generator-java/commit/842b9e398caa6ea273d790c0bc577e7ec22cad39)) +* Update google api dependencies ([#1470](https://github.com/googleapis/gapic-generator-java/issues/1470)) ([e1667f1](https://github.com/googleapis/gapic-generator-java/commit/e1667f1a0eee9a3b9977eae6ee2ae27e06185ad9)) +* Update google auth library dependencies to v1.16.0 ([#1471](https://github.com/googleapis/gapic-generator-java/issues/1471)) ([de67f4e](https://github.com/googleapis/gapic-generator-java/commit/de67f4e2c772ecb1b4a8f7a3d58c5bce564cf788)) +* Update google http client dependencies to v1.43.0 ([#1472](https://github.com/googleapis/gapic-generator-java/issues/1472)) ([524eddb](https://github.com/googleapis/gapic-generator-java/commit/524eddb17488701d0217ee270cdba804b2f8d09b)) +* Update google http client dependencies to v1.43.1 ([#1487](https://github.com/googleapis/gapic-generator-java/issues/1487)) ([da52fdd](https://github.com/googleapis/gapic-generator-java/commit/da52fdd34c6c1c9d329ff6d1834eee2311ed80c6)) +* Update netty dependencies ([#1448](https://github.com/googleapis/gapic-generator-java/issues/1448)) ([97079ef](https://github.com/googleapis/gapic-generator-java/commit/97079ef6b0115d7ed14ffd6060d63b03c0cbd4fd)) + ## [2.15.2](https://github.com/googleapis/gapic-generator-java/compare/v2.15.1...v2.15.2) (2023-02-28) diff --git a/WORKSPACE b/WORKSPACE index 4f1952231f..38a762520f 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -60,7 +60,7 @@ maven_install( repositories = ["https://repo.maven.apache.org/maven2/"], ) -_gapic_generator_java_version = "2.15.3-SNAPSHOT" # {x-version-update:gapic-generator-java:current} +_gapic_generator_java_version = "2.15.3" # {x-version-update:gapic-generator-java:current} maven_install( artifacts = [ diff --git a/api-common-java/pom.xml b/api-common-java/pom.xml index 832158af7a..11465d1b50 100644 --- a/api-common-java/pom.xml +++ b/api-common-java/pom.xml @@ -5,14 +5,14 @@ com.google.api api-common jar - 2.6.3-SNAPSHOT + 2.6.3 API Common Common utilities for Google APIs in Java com.google.api gapic-generator-java-pom-parent - 2.15.3-SNAPSHOT + 2.15.3 ../gapic-generator-java-pom-parent diff --git a/gapic-generator-java-bom/pom.xml b/gapic-generator-java-bom/pom.xml index ebbd9b21de..92143fbac6 100644 --- a/gapic-generator-java-bom/pom.xml +++ b/gapic-generator-java-bom/pom.xml @@ -4,7 +4,7 @@ com.google.api gapic-generator-java-bom pom - 2.15.3-SNAPSHOT + 2.15.3 GAPIC Generator Java BOM BOM for the libraries in gapic-generator-java repository. Users should not @@ -15,7 +15,7 @@ com.google.api gapic-generator-java-pom-parent - 2.15.3-SNAPSHOT + 2.15.3 ../gapic-generator-java-pom-parent @@ -60,56 +60,56 @@ com.google.api api-common - 2.6.3-SNAPSHOT + 2.6.3 com.google.api gax-bom - 2.23.3-SNAPSHOT + 2.23.3 pom import com.google.api.grpc grpc-google-common-protos - 2.14.3-SNAPSHOT + 2.14.3 com.google.api.grpc proto-google-common-protos - 2.14.3-SNAPSHOT + 2.14.3 com.google.api.grpc proto-google-iam-v1 - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc proto-google-iam-v2 - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc proto-google-iam-v2beta - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc grpc-google-iam-v1 - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc grpc-google-iam-v2 - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc grpc-google-iam-v2beta - 1.9.3-SNAPSHOT + 1.9.3 diff --git a/gapic-generator-java-pom-parent/pom.xml b/gapic-generator-java-pom-parent/pom.xml index 5383b59278..6ca5cea869 100644 --- a/gapic-generator-java-pom-parent/pom.xml +++ b/gapic-generator-java-pom-parent/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.google.api gapic-generator-java-pom-parent - 2.15.3-SNAPSHOT + 2.15.3 pom GAPIC Generator Java POM Parent https://github.com/googleapis/gapic-generator-java diff --git a/gapic-generator-java/pom.xml b/gapic-generator-java/pom.xml index 6fd25bf337..ff3044fba9 100644 --- a/gapic-generator-java/pom.xml +++ b/gapic-generator-java/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.api gapic-generator-java - 2.15.3-SNAPSHOT + 2.15.3 GAPIC Generator Java GAPIC generator Java @@ -23,7 +23,7 @@ com.google.api gapic-generator-java-pom-parent - 2.15.3-SNAPSHOT + 2.15.3 ../gapic-generator-java-pom-parent @@ -32,7 +32,7 @@ com.google.api gapic-generator-java-bom - 2.15.3-SNAPSHOT + 2.15.3 pom import diff --git a/gax-java/dependencies.properties b/gax-java/dependencies.properties index c0559aa84e..4998f181c6 100644 --- a/gax-java/dependencies.properties +++ b/gax-java/dependencies.properties @@ -8,16 +8,16 @@ # Versions of oneself # {x-version-update-start:gax:current} -version.gax=2.23.3-SNAPSHOT +version.gax=2.23.3 # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_grpc=2.23.3-SNAPSHOT +version.gax_grpc=2.23.3 # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_bom=2.23.3-SNAPSHOT +version.gax_bom=2.23.3 # {x-version-update-end} # {x-version-update-start:gax-httpjson:current} -version.gax_httpjson=0.108.3-SNAPSHOT +version.gax_httpjson=0.108.3 # {x-version-update-end} # Versions for dependencies which actual artifacts differ between Bazel and Gradle. diff --git a/gax-java/gax-bom/pom.xml b/gax-java/gax-bom/pom.xml index db1ad1c8ad..9ec28467ac 100644 --- a/gax-java/gax-bom/pom.xml +++ b/gax-java/gax-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.api gax-bom - 2.23.3-SNAPSHOT + 2.23.3 pom GAX (Google Api eXtensions) for Java (BOM) Google Api eXtensions for Java (BOM) @@ -43,55 +43,55 @@ com.google.api gax - 2.23.3-SNAPSHOT + 2.23.3 com.google.api gax - 2.23.3-SNAPSHOT + 2.23.3 test-jar testlib com.google.api gax - 2.23.3-SNAPSHOT + 2.23.3 testlib com.google.api gax-grpc - 2.23.3-SNAPSHOT + 2.23.3 com.google.api gax-grpc - 2.23.3-SNAPSHOT + 2.23.3 test-jar testlib com.google.api gax-grpc - 2.23.3-SNAPSHOT + 2.23.3 testlib com.google.api gax-httpjson - 0.108.3-SNAPSHOT + 0.108.3 com.google.api gax-httpjson - 0.108.3-SNAPSHOT + 0.108.3 test-jar testlib com.google.api gax-httpjson - 0.108.3-SNAPSHOT + 0.108.3 testlib diff --git a/gax-java/gax-grpc/pom.xml b/gax-java/gax-grpc/pom.xml index e2322000ff..241b9e451d 100644 --- a/gax-java/gax-grpc/pom.xml +++ b/gax-java/gax-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax-grpc - 2.23.3-SNAPSHOT + 2.23.3 jar GAX (Google Api eXtensions) for Java (gRPC) Google Api eXtensions for Java (gRPC) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.23.3-SNAPSHOT + 2.23.3 diff --git a/gax-java/gax-httpjson/pom.xml b/gax-java/gax-httpjson/pom.xml index 59c4219eed..91523f6c95 100644 --- a/gax-java/gax-httpjson/pom.xml +++ b/gax-java/gax-httpjson/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax-httpjson - 0.108.3-SNAPSHOT + 0.108.3 jar GAX (Google Api eXtensions) for Java (HTTP JSON) Google Api eXtensions for Java (HTTP JSON) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.23.3-SNAPSHOT + 2.23.3 diff --git a/gax-java/gax/pom.xml b/gax-java/gax/pom.xml index e67c2cbf3c..9ba39f1576 100644 --- a/gax-java/gax/pom.xml +++ b/gax-java/gax/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax - 2.23.3-SNAPSHOT + 2.23.3 jar GAX (Google Api eXtensions) for Java (Core) Google Api eXtensions for Java (Core) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.23.3-SNAPSHOT + 2.23.3 diff --git a/gax-java/pom.xml b/gax-java/pom.xml index e5a3c6614a..47f9d13b50 100644 --- a/gax-java/pom.xml +++ b/gax-java/pom.xml @@ -4,14 +4,14 @@ com.google.api gax-parent pom - 2.23.3-SNAPSHOT + 2.23.3 GAX (Google Api eXtensions) for Java (Parent) Google Api eXtensions for Java (Parent) com.google.api gapic-generator-java-pom-parent - 2.15.3-SNAPSHOT + 2.15.3 ../gapic-generator-java-pom-parent @@ -51,7 +51,7 @@ com.google.api api-common - 2.6.3-SNAPSHOT + 2.6.3 com.google.auth @@ -109,24 +109,24 @@ com.google.api gax - 2.23.3-SNAPSHOT + 2.23.3 com.google.api gax - 2.23.3-SNAPSHOT + 2.23.3 test-jar testlib com.google.api.grpc proto-google-common-protos - 2.14.3-SNAPSHOT + 2.14.3 com.google.api.grpc grpc-google-common-protos - 2.14.3-SNAPSHOT + 2.14.3 io.grpc diff --git a/java-common-protos/grpc-google-common-protos/pom.xml b/java-common-protos/grpc-google-common-protos/pom.xml index a28f1c6814..743abe3a14 100644 --- a/java-common-protos/grpc-google-common-protos/pom.xml +++ b/java-common-protos/grpc-google-common-protos/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-common-protos - 2.14.3-SNAPSHOT + 2.14.3 grpc-google-common-protos GRPC library for grpc-google-common-protos com.google.api.grpc google-common-protos-parent - 2.14.3-SNAPSHOT + 2.14.3 diff --git a/java-common-protos/pom.xml b/java-common-protos/pom.xml index d89f017f01..de35e68794 100644 --- a/java-common-protos/pom.xml +++ b/java-common-protos/pom.xml @@ -4,7 +4,7 @@ com.google.api.grpc google-common-protos-parent pom - 2.14.3-SNAPSHOT + 2.14.3 Google Common Protos Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.15.3-SNAPSHOT + 2.15.3 ../gapic-generator-java-pom-parent @@ -69,7 +69,7 @@ com.google.api.grpc grpc-google-common-protos - 2.14.3-SNAPSHOT + 2.14.3 io.grpc @@ -81,7 +81,7 @@ com.google.api.grpc proto-google-common-protos - 2.14.3-SNAPSHOT + 2.14.3 com.google.guava diff --git a/java-common-protos/proto-google-common-protos/pom.xml b/java-common-protos/proto-google-common-protos/pom.xml index c41c304a46..bf09b12d27 100644 --- a/java-common-protos/proto-google-common-protos/pom.xml +++ b/java-common-protos/proto-google-common-protos/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-common-protos - 2.14.3-SNAPSHOT + 2.14.3 proto-google-common-protos PROTO library for proto-google-common-protos com.google.api.grpc google-common-protos-parent - 2.14.3-SNAPSHOT + 2.14.3 diff --git a/java-iam/grpc-google-iam-v1/pom.xml b/java-iam/grpc-google-iam-v1/pom.xml index 4e26725e1a..42b4c6d227 100644 --- a/java-iam/grpc-google-iam-v1/pom.xml +++ b/java-iam/grpc-google-iam-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v1 - 1.9.3-SNAPSHOT + 1.9.3 grpc-google-iam-v1 GRPC library for grpc-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3-SNAPSHOT + 1.9.3 diff --git a/java-iam/grpc-google-iam-v2/pom.xml b/java-iam/grpc-google-iam-v2/pom.xml index 63f1646efb..088b184aa4 100644 --- a/java-iam/grpc-google-iam-v2/pom.xml +++ b/java-iam/grpc-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2 - 1.9.3-SNAPSHOT + 1.9.3 grpc-google-iam-v2 GRPC library for proto-google-iam-v2 com.google.cloud google-iam-parent - 1.9.3-SNAPSHOT + 1.9.3 diff --git a/java-iam/grpc-google-iam-v2beta/pom.xml b/java-iam/grpc-google-iam-v2beta/pom.xml index 161de6537c..b0d9d8dec0 100644 --- a/java-iam/grpc-google-iam-v2beta/pom.xml +++ b/java-iam/grpc-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2beta - 1.9.3-SNAPSHOT + 1.9.3 grpc-google-iam-v2beta GRPC library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3-SNAPSHOT + 1.9.3 diff --git a/java-iam/pom.xml b/java-iam/pom.xml index b37c163b93..57a147d7eb 100644 --- a/java-iam/pom.xml +++ b/java-iam/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-iam-parent pom - 1.9.3-SNAPSHOT + 1.9.3 Google IAM Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.15.3-SNAPSHOT + 2.15.3 ../gapic-generator-java-pom-parent @@ -81,49 +81,49 @@ com.google.api gax-bom - 2.23.3-SNAPSHOT + 2.23.3 pom import com.google.api.grpc proto-google-iam-v2 - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc grpc-google-iam-v2 - 1.9.3-SNAPSHOT + 1.9.3 com.google.cloud google-iam-policy - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc proto-google-common-protos - 2.14.3-SNAPSHOT + 2.14.3 com.google.api.grpc proto-google-iam-v2beta - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc grpc-google-iam-v1 - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc grpc-google-iam-v2beta - 1.9.3-SNAPSHOT + 1.9.3 com.google.api.grpc proto-google-iam-v1 - 1.9.3-SNAPSHOT + 1.9.3 javax.annotation diff --git a/java-iam/proto-google-iam-v1/pom.xml b/java-iam/proto-google-iam-v1/pom.xml index 468ea7228e..f6d3bcef5c 100644 --- a/java-iam/proto-google-iam-v1/pom.xml +++ b/java-iam/proto-google-iam-v1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v1 - 1.9.3-SNAPSHOT + 1.9.3 proto-google-iam-v1 PROTO library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3-SNAPSHOT + 1.9.3 diff --git a/java-iam/proto-google-iam-v2/pom.xml b/java-iam/proto-google-iam-v2/pom.xml index 2f1c64e973..5641d2d917 100644 --- a/java-iam/proto-google-iam-v2/pom.xml +++ b/java-iam/proto-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2 - 1.9.3-SNAPSHOT + 1.9.3 proto-google-iam-v2 Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3-SNAPSHOT + 1.9.3 diff --git a/java-iam/proto-google-iam-v2beta/pom.xml b/java-iam/proto-google-iam-v2beta/pom.xml index dbd6a410a6..254143173c 100644 --- a/java-iam/proto-google-iam-v2beta/pom.xml +++ b/java-iam/proto-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2beta - 1.9.3-SNAPSHOT + 1.9.3 proto-google-iam-v2beta Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3-SNAPSHOT + 1.9.3 diff --git a/showcase/pom.xml b/showcase/pom.xml index 424ac6b4c0..a1b28562be 100644 --- a/showcase/pom.xml +++ b/showcase/pom.xml @@ -15,7 +15,7 @@ com.google.api gapic-generator-java-bom - 2.15.3-SNAPSHOT + 2.15.3 ../gapic-generator-java-bom diff --git a/versions.txt b/versions.txt index 4f664d8247..86d3f9455e 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -gapic-generator-java:2.15.2:2.15.3-SNAPSHOT -api-common:2.6.2:2.6.3-SNAPSHOT -gax:2.23.2:2.23.3-SNAPSHOT -gax-grpc:2.23.2:2.23.3-SNAPSHOT -gax-httpjson:0.108.2:0.108.3-SNAPSHOT -proto-google-common-protos:2.14.2:2.14.3-SNAPSHOT -grpc-google-common-protos:2.14.2:2.14.3-SNAPSHOT -proto-google-iam-v1:1.9.2:1.9.3-SNAPSHOT -grpc-google-iam-v1:1.9.2:1.9.3-SNAPSHOT -proto-google-iam-v2beta:1.9.2:1.9.3-SNAPSHOT -grpc-google-iam-v2beta:1.9.2:1.9.3-SNAPSHOT -google-iam-policy:1.9.2:1.9.3-SNAPSHOT -proto-google-iam-v2:1.9.2:1.9.3-SNAPSHOT -grpc-google-iam-v2:1.9.2:1.9.3-SNAPSHOT +gapic-generator-java:2.15.3:2.15.3 +api-common:2.6.3:2.6.3 +gax:2.23.3:2.23.3 +gax-grpc:2.23.3:2.23.3 +gax-httpjson:0.108.3:0.108.3 +proto-google-common-protos:2.14.3:2.14.3 +grpc-google-common-protos:2.14.3:2.14.3 +proto-google-iam-v1:1.9.3:1.9.3 +grpc-google-iam-v1:1.9.3:1.9.3 +proto-google-iam-v2beta:1.9.3:1.9.3 +grpc-google-iam-v2beta:1.9.3:1.9.3 +google-iam-policy:1.9.3:1.9.3 +proto-google-iam-v2:1.9.3:1.9.3 +grpc-google-iam-v2:1.9.3:1.9.3 From 5de06df537c965076ecb6659e61cd5e4929b3eb2 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 14 Mar 2023 13:02:46 -0400 Subject: [PATCH 06/17] chore(main): release 2.15.4-SNAPSHOT (#1489) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- WORKSPACE | 2 +- api-common-java/pom.xml | 4 +-- gapic-generator-java-bom/pom.xml | 24 ++++++++-------- gapic-generator-java-pom-parent/pom.xml | 2 +- gapic-generator-java/pom.xml | 6 ++-- gax-java/dependencies.properties | 8 +++--- gax-java/gax-bom/pom.xml | 20 ++++++------- gax-java/gax-grpc/pom.xml | 4 +-- gax-java/gax-httpjson/pom.xml | 4 +-- gax-java/gax/pom.xml | 4 +-- gax-java/pom.xml | 14 +++++----- .../grpc-google-common-protos/pom.xml | 4 +-- java-common-protos/pom.xml | 8 +++--- .../proto-google-common-protos/pom.xml | 4 +-- java-iam/grpc-google-iam-v1/pom.xml | 4 +-- java-iam/grpc-google-iam-v2/pom.xml | 4 +-- java-iam/grpc-google-iam-v2beta/pom.xml | 4 +-- java-iam/pom.xml | 22 +++++++-------- java-iam/proto-google-iam-v1/pom.xml | 4 +-- java-iam/proto-google-iam-v2/pom.xml | 4 +-- java-iam/proto-google-iam-v2beta/pom.xml | 4 +-- showcase/pom.xml | 2 +- versions.txt | 28 +++++++++---------- 23 files changed, 92 insertions(+), 92 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 38a762520f..faf2e7eac2 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -60,7 +60,7 @@ maven_install( repositories = ["https://repo.maven.apache.org/maven2/"], ) -_gapic_generator_java_version = "2.15.3" # {x-version-update:gapic-generator-java:current} +_gapic_generator_java_version = "2.15.4-SNAPSHOT" # {x-version-update:gapic-generator-java:current} maven_install( artifacts = [ diff --git a/api-common-java/pom.xml b/api-common-java/pom.xml index 11465d1b50..97be116b9b 100644 --- a/api-common-java/pom.xml +++ b/api-common-java/pom.xml @@ -5,14 +5,14 @@ com.google.api api-common jar - 2.6.3 + 2.6.4-SNAPSHOT API Common Common utilities for Google APIs in Java com.google.api gapic-generator-java-pom-parent - 2.15.3 + 2.15.4-SNAPSHOT ../gapic-generator-java-pom-parent diff --git a/gapic-generator-java-bom/pom.xml b/gapic-generator-java-bom/pom.xml index 92143fbac6..e4f00addf8 100644 --- a/gapic-generator-java-bom/pom.xml +++ b/gapic-generator-java-bom/pom.xml @@ -4,7 +4,7 @@ com.google.api gapic-generator-java-bom pom - 2.15.3 + 2.15.4-SNAPSHOT GAPIC Generator Java BOM BOM for the libraries in gapic-generator-java repository. Users should not @@ -15,7 +15,7 @@ com.google.api gapic-generator-java-pom-parent - 2.15.3 + 2.15.4-SNAPSHOT ../gapic-generator-java-pom-parent @@ -60,56 +60,56 @@ com.google.api api-common - 2.6.3 + 2.6.4-SNAPSHOT com.google.api gax-bom - 2.23.3 + 2.23.4-SNAPSHOT pom import com.google.api.grpc grpc-google-common-protos - 2.14.3 + 2.14.4-SNAPSHOT com.google.api.grpc proto-google-common-protos - 2.14.3 + 2.14.4-SNAPSHOT com.google.api.grpc proto-google-iam-v1 - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc proto-google-iam-v2 - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc proto-google-iam-v2beta - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc grpc-google-iam-v1 - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc grpc-google-iam-v2 - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc grpc-google-iam-v2beta - 1.9.3 + 1.9.4-SNAPSHOT diff --git a/gapic-generator-java-pom-parent/pom.xml b/gapic-generator-java-pom-parent/pom.xml index 6ca5cea869..91addcbc56 100644 --- a/gapic-generator-java-pom-parent/pom.xml +++ b/gapic-generator-java-pom-parent/pom.xml @@ -5,7 +5,7 @@ 4.0.0 com.google.api gapic-generator-java-pom-parent - 2.15.3 + 2.15.4-SNAPSHOT pom GAPIC Generator Java POM Parent https://github.com/googleapis/gapic-generator-java diff --git a/gapic-generator-java/pom.xml b/gapic-generator-java/pom.xml index ff3044fba9..1369a3a310 100644 --- a/gapic-generator-java/pom.xml +++ b/gapic-generator-java/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.google.api gapic-generator-java - 2.15.3 + 2.15.4-SNAPSHOT GAPIC Generator Java GAPIC generator Java @@ -23,7 +23,7 @@ com.google.api gapic-generator-java-pom-parent - 2.15.3 + 2.15.4-SNAPSHOT ../gapic-generator-java-pom-parent @@ -32,7 +32,7 @@ com.google.api gapic-generator-java-bom - 2.15.3 + 2.15.4-SNAPSHOT pom import diff --git a/gax-java/dependencies.properties b/gax-java/dependencies.properties index 4998f181c6..1b8608303a 100644 --- a/gax-java/dependencies.properties +++ b/gax-java/dependencies.properties @@ -8,16 +8,16 @@ # Versions of oneself # {x-version-update-start:gax:current} -version.gax=2.23.3 +version.gax=2.23.4-SNAPSHOT # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_grpc=2.23.3 +version.gax_grpc=2.23.4-SNAPSHOT # {x-version-update-end} # {x-version-update-start:gax:current} -version.gax_bom=2.23.3 +version.gax_bom=2.23.4-SNAPSHOT # {x-version-update-end} # {x-version-update-start:gax-httpjson:current} -version.gax_httpjson=0.108.3 +version.gax_httpjson=0.108.4-SNAPSHOT # {x-version-update-end} # Versions for dependencies which actual artifacts differ between Bazel and Gradle. diff --git a/gax-java/gax-bom/pom.xml b/gax-java/gax-bom/pom.xml index 9ec28467ac..4fcc11d662 100644 --- a/gax-java/gax-bom/pom.xml +++ b/gax-java/gax-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.api gax-bom - 2.23.3 + 2.23.4-SNAPSHOT pom GAX (Google Api eXtensions) for Java (BOM) Google Api eXtensions for Java (BOM) @@ -43,55 +43,55 @@ com.google.api gax - 2.23.3 + 2.23.4-SNAPSHOT com.google.api gax - 2.23.3 + 2.23.4-SNAPSHOT test-jar testlib com.google.api gax - 2.23.3 + 2.23.4-SNAPSHOT testlib com.google.api gax-grpc - 2.23.3 + 2.23.4-SNAPSHOT com.google.api gax-grpc - 2.23.3 + 2.23.4-SNAPSHOT test-jar testlib com.google.api gax-grpc - 2.23.3 + 2.23.4-SNAPSHOT testlib com.google.api gax-httpjson - 0.108.3 + 0.108.4-SNAPSHOT com.google.api gax-httpjson - 0.108.3 + 0.108.4-SNAPSHOT test-jar testlib com.google.api gax-httpjson - 0.108.3 + 0.108.4-SNAPSHOT testlib diff --git a/gax-java/gax-grpc/pom.xml b/gax-java/gax-grpc/pom.xml index 241b9e451d..5a53f9e810 100644 --- a/gax-java/gax-grpc/pom.xml +++ b/gax-java/gax-grpc/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax-grpc - 2.23.3 + 2.23.4-SNAPSHOT jar GAX (Google Api eXtensions) for Java (gRPC) Google Api eXtensions for Java (gRPC) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.23.3 + 2.23.4-SNAPSHOT diff --git a/gax-java/gax-httpjson/pom.xml b/gax-java/gax-httpjson/pom.xml index 91523f6c95..32a9a56b83 100644 --- a/gax-java/gax-httpjson/pom.xml +++ b/gax-java/gax-httpjson/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax-httpjson - 0.108.3 + 0.108.4-SNAPSHOT jar GAX (Google Api eXtensions) for Java (HTTP JSON) Google Api eXtensions for Java (HTTP JSON) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.23.3 + 2.23.4-SNAPSHOT diff --git a/gax-java/gax/pom.xml b/gax-java/gax/pom.xml index 9ba39f1576..d3d2056fc1 100644 --- a/gax-java/gax/pom.xml +++ b/gax-java/gax/pom.xml @@ -3,7 +3,7 @@ 4.0.0 gax - 2.23.3 + 2.23.4-SNAPSHOT jar GAX (Google Api eXtensions) for Java (Core) Google Api eXtensions for Java (Core) @@ -11,7 +11,7 @@ com.google.api gax-parent - 2.23.3 + 2.23.4-SNAPSHOT diff --git a/gax-java/pom.xml b/gax-java/pom.xml index 47f9d13b50..627865fb4c 100644 --- a/gax-java/pom.xml +++ b/gax-java/pom.xml @@ -4,14 +4,14 @@ com.google.api gax-parent pom - 2.23.3 + 2.23.4-SNAPSHOT GAX (Google Api eXtensions) for Java (Parent) Google Api eXtensions for Java (Parent) com.google.api gapic-generator-java-pom-parent - 2.15.3 + 2.15.4-SNAPSHOT ../gapic-generator-java-pom-parent @@ -51,7 +51,7 @@ com.google.api api-common - 2.6.3 + 2.6.4-SNAPSHOT com.google.auth @@ -109,24 +109,24 @@ com.google.api gax - 2.23.3 + 2.23.4-SNAPSHOT com.google.api gax - 2.23.3 + 2.23.4-SNAPSHOT test-jar testlib com.google.api.grpc proto-google-common-protos - 2.14.3 + 2.14.4-SNAPSHOT com.google.api.grpc grpc-google-common-protos - 2.14.3 + 2.14.4-SNAPSHOT io.grpc diff --git a/java-common-protos/grpc-google-common-protos/pom.xml b/java-common-protos/grpc-google-common-protos/pom.xml index 743abe3a14..ae53930119 100644 --- a/java-common-protos/grpc-google-common-protos/pom.xml +++ b/java-common-protos/grpc-google-common-protos/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-common-protos - 2.14.3 + 2.14.4-SNAPSHOT grpc-google-common-protos GRPC library for grpc-google-common-protos com.google.api.grpc google-common-protos-parent - 2.14.3 + 2.14.4-SNAPSHOT diff --git a/java-common-protos/pom.xml b/java-common-protos/pom.xml index de35e68794..4b4a8661db 100644 --- a/java-common-protos/pom.xml +++ b/java-common-protos/pom.xml @@ -4,7 +4,7 @@ com.google.api.grpc google-common-protos-parent pom - 2.14.3 + 2.14.4-SNAPSHOT Google Common Protos Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.15.3 + 2.15.4-SNAPSHOT ../gapic-generator-java-pom-parent @@ -69,7 +69,7 @@ com.google.api.grpc grpc-google-common-protos - 2.14.3 + 2.14.4-SNAPSHOT io.grpc @@ -81,7 +81,7 @@ com.google.api.grpc proto-google-common-protos - 2.14.3 + 2.14.4-SNAPSHOT com.google.guava diff --git a/java-common-protos/proto-google-common-protos/pom.xml b/java-common-protos/proto-google-common-protos/pom.xml index bf09b12d27..7c2fe4eaa4 100644 --- a/java-common-protos/proto-google-common-protos/pom.xml +++ b/java-common-protos/proto-google-common-protos/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-common-protos - 2.14.3 + 2.14.4-SNAPSHOT proto-google-common-protos PROTO library for proto-google-common-protos com.google.api.grpc google-common-protos-parent - 2.14.3 + 2.14.4-SNAPSHOT diff --git a/java-iam/grpc-google-iam-v1/pom.xml b/java-iam/grpc-google-iam-v1/pom.xml index 42b4c6d227..8bdc09ef1d 100644 --- a/java-iam/grpc-google-iam-v1/pom.xml +++ b/java-iam/grpc-google-iam-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v1 - 1.9.3 + 1.9.4-SNAPSHOT grpc-google-iam-v1 GRPC library for grpc-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3 + 1.9.4-SNAPSHOT diff --git a/java-iam/grpc-google-iam-v2/pom.xml b/java-iam/grpc-google-iam-v2/pom.xml index 088b184aa4..84d292d9da 100644 --- a/java-iam/grpc-google-iam-v2/pom.xml +++ b/java-iam/grpc-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2 - 1.9.3 + 1.9.4-SNAPSHOT grpc-google-iam-v2 GRPC library for proto-google-iam-v2 com.google.cloud google-iam-parent - 1.9.3 + 1.9.4-SNAPSHOT diff --git a/java-iam/grpc-google-iam-v2beta/pom.xml b/java-iam/grpc-google-iam-v2beta/pom.xml index b0d9d8dec0..2792bf9c0e 100644 --- a/java-iam/grpc-google-iam-v2beta/pom.xml +++ b/java-iam/grpc-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2beta - 1.9.3 + 1.9.4-SNAPSHOT grpc-google-iam-v2beta GRPC library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3 + 1.9.4-SNAPSHOT diff --git a/java-iam/pom.xml b/java-iam/pom.xml index 57a147d7eb..4d43b05cb9 100644 --- a/java-iam/pom.xml +++ b/java-iam/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-iam-parent pom - 1.9.3 + 1.9.4-SNAPSHOT Google IAM Parent Java idiomatic client for Google Cloud Platform services. @@ -13,7 +13,7 @@ com.google.api gapic-generator-java-pom-parent - 2.15.3 + 2.15.4-SNAPSHOT ../gapic-generator-java-pom-parent @@ -81,49 +81,49 @@ com.google.api gax-bom - 2.23.3 + 2.23.4-SNAPSHOT pom import com.google.api.grpc proto-google-iam-v2 - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc grpc-google-iam-v2 - 1.9.3 + 1.9.4-SNAPSHOT com.google.cloud google-iam-policy - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc proto-google-common-protos - 2.14.3 + 2.14.4-SNAPSHOT com.google.api.grpc proto-google-iam-v2beta - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc grpc-google-iam-v1 - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc grpc-google-iam-v2beta - 1.9.3 + 1.9.4-SNAPSHOT com.google.api.grpc proto-google-iam-v1 - 1.9.3 + 1.9.4-SNAPSHOT javax.annotation diff --git a/java-iam/proto-google-iam-v1/pom.xml b/java-iam/proto-google-iam-v1/pom.xml index f6d3bcef5c..5c590c2388 100644 --- a/java-iam/proto-google-iam-v1/pom.xml +++ b/java-iam/proto-google-iam-v1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v1 - 1.9.3 + 1.9.4-SNAPSHOT proto-google-iam-v1 PROTO library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3 + 1.9.4-SNAPSHOT diff --git a/java-iam/proto-google-iam-v2/pom.xml b/java-iam/proto-google-iam-v2/pom.xml index 5641d2d917..c041c60829 100644 --- a/java-iam/proto-google-iam-v2/pom.xml +++ b/java-iam/proto-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2 - 1.9.3 + 1.9.4-SNAPSHOT proto-google-iam-v2 Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3 + 1.9.4-SNAPSHOT diff --git a/java-iam/proto-google-iam-v2beta/pom.xml b/java-iam/proto-google-iam-v2beta/pom.xml index 254143173c..a885c86e34 100644 --- a/java-iam/proto-google-iam-v2beta/pom.xml +++ b/java-iam/proto-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2beta - 1.9.3 + 1.9.4-SNAPSHOT proto-google-iam-v2beta Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.9.3 + 1.9.4-SNAPSHOT diff --git a/showcase/pom.xml b/showcase/pom.xml index a1b28562be..fee88c154f 100644 --- a/showcase/pom.xml +++ b/showcase/pom.xml @@ -15,7 +15,7 @@ com.google.api gapic-generator-java-bom - 2.15.3 + 2.15.4-SNAPSHOT ../gapic-generator-java-bom diff --git a/versions.txt b/versions.txt index 86d3f9455e..4e0bf307c2 100644 --- a/versions.txt +++ b/versions.txt @@ -1,17 +1,17 @@ # Format: # module:released-version:current-version -gapic-generator-java:2.15.3:2.15.3 -api-common:2.6.3:2.6.3 -gax:2.23.3:2.23.3 -gax-grpc:2.23.3:2.23.3 -gax-httpjson:0.108.3:0.108.3 -proto-google-common-protos:2.14.3:2.14.3 -grpc-google-common-protos:2.14.3:2.14.3 -proto-google-iam-v1:1.9.3:1.9.3 -grpc-google-iam-v1:1.9.3:1.9.3 -proto-google-iam-v2beta:1.9.3:1.9.3 -grpc-google-iam-v2beta:1.9.3:1.9.3 -google-iam-policy:1.9.3:1.9.3 -proto-google-iam-v2:1.9.3:1.9.3 -grpc-google-iam-v2:1.9.3:1.9.3 +gapic-generator-java:2.15.3:2.15.4-SNAPSHOT +api-common:2.6.3:2.6.4-SNAPSHOT +gax:2.23.3:2.23.4-SNAPSHOT +gax-grpc:2.23.3:2.23.4-SNAPSHOT +gax-httpjson:0.108.3:0.108.4-SNAPSHOT +proto-google-common-protos:2.14.3:2.14.4-SNAPSHOT +grpc-google-common-protos:2.14.3:2.14.4-SNAPSHOT +proto-google-iam-v1:1.9.3:1.9.4-SNAPSHOT +grpc-google-iam-v1:1.9.3:1.9.4-SNAPSHOT +proto-google-iam-v2beta:1.9.3:1.9.4-SNAPSHOT +grpc-google-iam-v2beta:1.9.3:1.9.4-SNAPSHOT +google-iam-policy:1.9.3:1.9.4-SNAPSHOT +proto-google-iam-v2:1.9.3:1.9.4-SNAPSHOT +grpc-google-iam-v2:1.9.3:1.9.4-SNAPSHOT From 640e35f1e451ed953502426bb519215720507601 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 14 Mar 2023 17:58:41 -0400 Subject: [PATCH 07/17] chore: Refactor paged logic --- .../google/showcase/v1beta1/it/ITCallables.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java index 1b3951ec9e..85c36ba53f 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java @@ -28,6 +28,7 @@ import java.io.IOException; import java.security.GeneralSecurityException; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.concurrent.ExecutionException; @@ -118,7 +119,7 @@ public void testExpandHttpJson() { /* This tests that pagination returns the correct number of pages + responses and the content is correct */ @Test - public void testPagedExpandHttpJson() { + public void testPagedExpandWithTokenHttpJson() { int pageSize = 2; int pageToken = 1; String content = "A series of words that will be sent back one by one"; @@ -130,28 +131,27 @@ public void testPagedExpandHttpJson() { .setPageSize(pageSize) .setPageToken(String.valueOf(pageToken)) .build()); - int numPages = 0; + String[] words = content.split(" "); + String[] expected = Arrays.copyOfRange(words, pageToken, words.length); int numResponses = 0; - List values = new ArrayList<>(); + int numPages = 0; for (EchoClient.PagedExpandPage page : pagedExpandPagedResponse.iteratePages()) { for (EchoResponse echoResponse : page.getValues()) { - values.add(echoResponse.getContent()); + assertThat(echoResponse.getContent()).isEqualTo(expected[numResponses]); numResponses++; } numPages++; } - int contentLength = content.split(" ").length; + int contentLength = words.length; boolean isDivisible = ((contentLength - pageToken) % pageSize) == 0; // If the responses can't be evenly split into pages, then the extra responses will go to an // additional page int numExpectedPages = ((contentLength - pageToken) / pageSize) + (isDivisible ? 0 : 1); int numExpectedResponses = contentLength - pageToken; - String expectedResponse = "series of words that will be sent back one by one"; assertThat(numPages).isEqualTo(numExpectedPages); assertThat(numResponses).isEqualTo(numExpectedResponses); - assertThat(String.join(" ", values.toArray(new String[0]))).isEqualTo(expectedResponse); } @Test From 46b0b1b51465d5a529bac9f6ea0cffccb48370e6 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 14 Mar 2023 18:00:00 -0400 Subject: [PATCH 08/17] chore: Format ITCallables --- .../showcase/v1beta1/it/ITCallables.java | 83 +++++++++---------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java index 85c36ba53f..de91cb00f0 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java @@ -1,5 +1,7 @@ package com.google.showcase.v1beta1.it; +import static com.google.common.truth.Truth.assertThat; + import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; @@ -19,20 +21,17 @@ import com.google.showcase.v1beta1.WaitRequest; import com.google.showcase.v1beta1.WaitResponse; import io.grpc.ManagedChannelBuilder; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; -import org.threeten.bp.Instant; -import org.threeten.bp.temporal.ChronoUnit; - import java.io.IOException; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.concurrent.ExecutionException; - -import static com.google.common.truth.Truth.assertThat; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.Test; +import org.threeten.bp.Instant; +import org.threeten.bp.temporal.ChronoUnit; public class ITCallables { private static EchoClient grpcClient; @@ -41,24 +40,24 @@ public class ITCallables { @BeforeClass public static void createClient() throws IOException, GeneralSecurityException { EchoSettings grpcEchoSettings = - EchoSettings.newHttpJsonBuilder() - .setCredentialsProvider(NoCredentialsProvider.create()) - .setTransportChannelProvider( - InstantiatingGrpcChannelProvider.newBuilder() - .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) - .build()) - .build(); + EchoSettings.newHttpJsonBuilder() + .setCredentialsProvider(NoCredentialsProvider.create()) + .setTransportChannelProvider( + InstantiatingGrpcChannelProvider.newBuilder() + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .build()) + .build(); grpcClient = EchoClient.create(grpcEchoSettings); EchoSettings httpjsonEchoSettings = - EchoSettings.newHttpJsonBuilder() - .setCredentialsProvider(NoCredentialsProvider.create()) - .setTransportChannelProvider( - EchoSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport( - new NetHttpTransport.Builder().doNotValidateCertificate().build()) - .setEndpoint("http://localhost:7469") - .build()) - .build(); + EchoSettings.newHttpJsonBuilder() + .setCredentialsProvider(NoCredentialsProvider.create()) + .setTransportChannelProvider( + EchoSettings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport( + new NetHttpTransport.Builder().doNotValidateCertificate().build()) + .setEndpoint("http://localhost:7469") + .build()) + .build(); httpjsonClient = EchoClient.create(httpjsonEchoSettings); } @@ -72,7 +71,7 @@ public static void destroyClient() { public void testEchoHttpJson() { String content = "httpjson-echo"; EchoResponse echoResponse = - httpjsonClient.echo(EchoRequest.newBuilder().setContent(content).build()); + httpjsonClient.echo(EchoRequest.newBuilder().setContent(content).build()); assertThat(echoResponse.getContent()).isEqualTo(content); } @@ -87,9 +86,9 @@ public void testEchoHttpJson_checkError() { StatusCode.Code cancelledStatusCode = StatusCode.Code.NOT_FOUND; try { httpjsonClient.echo( - EchoRequest.newBuilder() - .setError(Status.newBuilder().setCode(cancelledStatusCode.ordinal()).build()) - .build()); + EchoRequest.newBuilder() + .setError(Status.newBuilder().setCode(cancelledStatusCode.ordinal()).build()) + .build()); } catch (ApiException e) { assertThat(e.getStatusCode().getCode()).isEqualTo(cancelledStatusCode); } @@ -101,9 +100,9 @@ public void testEchoHttpJson_checkError() { public void testExpandHttpJson() { String content = "Testing the entire response is the same"; ServerStream echoResponses = - httpjsonClient - .expandCallable() - .call(ExpandRequest.newBuilder().setContent(content).build()); + httpjsonClient + .expandCallable() + .call(ExpandRequest.newBuilder().setContent(content).build()); int numResponses = 0; List values = new ArrayList<>(); for (EchoResponse echoResponse : echoResponses) { @@ -125,12 +124,12 @@ public void testPagedExpandWithTokenHttpJson() { String content = "A series of words that will be sent back one by one"; EchoClient.PagedExpandPagedResponse pagedExpandPagedResponse = - httpjsonClient.pagedExpand( - PagedExpandRequest.newBuilder() - .setContent(content) - .setPageSize(pageSize) - .setPageToken(String.valueOf(pageToken)) - .build()); + httpjsonClient.pagedExpand( + PagedExpandRequest.newBuilder() + .setContent(content) + .setPageSize(pageSize) + .setPageToken(String.valueOf(pageToken)) + .build()); String[] words = content.split(" "); String[] expected = Arrays.copyOfRange(words, pageToken, words.length); int numResponses = 0; @@ -160,11 +159,11 @@ public void testWaitHttpJson() throws ExecutionException, InterruptedException { String content = "content"; long futureTimeInSecondsFromEpoch = Instant.now().plus(10, ChronoUnit.SECONDS).getEpochSecond(); OperationFuture operationFutureSuccess = - httpjsonClient.waitAsync( - WaitRequest.newBuilder() - .setEndTime(Timestamp.newBuilder().setSeconds(futureTimeInSecondsFromEpoch)) - .setSuccess(WaitResponse.newBuilder().setContent(content).build()) - .build()); + httpjsonClient.waitAsync( + WaitRequest.newBuilder() + .setEndTime(Timestamp.newBuilder().setSeconds(futureTimeInSecondsFromEpoch)) + .setSuccess(WaitResponse.newBuilder().setContent(content).build()) + .build()); WaitResponse waitResponseSuccess = operationFutureSuccess.get(); assertThat(waitResponseSuccess.getContent()).isEqualTo(content); } From eed5defcd74f9177a59c69d63d368df69f19883f Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Tue, 14 Mar 2023 18:06:38 -0400 Subject: [PATCH 09/17] chore: Format ITCallables --- .../showcase/v1beta1/it/ITCallables.java | 41 +++++++------------ 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java index de91cb00f0..affabc1c6b 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java @@ -5,11 +5,9 @@ import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.longrunning.OperationFuture; import com.google.api.gax.rpc.ApiException; import com.google.api.gax.rpc.ServerStream; import com.google.api.gax.rpc.StatusCode; -import com.google.protobuf.Timestamp; import com.google.rpc.Status; import com.google.showcase.v1beta1.EchoClient; import com.google.showcase.v1beta1.EchoRequest; @@ -17,21 +15,15 @@ import com.google.showcase.v1beta1.EchoSettings; import com.google.showcase.v1beta1.ExpandRequest; import com.google.showcase.v1beta1.PagedExpandRequest; -import com.google.showcase.v1beta1.WaitMetadata; -import com.google.showcase.v1beta1.WaitRequest; -import com.google.showcase.v1beta1.WaitResponse; import io.grpc.ManagedChannelBuilder; import java.io.IOException; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.concurrent.ExecutionException; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; -import org.threeten.bp.Instant; -import org.threeten.bp.temporal.ChronoUnit; public class ITCallables { private static EchoClient grpcClient; @@ -94,8 +86,10 @@ public void testEchoHttpJson_checkError() { } } - /* This tests that server-side streaming returns the correct content and the server returns the - correct number of responses */ + /* + This tests that pagination returns the correct number of pages + responses and the content is + correct. It tests pagination from ServerSideStreaming. + */ @Test public void testExpandHttpJson() { String content = "Testing the entire response is the same"; @@ -115,8 +109,16 @@ public void testExpandHttpJson() { assertThat(response).isEqualTo(content); } - /* This tests that pagination returns the correct number of pages + responses and the content is - correct */ + /* + This tests that pagination returns the correct number of pages + responses and the content is + correct. It tests pagination from ServerSideStreaming. + + The pageToken is where the streaming responses come back from and the page size denotes + how many of the responses come back together. i.e for PageSize = 2 and PageToken = 1, see below: + | A | Series | Of | Words | That | Will | Be | Send | Back | One | By | One + Page # | X | 1 | 1 | 2 | 2 | 3 | 3 | 4 | 4 | 5 | 5 | 6 + Token # | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 + */ @Test public void testPagedExpandWithTokenHttpJson() { int pageSize = 2; @@ -152,19 +154,4 @@ public void testPagedExpandWithTokenHttpJson() { assertThat(numPages).isEqualTo(numExpectedPages); assertThat(numResponses).isEqualTo(numExpectedResponses); } - - @Test - public void testWaitHttpJson() throws ExecutionException, InterruptedException { - // We set the future timeout to be 10 seconds in the future to ensure a few GetOperation calls - String content = "content"; - long futureTimeInSecondsFromEpoch = Instant.now().plus(10, ChronoUnit.SECONDS).getEpochSecond(); - OperationFuture operationFutureSuccess = - httpjsonClient.waitAsync( - WaitRequest.newBuilder() - .setEndTime(Timestamp.newBuilder().setSeconds(futureTimeInSecondsFromEpoch)) - .setSuccess(WaitResponse.newBuilder().setContent(content).build()) - .build()); - WaitResponse waitResponseSuccess = operationFutureSuccess.get(); - assertThat(waitResponseSuccess.getContent()).isEqualTo(content); - } } From 4d268623ec4060400e1605c47265d68115e0d383 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 16 Mar 2023 17:43:28 -0400 Subject: [PATCH 10/17] chore: Fix to not found status code --- .../com/google/showcase/v1beta1/it/ITCallables.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java index affabc1c6b..02f3c531dc 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java @@ -70,25 +70,25 @@ public void testEchoHttpJson() { /* This tests has the server return an error back as the result. We use 404 NOT_FOUND Status as that has the same gRPC <-> HttpJson code mapping (showcase sever - has a map that translates the code) + has a map that translates the code) The showcase server expects a gRPC Status Code and the result is the HttpJson's mapped value */ @Test public void testEchoHttpJson_checkError() { - StatusCode.Code cancelledStatusCode = StatusCode.Code.NOT_FOUND; + StatusCode.Code notFoundStatusCode = StatusCode.Code.NOT_FOUND; try { httpjsonClient.echo( EchoRequest.newBuilder() - .setError(Status.newBuilder().setCode(cancelledStatusCode.ordinal()).build()) + .setError(Status.newBuilder().setCode(notFoundStatusCode.ordinal()).build()) .build()); } catch (ApiException e) { - assertThat(e.getStatusCode().getCode()).isEqualTo(cancelledStatusCode); + assertThat(e.getStatusCode().getCode()).isEqualTo(notFoundStatusCode); } } /* This tests that pagination returns the correct number of pages + responses and the content is - correct. It tests pagination from ServerSideStreaming. + correct. It tests pagination from Server-Side Streaming. */ @Test public void testExpandHttpJson() { From ca777dd7b9d319c2df4002f3d203feff00abe7fe Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Wed, 22 Mar 2023 16:28:53 -0400 Subject: [PATCH 11/17] chore: Add HttpJson Unary Callable Showcase Test --- .../showcase/v1beta1/it/ITCallables.java | 157 ------------------ .../showcase/v1beta1/it/ITUnaryCallable.java | 30 +++- 2 files changed, 29 insertions(+), 158 deletions(-) delete mode 100644 showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java deleted file mode 100644 index 02f3c531dc..0000000000 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITCallables.java +++ /dev/null @@ -1,157 +0,0 @@ -package com.google.showcase.v1beta1.it; - -import static com.google.common.truth.Truth.assertThat; - -import com.google.api.client.http.javanet.NetHttpTransport; -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ServerStream; -import com.google.api.gax.rpc.StatusCode; -import com.google.rpc.Status; -import com.google.showcase.v1beta1.EchoClient; -import com.google.showcase.v1beta1.EchoRequest; -import com.google.showcase.v1beta1.EchoResponse; -import com.google.showcase.v1beta1.EchoSettings; -import com.google.showcase.v1beta1.ExpandRequest; -import com.google.showcase.v1beta1.PagedExpandRequest; -import io.grpc.ManagedChannelBuilder; -import java.io.IOException; -import java.security.GeneralSecurityException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.Test; - -public class ITCallables { - private static EchoClient grpcClient; - private static EchoClient httpjsonClient; - - @BeforeClass - public static void createClient() throws IOException, GeneralSecurityException { - EchoSettings grpcEchoSettings = - EchoSettings.newHttpJsonBuilder() - .setCredentialsProvider(NoCredentialsProvider.create()) - .setTransportChannelProvider( - InstantiatingGrpcChannelProvider.newBuilder() - .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) - .build()) - .build(); - grpcClient = EchoClient.create(grpcEchoSettings); - EchoSettings httpjsonEchoSettings = - EchoSettings.newHttpJsonBuilder() - .setCredentialsProvider(NoCredentialsProvider.create()) - .setTransportChannelProvider( - EchoSettings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport( - new NetHttpTransport.Builder().doNotValidateCertificate().build()) - .setEndpoint("http://localhost:7469") - .build()) - .build(); - httpjsonClient = EchoClient.create(httpjsonEchoSettings); - } - - @AfterClass - public static void destroyClient() { - grpcClient.close(); - httpjsonClient.close(); - } - - @Test - public void testEchoHttpJson() { - String content = "httpjson-echo"; - EchoResponse echoResponse = - httpjsonClient.echo(EchoRequest.newBuilder().setContent(content).build()); - assertThat(echoResponse.getContent()).isEqualTo(content); - } - - /* - This tests has the server return an error back as the result. - We use 404 NOT_FOUND Status as that has the same gRPC <-> HttpJson code mapping (showcase sever - has a map that translates the code) - The showcase server expects a gRPC Status Code and the result is the HttpJson's mapped value - */ - @Test - public void testEchoHttpJson_checkError() { - StatusCode.Code notFoundStatusCode = StatusCode.Code.NOT_FOUND; - try { - httpjsonClient.echo( - EchoRequest.newBuilder() - .setError(Status.newBuilder().setCode(notFoundStatusCode.ordinal()).build()) - .build()); - } catch (ApiException e) { - assertThat(e.getStatusCode().getCode()).isEqualTo(notFoundStatusCode); - } - } - - /* - This tests that pagination returns the correct number of pages + responses and the content is - correct. It tests pagination from Server-Side Streaming. - */ - @Test - public void testExpandHttpJson() { - String content = "Testing the entire response is the same"; - ServerStream echoResponses = - httpjsonClient - .expandCallable() - .call(ExpandRequest.newBuilder().setContent(content).build()); - int numResponses = 0; - List values = new ArrayList<>(); - for (EchoResponse echoResponse : echoResponses) { - values.add(echoResponse.getContent()); - numResponses++; - } - - String response = String.join(" ", values.toArray(new String[0])); - assertThat(numResponses).isEqualTo(content.split(" ").length); - assertThat(response).isEqualTo(content); - } - - /* - This tests that pagination returns the correct number of pages + responses and the content is - correct. It tests pagination from ServerSideStreaming. - - The pageToken is where the streaming responses come back from and the page size denotes - how many of the responses come back together. i.e for PageSize = 2 and PageToken = 1, see below: - | A | Series | Of | Words | That | Will | Be | Send | Back | One | By | One - Page # | X | 1 | 1 | 2 | 2 | 3 | 3 | 4 | 4 | 5 | 5 | 6 - Token # | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 - */ - @Test - public void testPagedExpandWithTokenHttpJson() { - int pageSize = 2; - int pageToken = 1; - String content = "A series of words that will be sent back one by one"; - - EchoClient.PagedExpandPagedResponse pagedExpandPagedResponse = - httpjsonClient.pagedExpand( - PagedExpandRequest.newBuilder() - .setContent(content) - .setPageSize(pageSize) - .setPageToken(String.valueOf(pageToken)) - .build()); - String[] words = content.split(" "); - String[] expected = Arrays.copyOfRange(words, pageToken, words.length); - int numResponses = 0; - int numPages = 0; - for (EchoClient.PagedExpandPage page : pagedExpandPagedResponse.iteratePages()) { - for (EchoResponse echoResponse : page.getValues()) { - assertThat(echoResponse.getContent()).isEqualTo(expected[numResponses]); - numResponses++; - } - numPages++; - } - - int contentLength = words.length; - boolean isDivisible = ((contentLength - pageToken) % pageSize) == 0; - // If the responses can't be evenly split into pages, then the extra responses will go to an - // additional page - int numExpectedPages = ((contentLength - pageToken) / pageSize) + (isDivisible ? 0 : 1); - int numExpectedResponses = contentLength - pageToken; - - assertThat(numPages).isEqualTo(numExpectedPages); - assertThat(numResponses).isEqualTo(numExpectedResponses); - } -} diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java index 82fb80be0e..df5b84faf5 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java @@ -23,6 +23,7 @@ import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GrpcStatusCode; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiException; import com.google.api.gax.rpc.CancelledException; import com.google.api.gax.rpc.StatusCode; import com.google.rpc.Status; @@ -100,11 +101,38 @@ public void testGrpc_shutdown() { } @Test - public void testHttpJson() { + public void testHttpJson_receiveContent() { assertThat(echoHttpJson("http-echo?")).isEqualTo("http-echo?"); assertThat(echoHttpJson("http-echo!")).isEqualTo("http-echo!"); } + /* + This tests has the server return an error back as the result. + We use 404 NOT_FOUND Status as that has the same gRPC <-> HttpJson code mapping (showcase sever + has a map that translates the code) + The showcase server expects a gRPC Status Code and the result is the HttpJson's mapped value + */ + @Test + public void testEchoHttpJson_checkError() { + StatusCode.Code notFoundStatusCode = StatusCode.Code.NOT_FOUND; + ApiException exception = + assertThrows( + ApiException.class, + () -> + httpJsonClient.echo( + EchoRequest.newBuilder() + .setError(Status.newBuilder().setCode(notFoundStatusCode.ordinal()).build()) + .build())); + assertThat(exception.getStatusCode().getCode()).isEqualTo(notFoundStatusCode); + } + + @Test + public void testHttpJson_shutdown() { + assertThat(httpJsonClient.isShutdown()).isFalse(); + httpJsonClient.shutdown(); + assertThat(httpJsonClient.isShutdown()).isTrue(); + } + private String echoGrpc(String value) { EchoResponse response = grpcClient.echo(EchoRequest.newBuilder().setContent(value).build()); return response.getContent(); From 29c051646ec39e0300e57ba0c61dc5e9a2b534df Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Wed, 22 Mar 2023 16:30:52 -0400 Subject: [PATCH 12/17] chore: Fix truth dependency --- showcase/gapic-showcase/pom.xml | 6 ------ showcase/pom.xml | 6 ------ 2 files changed, 12 deletions(-) diff --git a/showcase/gapic-showcase/pom.xml b/showcase/gapic-showcase/pom.xml index 4dc9aa1b6c..96b4045ebd 100644 --- a/showcase/gapic-showcase/pom.xml +++ b/showcase/gapic-showcase/pom.xml @@ -165,12 +165,6 @@ junit test - - com.google.truth - truth - test - - com.google.truth truth diff --git a/showcase/pom.xml b/showcase/pom.xml index fee88c154f..d36599a873 100644 --- a/showcase/pom.xml +++ b/showcase/pom.xml @@ -54,12 +54,6 @@ 4.13.2 test - - com.google.truth - truth - 1.1.3 - test - From 2a7af5888a981403c00ebc17cac2317dcebe7ca0 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Wed, 22 Mar 2023 16:36:18 -0400 Subject: [PATCH 13/17] chore: Update test name --- .../com/google/showcase/v1beta1/it/ITUnaryCallable.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java index df5b84faf5..12c46541cf 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java @@ -108,12 +108,12 @@ public void testHttpJson_receiveContent() { /* This tests has the server return an error back as the result. - We use 404 NOT_FOUND Status as that has the same gRPC <-> HttpJson code mapping (showcase sever - has a map that translates the code) - The showcase server expects a gRPC Status Code and the result is the HttpJson's mapped value + We use 404 NOT_FOUND Status as that has the same gRPC <-> HttpJson code mapping + (showcase sever has a map that translates the code). The showcase server expects + a gRPC Status Code and the result is the HttpJson's mapped value */ @Test - public void testEchoHttpJson_checkError() { + public void testHttpJson_serverResponseError_throwsException() { StatusCode.Code notFoundStatusCode = StatusCode.Code.NOT_FOUND; ApiException exception = assertThrows( From 5a13d4864f88dc9e894baaa3a814807924a29b21 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Wed, 22 Mar 2023 16:50:05 -0400 Subject: [PATCH 14/17] chore: Address code smell --- .../showcase/v1beta1/it/ITUnaryCallable.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java index 12c46541cf..ebf5a0d10a 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java @@ -23,8 +23,8 @@ import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.GrpcStatusCode; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.rpc.ApiException; import com.google.api.gax.rpc.CancelledException; +import com.google.api.gax.rpc.NotFoundException; import com.google.api.gax.rpc.StatusCode; import com.google.rpc.Status; import com.google.showcase.v1beta1.EchoClient; @@ -115,14 +115,12 @@ public void testHttpJson_receiveContent() { @Test public void testHttpJson_serverResponseError_throwsException() { StatusCode.Code notFoundStatusCode = StatusCode.Code.NOT_FOUND; - ApiException exception = - assertThrows( - ApiException.class, - () -> - httpJsonClient.echo( - EchoRequest.newBuilder() - .setError(Status.newBuilder().setCode(notFoundStatusCode.ordinal()).build()) - .build())); + EchoRequest requestWithServerError = + EchoRequest.newBuilder() + .setError(Status.newBuilder().setCode(notFoundStatusCode.ordinal()).build()) + .build(); + NotFoundException exception = + assertThrows(NotFoundException.class, () -> httpJsonClient.echo(requestWithServerError)); assertThat(exception.getStatusCode().getCode()).isEqualTo(notFoundStatusCode); } From a6a367667a330cee7bf49fe2619a9664bad7dcba Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Wed, 22 Mar 2023 17:10:21 -0400 Subject: [PATCH 15/17] chore: Remove incorrect comment --- .../com/google/showcase/v1beta1/it/ITUnaryCallable.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java index ebf5a0d10a..737b043183 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java @@ -106,12 +106,6 @@ public void testHttpJson_receiveContent() { assertThat(echoHttpJson("http-echo!")).isEqualTo("http-echo!"); } - /* - This tests has the server return an error back as the result. - We use 404 NOT_FOUND Status as that has the same gRPC <-> HttpJson code mapping - (showcase sever has a map that translates the code). The showcase server expects - a gRPC Status Code and the result is the HttpJson's mapped value - */ @Test public void testHttpJson_serverResponseError_throwsException() { StatusCode.Code notFoundStatusCode = StatusCode.Code.NOT_FOUND; From 533deec64c1858da208474d13cecfaf7d683f2c2 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 23 Mar 2023 10:56:04 -0400 Subject: [PATCH 16/17] chore: Update test to CANCELLED --- .../google/showcase/v1beta1/it/ITUnaryCallable.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java index 737b043183..3c5c44956a 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java @@ -24,7 +24,6 @@ import com.google.api.gax.grpc.GrpcStatusCode; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; import com.google.api.gax.rpc.CancelledException; -import com.google.api.gax.rpc.NotFoundException; import com.google.api.gax.rpc.StatusCode; import com.google.rpc.Status; import com.google.showcase.v1beta1.EchoClient; @@ -108,14 +107,14 @@ public void testHttpJson_receiveContent() { @Test public void testHttpJson_serverResponseError_throwsException() { - StatusCode.Code notFoundStatusCode = StatusCode.Code.NOT_FOUND; + StatusCode.Code cancelledStatusCode = StatusCode.Code.CANCELLED; EchoRequest requestWithServerError = EchoRequest.newBuilder() - .setError(Status.newBuilder().setCode(notFoundStatusCode.ordinal()).build()) + .setError(Status.newBuilder().setCode(cancelledStatusCode.ordinal()).build()) .build(); - NotFoundException exception = - assertThrows(NotFoundException.class, () -> httpJsonClient.echo(requestWithServerError)); - assertThat(exception.getStatusCode().getCode()).isEqualTo(notFoundStatusCode); + CancelledException exception = + assertThrows(CancelledException.class, () -> httpJsonClient.echo(requestWithServerError)); + assertThat(exception.getStatusCode().getCode()).isEqualTo(cancelledStatusCode); } @Test From d3453a3455a197c7372a3d3d66fd094448cc4c25 Mon Sep 17 00:00:00 2001 From: Lawrence Qiu Date: Thu, 23 Mar 2023 11:40:15 -0400 Subject: [PATCH 17/17] chore: Clean up PR --- .../java/com/google/showcase/v1beta1/it/ITUnaryCallable.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java index 3c5c44956a..1d1ccd1bec 100644 --- a/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java +++ b/showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITUnaryCallable.java @@ -107,14 +107,13 @@ public void testHttpJson_receiveContent() { @Test public void testHttpJson_serverResponseError_throwsException() { - StatusCode.Code cancelledStatusCode = StatusCode.Code.CANCELLED; EchoRequest requestWithServerError = EchoRequest.newBuilder() - .setError(Status.newBuilder().setCode(cancelledStatusCode.ordinal()).build()) + .setError(Status.newBuilder().setCode(StatusCode.Code.CANCELLED.ordinal()).build()) .build(); CancelledException exception = assertThrows(CancelledException.class, () -> httpJsonClient.echo(requestWithServerError)); - assertThat(exception.getStatusCode().getCode()).isEqualTo(cancelledStatusCode); + assertThat(exception.getStatusCode().getCode()).isEqualTo(StatusCode.Code.CANCELLED); } @Test