From 69fe1693cfdb8da7107f83517c9cb866cbdba187 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Sep 2023 13:53:56 -0700 Subject: [PATCH] docs: Minor formatting (#433) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Minor formatting chore: Update gapic-generator-python to v1.11.5 build: Update rules_python to 0.24.0 PiperOrigin-RevId: 563436317 Source-Link: https://github.com/googleapis/googleapis/commit/42fd37b18d706f6f51f52f209973b3b2c28f509a Source-Link: https://github.com/googleapis/googleapis-gen/commit/280264ca02fb9316b4237a96d0af1a2343a81a56 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjgwMjY0Y2EwMmZiOTMxNmI0MjM3YTk2ZDBhZjFhMjM0M2E4MWE1NiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../services/cloud_build/async_client.py | 3 +++ .../services/cloud_build/client.py | 3 +++ .../services/cloud_build/transports/grpc.py | 2 ++ .../cloud_build/transports/grpc_asyncio.py | 2 ++ .../services/cloud_build/transports/rest.py | 2 +- .../cloudbuild_v1/types/cloudbuild.py | 25 ++++++++++++++++--- .../repository_manager/async_client.py | 2 +- .../services/repository_manager/client.py | 2 +- .../repository_manager/transports/base.py | 1 - .../repository_manager/transports/grpc.py | 1 - .../transports/grpc_asyncio.py | 1 - .../repository_manager/transports/rest.py | 1 - ...etadata_google.devtools.cloudbuild.v1.json | 2 +- ...etadata_google.devtools.cloudbuild.v2.json | 2 +- .../gapic/cloudbuild_v1/test_cloud_build.py | 2 +- .../cloudbuild_v2/test_repository_manager.py | 2 +- 16 files changed, 39 insertions(+), 14 deletions(-) diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py index 9953ec41291b..8828befde1d1 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/async_client.py @@ -558,6 +558,7 @@ async def list_builds( metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBuildsAsyncPager: r"""Lists previously requested builds. + Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully. @@ -612,6 +613,7 @@ async def sample_list_builds(): Returns: google.cloud.devtools.cloudbuild_v1.services.cloud_build.pagers.ListBuildsAsyncPager: Response including listed builds. + Iterating over this object will yield results and resolve additional pages automatically. @@ -1010,6 +1012,7 @@ async def approve_build( metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Approves or rejects a pending build. + If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py index fb4e90d8ab6b..c04862d6b5a3 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/client.py @@ -964,6 +964,7 @@ def list_builds( metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBuildsPager: r"""Lists previously requested builds. + Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully. @@ -1018,6 +1019,7 @@ def sample_list_builds(): Returns: google.cloud.devtools.cloudbuild_v1.services.cloud_build.pagers.ListBuildsPager: Response including listed builds. + Iterating over this object will yield results and resolve additional pages automatically. @@ -1418,6 +1420,7 @@ def approve_build( metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Approves or rejects a pending build. + If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py index 4fb6ebea6460..cce2211b5b5c 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc.py @@ -319,6 +319,7 @@ def list_builds( r"""Return a callable for the list builds method over gRPC. Lists previously requested builds. + Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully. @@ -428,6 +429,7 @@ def approve_build( r"""Return a callable for the approve build method over gRPC. Approves or rejects a pending build. + If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc_asyncio.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc_asyncio.py index dadb593479d8..76cca5bfa611 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc_asyncio.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/grpc_asyncio.py @@ -328,6 +328,7 @@ def list_builds( r"""Return a callable for the list builds method over gRPC. Lists previously requested builds. + Previously requested builds may still be in-progress, or may have finished successfully or unsuccessfully. @@ -439,6 +440,7 @@ def approve_build( r"""Return a callable for the approve build method over gRPC. Approves or rejects a pending build. + If approved, the returned LRO will be analogous to the LRO returned from a CreateBuild call. diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/rest.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/rest.py index d61a5d5f9422..0d2d16fa5d80 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/rest.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/services/cloud_build/transports/rest.py @@ -41,8 +41,8 @@ from google.cloud.devtools.cloudbuild_v1.types import cloudbuild -from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore +from google.longrunning import operations_pb2 # type: ignore from .base import CloudBuildTransport, DEFAULT_CLIENT_INFO as BASE_DEFAULT_CLIENT_INFO diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py index 1b7c699e1702..047b825fa96b 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v1/types/cloudbuild.py @@ -255,6 +255,7 @@ class RepoSource(proto.Message): Name of the Cloud Source Repository. branch_name (str): Regex matching branches to build. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -262,6 +263,7 @@ class RepoSource(proto.Message): This field is a member of `oneof`_ ``revision``. tag_name (str): Regex matching tags to build. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -607,6 +609,7 @@ class BuildStep(proto.Message): be specified in the build's ``Secret``. volumes (MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Volume]): List of volumes to mount into the build step. + Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are @@ -649,6 +652,7 @@ class BuildStep(proto.Message): take precedence. script (str): A shell script to be executed in the step. + When script is provided, the user cannot specify the entrypoint or args. automap_substitutions (bool): @@ -748,12 +752,14 @@ class Volume(proto.Message): Attributes: name (str): Name of the volume to mount. + Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. path (str): Path at which to mount the volume. + Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. @@ -1305,6 +1311,7 @@ class Artifacts(proto.Message): The images will be pushed using the builder service account's credentials. + The digests of the pushed images will be stored in the Build resource's results field. @@ -1314,6 +1321,7 @@ class Artifacts(proto.Message): A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. + Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service @@ -1329,6 +1337,7 @@ class Artifacts(proto.Message): A list of Maven artifacts to be uploaded to Artifact Registry upon successful completion of all build steps. + Artifacts in the workspace matching specified paths globs will be uploaded to the specified Artifact Registry repository using the builder @@ -1340,14 +1349,17 @@ class Artifacts(proto.Message): A list of Python packages to be uploaded to Artifact Registry upon successful completion of all build steps. + The build service account credentials will be used to perform the upload. + If any objects fail to be pushed, the build is marked FAILURE. npm_packages (MutableSequence[google.cloud.devtools.cloudbuild_v1.types.Artifacts.NpmPackage]): A list of npm packages to be uploaded to Artifact Registry upon successful completion of all build steps. + Npm packages in the specified paths will be uploaded to the specified Artifact Registry repository using the builder service account's @@ -1399,6 +1411,7 @@ class MavenArtifact(proto.Message): repository (str): Artifact Registry repository, in the form "https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY" + Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix. @@ -1451,6 +1464,7 @@ class PythonPackage(proto.Message): repository (str): Artifact Registry repository, in the form "https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY" + Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix. @@ -1477,6 +1491,7 @@ class NpmPackage(proto.Message): repository (str): Artifact Registry repository, in the form "https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY" + Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix. @@ -2754,6 +2769,7 @@ class PullRequestFilter(proto.Message): Attributes: branch (str): Regex of branches to match. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -2818,6 +2834,7 @@ class PushFilter(proto.Message): Attributes: branch (str): Regexes matching branches to build. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -2825,6 +2842,7 @@ class PushFilter(proto.Message): This field is a member of `oneof`_ ``git_ref``. tag (str): Regexes matching tags to build. + The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax @@ -3066,6 +3084,7 @@ class BuildOptions(proto.Message): Option to specify whether or not to apply bash style string operations to the substitutions. + NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file. @@ -3093,6 +3112,7 @@ class BuildOptions(proto.Message): in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. + The elements are of the form "KEY=VALUE" for the environment variable "KEY" being given the value "VALUE". @@ -3547,9 +3567,8 @@ class WorkerPool(proto.Message): Output only. A unique identifier for the ``WorkerPool``. annotations (MutableMapping[str, str]): User specified annotations. See - https://google.aip.dev/128#annotations - for more details such as format and size - limitations. + https://google.aip.dev/128#annotations for more + details such as format and size limitations. create_time (google.protobuf.timestamp_pb2.Timestamp): Output only. Time at which the request to create the ``WorkerPool`` was received. diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/async_client.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/async_client.py index a179a9465475..a8cf78932460 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/async_client.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/async_client.py @@ -50,7 +50,7 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py index e3c0a6648057..7fbf2bfe4397 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/client.py @@ -54,7 +54,7 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import timestamp_pb2 # type: ignore diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/base.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/base.py index d7390a965a3d..eedf13e1085a 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/base.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/base.py @@ -31,7 +31,6 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 from google.longrunning import operations_pb2 # type: ignore DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc.py index 4132d2fc2b19..88bfc06b25a6 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc.py @@ -29,7 +29,6 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 from google.longrunning import operations_pb2 # type: ignore from .base import RepositoryManagerTransport, DEFAULT_CLIENT_INFO diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc_asyncio.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc_asyncio.py index fa8bb5b340d9..cd9c115f4830 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc_asyncio.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/grpc_asyncio.py @@ -29,7 +29,6 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 from google.longrunning import operations_pb2 # type: ignore from .base import RepositoryManagerTransport, DEFAULT_CLIENT_INFO from .grpc import RepositoryManagerGrpcTransport diff --git a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/rest.py b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/rest.py index d174619c3a1e..b78c0c842485 100644 --- a/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/rest.py +++ b/packages/google-cloud-build/google/cloud/devtools/cloudbuild_v2/services/repository_manager/transports/rest.py @@ -31,7 +31,6 @@ from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore from google.cloud.location import locations_pb2 # type: ignore -from google.longrunning import operations_pb2 from requests import __version__ as requests_version import dataclasses import re diff --git a/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json b/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json index 0857ed9984ff..e379efab560f 100644 --- a/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json +++ b/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-build", - "version": "3.20.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json b/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json index 7ae3efe1fe8c..818d3fc2029c 100644 --- a/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json +++ b/packages/google-cloud-build/samples/generated_samples/snippet_metadata_google.devtools.cloudbuild.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-build", - "version": "3.20.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py b/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py index 2570d6354d41..df79bd56dc22 100644 --- a/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py +++ b/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v1/test_cloud_build.py @@ -56,7 +56,7 @@ from google.cloud.devtools.cloudbuild_v1.services.cloud_build import pagers from google.cloud.devtools.cloudbuild_v1.services.cloud_build import transports from google.cloud.devtools.cloudbuild_v1.types import cloudbuild -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account from google.protobuf import any_pb2 # type: ignore from google.protobuf import duration_pb2 # type: ignore diff --git a/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py b/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py index 6c49bc21438f..cbb3d46d1071 100644 --- a/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py +++ b/packages/google-cloud-build/tests/unit/gapic/cloudbuild_v2/test_repository_manager.py @@ -62,7 +62,7 @@ from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import options_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore