Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
/*
* Copyright 2023, Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
*
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

package com.google.auth.oauth2;

import com.google.api.client.testing.http.FixedClock;
Expand All @@ -6,8 +37,8 @@
import java.util.Map;

/**
* This class marked public as it is used in showcase tests in sdk-platform-java to test GDCH:
* https://github.com/googleapis/sdk-platform-java/blob/3db61c211b757796a3e212c384487d0f2827322b/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITGdch.java#L215-L223
* This class marked public as it is used in showcase tests to test GDCH:
* https://github.com/googleapis/google-cloud-java/blob/e50b96b70826f173e6d23278fea96c2af9b6e817/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITGdch.java#L217-L225
*/
public class GdchCredentialsTestUtil {
public static void registerGdchCredentialWithMockTransport(
Expand Down
2 changes: 1 addition & 1 deletion java-bigtable/google-cloud-bigtable/EnableAutoValue.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This is a marker file to trigger auto-value injection into the annotation processor path
https://github.com/googleapis/java-shared-config/blob/51c9f68ff1736761b21c921f078ab2c8675ff268/pom.xml#L758
https://github.com/googleapis/google-cloud-java/blob/e50b96b70826f173e6d23278fea96c2af9b6e817/java-shared-config/java-shared-config/pom.xml#L580-L598
2 changes: 1 addition & 1 deletion java-bigtable/test-proxy/EnableAutoValue.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This is a marker file to trigger auto-value injection into the annotation processor path
https://github.com/googleapis/java-shared-config/blob/51c9f68ff1736761b21c921f078ab2c8675ff268/pom.xml#L758
https://github.com/googleapis/google-cloud-java/blob/e50b96b70826f173e6d23278fea96c2af9b6e817/java-shared-config/java-shared-config/pom.xml#L580-L598
2 changes: 1 addition & 1 deletion java-cloud-bom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ This is the table of modules included in the latest libraries-bom release:

The [google-cloud-bom dashboard](https://storage.googleapis.com/java-cloud-bom-dashboard/com.google.cloud/google-cloud-bom/all-versions/index.html) provides client library consumers with easy access to dependency information pertaining to each client library that goes into the google-cloud-bom.

The dashboard shows the content of **each version** of the BOM which includes all the versions of the artifacts in it and their underlying [google-cloud-shared-dependencies BOM](https://github.com/googleapis/sdk-platform-java/tree/main/java-shared-dependencies) version.
The dashboard shows the content of **each version** of the BOM which includes all the versions of the artifacts in it and their underlying [google-cloud-shared-dependencies BOM](https://github.com/googleapis/google-cloud-java/tree/main/sdk-platform-java/java-shared-dependencies) version.

The dashboard also has an [all versions](https://storage.googleapis.com/java-cloud-bom-dashboard/com.google.cloud/google-cloud-bom/all-versions/index.html) page where user can easily search on any artifact or version to see which version of the google-cloud-bom it exists in -- this could be helpful in providing client library consumer advice on which version(s) of google-cloud-bom to import to address their needs.

Expand Down
2 changes: 1 addition & 1 deletion java-cloud-bom/libraries-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<dependencyManagement>
<dependencies>
<!-- first-party-dependencies is part of java-shared-dependencies
BOM in https://github.com/googleapis/sdk-platform-java/blob/main/java-shared-dependencies/first-party-dependencies/pom.xml.
BOM in https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/java-shared-dependencies/first-party-dependencies/pom.xml.
This includes Guava, Protobuf, gRPC, Google Auth Libraries, etc. -->
<dependency>
<groupId>com.google.cloud</groupId>
Expand Down
6 changes: 3 additions & 3 deletions java-common-protos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ Java is a registered trademark of Oracle and/or its affiliates.
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/sdk-platform-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/sdk-platform-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/sdk-platform-java/blob/main/LICENSE
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing

[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void createClients() throws Exception {

// Adding `Code.INTERNAL` is necessary because for httpJson requests, the httpJson status code
// is mapped here:
// https://github.com/googleapis/sdk-platform-java/blob/acdde47445916dd306ce8b91489fab45c9c2ef50/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonStatusCode.java#L96-L133
// https://github.com/googleapis/google-cloud-java/blob/e50b96b70826f173e6d23278fea96c2af9b6e817/sdk-platform-java/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonStatusCode.java#L99-L136
// Therefore, just setting the error code to `Code.UNKNOWN` for httpJson will get translated
// instead to `Code.INTERNAL`.
Set<Code> retryableCodes = ImmutableSet.of(Code.UNKNOWN, Code.INTERNAL);
Expand Down
6 changes: 3 additions & 3 deletions sdk-platform-java/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ for gapic-generator-java's Bazel build.
There are 4 layers of testing in this repo:
1. Traditional unit tests. These tests usually focus on testing one very specific test case at a time. For example, [MethodTest](https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/gapic-generator-java/src/test/java/com/google/api/generator/gapic/model/MethodTest.java)
2. Golden unit tests. These tests start with a test proto, we create different test cases in the proto, load the proto in unit tests and save the generated file as golden files. For example, [routing header proto](https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/gapic-generator-java/src/test/proto/explicit_dynamic_routing_header_testing.proto) -> Load in the [unit test](https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposerTest.java#L56-L64) -> Saved as [golden](https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcRoutingHeadersStub.golden)
3. Showcase integration tests. They test the generated library's behavior against a mock server, see [README.md](https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/java-showcase/README.md) of showcase module for details.
4. Golden integration tests. These tests generate a full client library with real protos from googleapis, for example, golden integration tests for [compute](https://github.com/googleapis/sdk-platform-java/tree/main/test/integration/goldens/compute). However, we _should_ stop adding new ones, and rely on golden unit tests and showcase tests.
3. Showcase integration tests. They test the generated library's behavior against a mock server, see [README.md](https://github.com/googleapis/google-cloud-java/blob/main/java-showcase/README.md) of showcase module for details.
4. Golden integration tests. These tests generate a full client library with real protos from googleapis, for example, golden integration tests for [compute](https://github.com/googleapis/google-cloud-java/tree/main/sdk-platform-java/test/integration/goldens/compute). However, we _should_ stop adding new ones, and rely on golden unit tests and showcase tests.
Comment thread
lqiu96 marked this conversation as resolved.

Based on where the code changes are, we should add different tests, in general

Expand All @@ -60,7 +60,7 @@ Based on where the code changes are, we should add different tests, in general

See the [Unit Tests](https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/gapic-generator-java/DEVELOPMENT.md#unit-tests) section in gapic-generator-java/DEVELOPMENT.md for how to run traditional and golden unit tests.

See [Running the Integration Tests](https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/java-showcase/README.md#running-the-integration-tests) and [Update the Golden Showcase Files](https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/java-showcase/README.md#update-the-golden-showcase-files) sections in java-showcase/README.md for how to run and update showcase integration tests.
See [Running the Integration Tests](https://github.com/googleapis/google-cloud-java/blob/main/java-showcase/README.md#running-the-integration-tests) and [Update the Golden Showcase Files](https://github.com/googleapis/google-cloud-java/blob/main/java-showcase/README.md#update-the-golden-showcase-files) sections in java-showcase/README.md for how to run and update showcase integration tests.

See the [Integration Tests](https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/gapic-generator-java/DEVELOPMENT.md#integration-tests) section in gapic-generator-java/DEVELOPMENT.md for how to run golden integration tests.

4 changes: 2 additions & 2 deletions sdk-platform-java/api-common-java/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"api_shortname": "api-common",
"client_documentation": "https://cloud.google.com/java/docs/reference/api-common/latest/overview",
"product_documentation": "https://github.com/googleapis/sdk-platform-java/tree/main/api-common-java",
"product_documentation": "https://github.com/googleapis/google-cloud-java/tree/main/sdk-platform-java/api-common-java",
"api_description": "API Common for Java is a library for foundational types relating to Google APIs.",
"name_pretty": "API Common for Java",
"release_level": "stable",
"language": "java",
"repo": "googleapis/sdk-platform-java",
"repo": "googleapis/google-cloud-java",
"repo_short": "api-common-java",
"library_type": "OTHER",
"distribution_name": "com.google.api:api-common"
Expand Down
4 changes: 2 additions & 2 deletions sdk-platform-java/api-common-java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@ mvn fmt:format
mvn test
```

[CONTRIBUTING]:https://github.com/googleapis/api-common-java/blob/main/CONTRIBUTING.md
[LICENSE]: https://github.com/googleapis/api-common-java/blob/main/LICENSE
[CONTRIBUTING]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[LICENSE]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE

2 changes: 1 addition & 1 deletion sdk-platform-java/api-common-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<licenses>
<license>
<name>BSD-3-Clause</name>
<url>https://github.com/googleapis/api-common-java/blob/main/LICENSE</url>
<url>https://github.com/googleapis/google-cloud-java/blob/main/LICENSE</url>
</license>
</licenses>

Expand Down
6 changes: 3 additions & 3 deletions sdk-platform-java/dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# "3P" refers to Third-Party dependencies.

# Pom-Parent Dependencies
# These dependencies are declared: https://github.com/googleapis/sdk-platform-java/blob/main/gapic-generator-java-pom-parent/pom.xml
# These dependencies are declared: https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/gapic-generator-java-pom-parent/pom.xml
javax.annotation:javax.annotation-api,javax.annotation-api=1.3.2
io.grpc:grpc-bom,grpc=1.83.0
com.google.auth:google-auth-library-bom,google.auth=1.49.0
Expand All @@ -24,13 +24,13 @@ org.jspecify:jspecify,jspecify=1.0.0
org.conscrypt:conscrypt-openjdk-uber,conscrypt=2.6.1

# 1P Shared-Deps
# These dependencies are declared: https://github.com/googleapis/sdk-platform-java/blob/main/java-shared-dependencies/first-party-dependencies/pom.xml
# These dependencies are declared: https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/java-shared-dependencies/first-party-dependencies/pom.xml
com.google.cloud:grpc-gcp,grpc-gcp=1.12.0
com.google.oauth-client:google-oauth-client,google.oauth-client=1.39.0
com.google.api-client:google-api-client,google.api-client=2.9.0

# 3P Shared-Deps
# These dependencies are declared: https://github.com/googleapis/sdk-platform-java/blob/main/java-shared-dependencies/third-party-dependencies/pom.xml
# These dependencies are declared: https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/java-shared-dependencies/third-party-dependencies/pom.xml
org.threeten:threeten-extra,threeten-extra=1.10.0
io.opencensus:opencensus-api,opencensus=0.31.1
com.google.code.findbugs:jsr305,findbugs=3.0.2
Expand Down
10 changes: 5 additions & 5 deletions sdk-platform-java/gapic-generator-java-pom-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<version>2.76.0-SNAPSHOT</version><!-- {x-version-update:gapic-generator-java:current} -->
<packaging>pom</packaging>
<name>GAPIC Generator Java POM Parent</name>
<url>https://github.com/googleapis/sdk-platform-java</url>
<url>https://github.com/googleapis/google-cloud-java/tree/main/sdk-platform-java</url>
<description>
The top-level parent for all modules in the repository.
</description>
Expand Down Expand Up @@ -63,13 +63,13 @@
</organization>
<scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false"
child.scm.url.inherit.append.path="false">
<connection>scm:git:git@github.com:googleapis/sdk-platform-java.git</connection>
<developerConnection>scm:git:git@github.com:googleapis/sdk-platform-java.git</developerConnection>
<url>https://github.com/googleapis/sdk-platform-java</url>
<connection>scm:git:git@github.com:googleapis/google-cloud-java.git</connection>
<developerConnection>scm:git:git@github.com:googleapis/google-cloud-java.git</developerConnection>
<url>https://github.com/googleapis/google-cloud-java</url>
<tag>HEAD</tag>
</scm>
<issueManagement>
<url>https://github.com/googleapis/sdk-platform-java/issues</url>
<url>https://github.com/googleapis/google-cloud-java/issues</url>
<system>GitHub Issues</system>
</issueManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@ private static ClassDefinition createNestedRpcPagedResponseClass(
Variable.builder().setName("input").setType(methodPageType).build());

// Overrides ApiFunction.apply.
// (https://github.com/googleapis/api-common-java/blob/debf25960dea0367b0d3b5e16d57d76c1d01947e/src/main/java/com/google/api/core/ApiFunction.java).
// (https://github.com/googleapis/google-cloud-java/blob/e50b96b70826f173e6d23278fea96c2af9b6e817/sdk-platform-java/api-common-java/src/main/java/com/google/api/core/ApiFunction.java).
Expr pageToTransformExpr =
LambdaExpr.builder()
.setArguments(inputVarExpr.toBuilder().setIsDecl(true).build())
Expand Down
4 changes: 2 additions & 2 deletions sdk-platform-java/gax-java/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"api_shortname": "gax",
"name_pretty": "gax",
"product_documentation": "https://github.com/googleapis/sdk-platform-java/blob/main/gax-java/README.md",
"product_documentation": "https://github.com/googleapis/google-cloud-java/blob/main/sdk-platform-java/gax-java/README.md",
"api_description": "Google API Extensions for Java (GAX Java) is a library which aids in the development of client libraries for server APIs, based on GRPC and Google API conventions.",
"client_documentation": "https://cloud.google.com/java/docs/reference/gax/latest/overview",
"language": "java",
"release_level": "stable",
"repo": "googleapis/sdk-platform-java",
"repo": "googleapis/google-cloud-java",
"repo_short": "gax-java",
"library_type": "OTHER",
"distribution_name": "com.google.api:gax"
Expand Down
4 changes: 2 additions & 2 deletions sdk-platform-java/gax-java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,6 @@ License

BSD - See [LICENSE] for more information.

[CONTRIBUTING]:https://github.com/googleapis/gax-java/blob/main/CONTRIBUTING.md
[LICENSE]: https://github.com/googleapis/gax-java/blob/main/LICENSE
[CONTRIBUTING]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[LICENSE]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE

8 changes: 4 additions & 4 deletions sdk-platform-java/gax-java/gax-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@
<id>GoogleAPIs</id>
<name>GoogleAPIs</name>
<email>googleapis@googlegroups.com</email>
<url>https://github.com/googleapis/gax-java</url>
<url>https://github.com/googleapis/google-cloud-java/tree/main/sdk-platform-java/gax-java</url>
<organization>Google, LLC</organization>
<organizationUrl>https://www.google.com</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:https://github.com/googleapis/gax-java.git</connection>
<url>https://github.com/googleapis/gax-java</url>
<connection>scm:git:https://github.com/googleapis/google-cloud-java.git</connection>
<url>https://github.com/googleapis/google-cloud-java</url>
</scm>

<licenses>
<license>
<name>BSD-3-Clause</name>
<url>https://github.com/googleapis/gax-java/blob/master/LICENSE</url>
<url>https://github.com/googleapis/google-cloud-java/blob/main/LICENSE</url>
</license>
</licenses>

Expand Down
2 changes: 1 addition & 1 deletion sdk-platform-java/gax-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<licenses>
<license>
<name>BSD-3-Clause</name>
<url>https://github.com/googleapis/gax-java/blob/master/LICENSE</url>
<url>https://github.com/googleapis/google-cloud-java/blob/main/LICENSE</url>
</license>
</licenses>

Expand Down
4 changes: 2 additions & 2 deletions sdk-platform-java/java-core/.repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"api_shortname": "google-cloud-core",
"product_documentation": "https://github.com/googleapis/sdk-platform-java/tree/main/java-core",
"product_documentation": "https://github.com/googleapis/google-cloud-java/tree/main/sdk-platform-java/java-core",
"client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-core/latest/overview",
"api_description": "A set of classes and utilities used in Google Cloud Java libraries.",
"name_pretty": "Google Cloud Core",
"release_level": "stable",
"language": "java",
"repo": "googleapis/sdk-platform-java",
"repo": "googleapis/google-cloud-java",
"repo_short": "java-core",
"library_type": "CORE",
"distribution_name": "com.google.cloud:google-cloud-core"
Expand Down
6 changes: 3 additions & 3 deletions sdk-platform-java/java-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ considered stable.

Apache 2.0 - See [LICENSE][license] for more information.

[contributing]: https://github.com/googleapis/java-core/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/java-core/blob/main/CODE_OF_CONDUCT.md
[license]: https://github.com/googleapis/java-core/blob/main/LICENSE
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md
[license]: https://github.com/googleapis/google-cloud-java/blob/main/LICENSE
[semver]: http://semver.org/
[cloud-platform]: https://cloud.google.com/
[api-docs]: https://googleapis.dev/java/google-cloud-core/latest
Loading
Loading