From 24facade12e7fa2fc41bc58ca9570acf3877e3f3 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 13:27:22 -0500 Subject: [PATCH 1/2] docs: Add documentation for enums (#149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Add documentation for enums fix: Add context manager return types chore: Update gapic-generator-python to v1.8.1 PiperOrigin-RevId: 503210727 Source-Link: https://github.com/googleapis/googleapis/commit/a391fd1dac18dfdfa00c18c8404f2c3a6ff8e98e Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 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 --- .../deploy_v1/services/cloud_deploy/client.py | 2 +- google/cloud/deploy_v1/types/cloud_deploy.py | 208 +++++++++++++++++- google/cloud/deploy_v1/types/log_enums.py | 8 + ...ippet_metadata_google.cloud.deploy.v1.json | 2 +- 4 files changed, 206 insertions(+), 14 deletions(-) diff --git a/google/cloud/deploy_v1/services/cloud_deploy/client.py b/google/cloud/deploy_v1/services/cloud_deploy/client.py index 1fa585c..ca8bcb4 100644 --- a/google/cloud/deploy_v1/services/cloud_deploy/client.py +++ b/google/cloud/deploy_v1/services/cloud_deploy/client.py @@ -3272,7 +3272,7 @@ def sample_get_config(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "CloudDeployClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/deploy_v1/types/cloud_deploy.py b/google/cloud/deploy_v1/types/cloud_deploy.py index 4a1c0c8..a2b530a 100644 --- a/google/cloud/deploy_v1/types/cloud_deploy.py +++ b/google/cloud/deploy_v1/types/cloud_deploy.py @@ -869,7 +869,18 @@ class ExecutionConfig(proto.Message): """ class ExecutionEnvironmentUsage(proto.Enum): - r"""Possible usages of this configuration.""" + r"""Possible usages of this configuration. + + Values: + EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED (0): + Default value. This value is unused. + RENDER (1): + Use for rendering. + DEPLOY (2): + Use for deploying and deployment hooks. + VERIFY (3): + Use for deployment verification. + """ EXECUTION_ENVIRONMENT_USAGE_UNSPECIFIED = 0 RENDER = 1 DEPLOY = 2 @@ -1409,7 +1420,20 @@ class Release(proto.Message): """ class RenderState(proto.Enum): - r"""Valid states of the render operation.""" + r"""Valid states of the render operation. + + Values: + RENDER_STATE_UNSPECIFIED (0): + The render state is unspecified. + SUCCEEDED (1): + All rendering operations have completed + successfully. + FAILED (2): + All rendering operations have completed, and + one or more have failed. + IN_PROGRESS (3): + Rendering has started and is not complete. + """ RENDER_STATE_UNSPECIFIED = 0 SUCCEEDED = 1 FAILED = 2 @@ -1437,14 +1461,39 @@ class TargetRender(proto.Message): """ class TargetRenderState(proto.Enum): - r"""Valid states of the render operation.""" + r"""Valid states of the render operation. + + Values: + TARGET_RENDER_STATE_UNSPECIFIED (0): + The render operation state is unspecified. + SUCCEEDED (1): + The render operation has completed + successfully. + FAILED (2): + The render operation has failed. + IN_PROGRESS (3): + The render operation is in progress. + """ TARGET_RENDER_STATE_UNSPECIFIED = 0 SUCCEEDED = 1 FAILED = 2 IN_PROGRESS = 3 class FailureCause(proto.Enum): - r"""Well-known rendering failures.""" + r"""Well-known rendering failures. + + Values: + FAILURE_CAUSE_UNSPECIFIED (0): + No reason for failure is specified. + CLOUD_BUILD_UNAVAILABLE (1): + Cloud Build is not available, either because it is not + enabled or because Google Cloud Deploy has insufficient + permissions. See `required + permission `__. + EXECUTION_FAILED (2): + The render operation did not complete + successfully; check Cloud Build logs. + """ FAILURE_CAUSE_UNSPECIFIED = 0 CLOUD_BUILD_UNAVAILABLE = 1 EXECUTION_FAILED = 2 @@ -1858,7 +1907,20 @@ class Rollout(proto.Message): """ class ApprovalState(proto.Enum): - r"""Valid approval states of a ``Rollout``.""" + r"""Valid approval states of a ``Rollout``. + + Values: + APPROVAL_STATE_UNSPECIFIED (0): + The ``Rollout`` has an unspecified approval state. + NEEDS_APPROVAL (1): + The ``Rollout`` requires approval. + DOES_NOT_NEED_APPROVAL (2): + The ``Rollout`` does not require approval. + APPROVED (3): + The ``Rollout`` has been approved. + REJECTED (4): + The ``Rollout`` has been rejected. + """ APPROVAL_STATE_UNSPECIFIED = 0 NEEDS_APPROVAL = 1 DOES_NOT_NEED_APPROVAL = 2 @@ -1866,7 +1928,28 @@ class ApprovalState(proto.Enum): REJECTED = 4 class State(proto.Enum): - r"""Valid states of a ``Rollout``.""" + r"""Valid states of a ``Rollout``. + + Values: + STATE_UNSPECIFIED (0): + The ``Rollout`` has an unspecified state. + SUCCEEDED (1): + The ``Rollout`` has completed successfully. + FAILED (2): + The ``Rollout`` has failed. + IN_PROGRESS (3): + The ``Rollout`` is being deployed. + PENDING_APPROVAL (4): + The ``Rollout`` needs approval. + APPROVAL_REJECTED (5): + An approver rejected the ``Rollout``. + PENDING (6): + The ``Rollout`` is waiting for an earlier Rollout(s) to + complete on this ``Target``. + PENDING_RELEASE (7): + The ``Rollout`` is waiting for the ``Release`` to be fully + rendered. + """ STATE_UNSPECIFIED = 0 SUCCEEDED = 1 FAILED = 2 @@ -1877,7 +1960,29 @@ class State(proto.Enum): PENDING_RELEASE = 7 class FailureCause(proto.Enum): - r"""Well-known rollout failures.""" + r"""Well-known rollout failures. + + Values: + FAILURE_CAUSE_UNSPECIFIED (0): + No reason for failure is specified. + CLOUD_BUILD_UNAVAILABLE (1): + Cloud Build is not available, either because it is not + enabled or because Cloud Deploy has insufficient + permissions. See `required + permission `__. + EXECUTION_FAILED (2): + The deploy operation did not complete + successfully; check Cloud Build logs. + DEADLINE_EXCEEDED (3): + Deployment did not complete within the + alloted time. + RELEASE_FAILED (4): + Release is in a failed state. + RELEASE_ABANDONED (5): + Release is abandoned. + VERIFICATION_CONFIG_NOT_FOUND (6): + No skaffold verify configuration was found. + """ FAILURE_CAUSE_UNSPECIFIED = 0 CLOUD_BUILD_UNAVAILABLE = 1 EXECUTION_FAILED = 2 @@ -2059,7 +2164,23 @@ class Phase(proto.Message): """ class State(proto.Enum): - r"""Valid states of a Phase.""" + r"""Valid states of a Phase. + + Values: + STATE_UNSPECIFIED (0): + The Phase has an unspecified state. + PENDING (1): + The Phase is waiting for an earlier Phase(s) + to complete. + IN_PROGRESS (2): + The Phase is in progress. + SUCCEEDED (3): + The Phase has succeeded. + FAILED (4): + The Phase has failed. + ABORTED (5): + The Phase was aborted. + """ STATE_UNSPECIFIED = 0 PENDING = 1 IN_PROGRESS = 2 @@ -2137,7 +2258,25 @@ class Job(proto.Message): """ class State(proto.Enum): - r"""Valid states of a Job.""" + r"""Valid states of a Job. + + Values: + STATE_UNSPECIFIED (0): + The Job has an unspecified state. + PENDING (1): + The Job is waiting for an earlier Phase(s) or + Job(s) to complete. + DISABLED (2): + The Job is disabled. + IN_PROGRESS (3): + The Job is in progress. + SUCCEEDED (4): + The Job succeeded. + FAILED (5): + The Job failed. + ABORTED (6): + The Job was aborted. + """ STATE_UNSPECIFIED = 0 PENDING = 1 DISABLED = 2 @@ -2534,7 +2673,18 @@ class JobRun(proto.Message): """ class State(proto.Enum): - r"""Valid states of a ``JobRun``.""" + r"""Valid states of a ``JobRun``. + + Values: + STATE_UNSPECIFIED (0): + The ``JobRun`` has an unspecified state. + IN_PROGRESS (1): + The ``JobRun`` is in progress. + SUCCEEDED (2): + The ``JobRun`` has succeeded. + FAILED (3): + The ``JobRun`` has failed. + """ STATE_UNSPECIFIED = 0 IN_PROGRESS = 1 SUCCEEDED = 2 @@ -2615,7 +2765,23 @@ class DeployJobRun(proto.Message): """ class FailureCause(proto.Enum): - r"""Well-known deploy failures.""" + r"""Well-known deploy failures. + + Values: + FAILURE_CAUSE_UNSPECIFIED (0): + No reason for failure is specified. + CLOUD_BUILD_UNAVAILABLE (1): + Cloud Build is not available, either because it is not + enabled or because Google Cloud Deploy has insufficient + permissions. See `Required + permission `__. + EXECUTION_FAILED (2): + The deploy operation did not complete + successfully; check Cloud Build logs. + DEADLINE_EXCEEDED (3): + The deploy build did not complete within the + alloted time. + """ FAILURE_CAUSE_UNSPECIFIED = 0 CLOUD_BUILD_UNAVAILABLE = 1 EXECUTION_FAILED = 2 @@ -2666,7 +2832,25 @@ class VerifyJobRun(proto.Message): """ class FailureCause(proto.Enum): - r"""Well-known verify failures.""" + r"""Well-known verify failures. + + Values: + FAILURE_CAUSE_UNSPECIFIED (0): + No reason for failure is specified. + CLOUD_BUILD_UNAVAILABLE (1): + Cloud Build is not available, either because it is not + enabled or because Google Cloud Deploy has insufficient + permissions. See `required + permission `__. + EXECUTION_FAILED (2): + The verify operation did not complete + successfully; check Cloud Build logs. + DEADLINE_EXCEEDED (3): + The verify build did not complete within the + alloted time. + VERIFICATION_CONFIG_NOT_FOUND (4): + No Skaffold verify configuration was found. + """ FAILURE_CAUSE_UNSPECIFIED = 0 CLOUD_BUILD_UNAVAILABLE = 1 EXECUTION_FAILED = 2 diff --git a/google/cloud/deploy_v1/types/log_enums.py b/google/cloud/deploy_v1/types/log_enums.py index e661a7d..b9f4932 100644 --- a/google/cloud/deploy_v1/types/log_enums.py +++ b/google/cloud/deploy_v1/types/log_enums.py @@ -28,6 +28,14 @@ class Type(proto.Enum): r"""Type indicates the type of the log entry and can be used as a filter. + + Values: + TYPE_UNSPECIFIED (0): + Type is unspecified. + TYPE_PUBSUB_NOTIFICATION_FAILURE (1): + A Pub/Sub notification failed to be sent. + TYPE_RENDER_STATUES_CHANGE (2): + Release render status changed notification. """ TYPE_UNSPECIFIED = 0 TYPE_PUBSUB_NOTIFICATION_FAILURE = 1 diff --git a/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json index 670b09b..bbadce0 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-deploy", - "version": "1.6.0" + "version": "0.1.0" }, "snippets": [ { From 53bef05c98a00e698705754f61b510873a689f94 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 23 Jan 2023 10:58:53 -0500 Subject: [PATCH 2/2] chore(main): release 1.6.1 (#150) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 12 ++++++++++++ google/cloud/deploy/gapic_version.py | 2 +- google/cloud/deploy_v1/gapic_version.py | 2 +- .../snippet_metadata_google.cloud.deploy.v1.json | 2 +- 5 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0d1bebe..093be7e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.6.0" + ".": "1.6.1" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1987384..3722e92 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.6.1](https://github.com/googleapis/python-deploy/compare/v1.6.0...v1.6.1) (2023-01-20) + + +### Bug Fixes + +* Add context manager return types ([24facad](https://github.com/googleapis/python-deploy/commit/24facade12e7fa2fc41bc58ca9570acf3877e3f3)) + + +### Documentation + +* Add documentation for enums ([24facad](https://github.com/googleapis/python-deploy/commit/24facade12e7fa2fc41bc58ca9570acf3877e3f3)) + ## [1.6.0](https://github.com/googleapis/python-deploy/compare/v1.5.0...v1.6.0) (2023-01-10) diff --git a/google/cloud/deploy/gapic_version.py b/google/cloud/deploy/gapic_version.py index a016bdf..b4028ab 100644 --- a/google/cloud/deploy/gapic_version.py +++ b/google/cloud/deploy/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.6.0" # {x-release-please-version} +__version__ = "1.6.1" # {x-release-please-version} diff --git a/google/cloud/deploy_v1/gapic_version.py b/google/cloud/deploy_v1/gapic_version.py index a016bdf..b4028ab 100644 --- a/google/cloud/deploy_v1/gapic_version.py +++ b/google/cloud/deploy_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.6.0" # {x-release-please-version} +__version__ = "1.6.1" # {x-release-please-version} diff --git a/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json index bbadce0..b5d5cda 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.deploy.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-deploy", - "version": "0.1.0" + "version": "1.6.1" }, "snippets": [ {