From fa5eb7f1059a98ad87af5ef86419f17bca9fd628 Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 9 Jan 2023 22:50:04 +0000 Subject: [PATCH 1/3] chore(deps): update dependency google-cloud-container to v2.15.0 (#328) --- samples/snippets/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 25d87519..91c15535 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,3 +1,3 @@ -google-cloud-container==2.14.0 +google-cloud-container==2.15.0 backoff==2.2.1 pytest==7.2.0 \ No newline at end of file From 8eeee3bda1e0eaae6fb375b47cc68b959f9b9feb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 9 Jan 2023 22:24:10 -0500 Subject: [PATCH 2/3] feat: Add field for enabled Beta K8s APIs in proto (#329) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add support for python 3.11 chore: Update gapic-generator-python to v1.8.0 PiperOrigin-RevId: 500768693 Source-Link: https://github.com/googleapis/googleapis/commit/190b612e3d0ff8f025875a669e5d68a1446d43c1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/7bf29a414b9ecac3170f0b65bdc2a95705c0ef1a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Add field for enabled Beta K8s APIs in proto --- feat: add etags for cluster and node pool update operations Clients may now optionally specify the previously read etag for a cluster or node pool during update requests. The etag is regenerated every time the object is updated. If an etag is provided, it will be checked against the current etag, and the request will be rejected on mismatch. This is particularly useful for allowing two clients to concurrently update a repeated field without overwriting each other. PiperOrigin-RevId: 500787735 Source-Link: https://github.com/googleapis/googleapis/commit/961d1eeff48d9a955a0ee66035fd31b689d2f035 Source-Link: https://github.com/googleapis/googleapis-gen/commit/6d95a0e2be7fb65cfee8b49a29c0e21acf673195 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNmQ5NWEwZTJiZTdmYjY1Y2ZlZThiNDlhMjljMGUyMWFjZjY3MzE5NSJ9 * 🦉 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/cluster_manager/async_client.py | 2 +- .../services/cluster_manager/client.py | 2 +- .../container_v1/types/cluster_service.py | 25 +++++++ .../services/cluster_manager/async_client.py | 2 +- .../services/cluster_manager/client.py | 2 +- .../types/cluster_service.py | 67 +++++++++++++++++++ .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- scripts/fixup_container_v1beta1_keywords.py | 2 +- setup.py | 2 + testing/constraints-3.12.txt | 6 ++ .../container_v1beta1/test_cluster_manager.py | 8 +++ 12 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 testing/constraints-3.12.txt diff --git a/google/cloud/container_v1/services/cluster_manager/async_client.py b/google/cloud/container_v1/services/cluster_manager/async_client.py index 55c87752..338290bc 100644 --- a/google/cloud/container_v1/services/cluster_manager/async_client.py +++ b/google/cloud/container_v1/services/cluster_manager/async_client.py @@ -137,7 +137,7 @@ def get_mtls_endpoint_and_cert_source( The API endpoint is determined in the following order: (1) if `client_options.api_endpoint` if provided, use the provided one. (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the - default mTLS endpoint; if the environment variabel is "never", use the default API + default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint. diff --git a/google/cloud/container_v1/services/cluster_manager/client.py b/google/cloud/container_v1/services/cluster_manager/client.py index 6d5e6274..ddf1c6f5 100644 --- a/google/cloud/container_v1/services/cluster_manager/client.py +++ b/google/cloud/container_v1/services/cluster_manager/client.py @@ -288,7 +288,7 @@ def get_mtls_endpoint_and_cert_source( The API endpoint is determined in the following order: (1) if `client_options.api_endpoint` if provided, use the provided one. (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the - default mTLS endpoint; if the environment variabel is "never", use the default API + default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint. diff --git a/google/cloud/container_v1/types/cluster_service.py b/google/cloud/container_v1/types/cluster_service.py index 1446d0d1..e9736f69 100644 --- a/google/cloud/container_v1/types/cluster_service.py +++ b/google/cloud/container_v1/types/cluster_service.py @@ -358,6 +358,9 @@ class NodeConfig(proto.Message): [AutoprovisioningNodePoolDefaults][google.container.v1.AutoprovisioningNodePoolDefaults] instead. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: machine_type (str): The name of a Google Compute Engine `machine @@ -716,6 +719,8 @@ class NodeConfig(proto.Message): class AdvancedMachineFeatures(proto.Message): r"""Specifies options for controlling advanced machine features. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: threads_per_core (int): The number of threads per physical core. To @@ -737,6 +742,8 @@ class AdvancedMachineFeatures(proto.Message): class NodeNetworkConfig(proto.Message): r"""Parameters for node pool-level network config. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: create_pod_range (bool): Input only. Whether to create a new range for pod IPs in @@ -799,6 +806,8 @@ class NodeNetworkConfig(proto.Message): class NetworkPerformanceConfig(proto.Message): r"""Configuration of all network bandwidth tiers + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: total_egress_bandwidth_tier (google.cloud.container_v1.types.NodeNetworkConfig.NetworkPerformanceConfig.Tier): Specifies the total network bandwidth tier @@ -1543,6 +1552,9 @@ class MasterAuthorizedNetworksConfig(proto.Message): except traffic from the given CIDR blocks, Google Compute Engine Public IPs and Google Prod IPs. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: enabled (bool): Whether or not master authorized networks is @@ -1865,6 +1877,8 @@ class IPAllocationPolicy(proto.Message): class Cluster(proto.Message): r"""A Google Kubernetes Engine cluster. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: name (str): The name of this cluster. The name must be unique within @@ -2531,6 +2545,9 @@ class ClusterUpdate(proto.Message): update can be applied to a cluster with each request, so at most one field can be provided. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: desired_node_version (str): The Kubernetes version to change the nodes to @@ -4693,6 +4710,9 @@ class UpgradeSettings(proto.Message): 2. node_pool_soak_duration is the soak time after all blue nodes are drained. After this period, the blue pool nodes will be deleted. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: max_surge (int): The maximum number of nodes that can be @@ -5884,6 +5904,8 @@ class CompleteIPRotationRequest(proto.Message): class AcceleratorConfig(proto.Message): r"""AcceleratorConfig represents a Hardware Accelerator request. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: accelerator_count (int): The number of the accelerator cards exposed @@ -5926,6 +5948,9 @@ class GPUSharingConfig(proto.Message): r"""GPUSharingConfig represents the GPU sharing configuration for Hardware Accelerators. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: max_shared_clients_per_gpu (int): The max number of containers that can share a diff --git a/google/cloud/container_v1beta1/services/cluster_manager/async_client.py b/google/cloud/container_v1beta1/services/cluster_manager/async_client.py index 760e7065..861a2814 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/async_client.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/async_client.py @@ -137,7 +137,7 @@ def get_mtls_endpoint_and_cert_source( The API endpoint is determined in the following order: (1) if `client_options.api_endpoint` if provided, use the provided one. (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the - default mTLS endpoint; if the environment variabel is "never", use the default API + default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint. diff --git a/google/cloud/container_v1beta1/services/cluster_manager/client.py b/google/cloud/container_v1beta1/services/cluster_manager/client.py index e2f03357..2b1ada40 100644 --- a/google/cloud/container_v1beta1/services/cluster_manager/client.py +++ b/google/cloud/container_v1beta1/services/cluster_manager/client.py @@ -288,7 +288,7 @@ def get_mtls_endpoint_and_cert_source( The API endpoint is determined in the following order: (1) if `client_options.api_endpoint` if provided, use the provided one. (2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the - default mTLS endpoint; if the environment variabel is "never", use the default API + default mTLS endpoint; if the environment variable is "never", use the default API endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise use the default API endpoint. diff --git a/google/cloud/container_v1beta1/types/cluster_service.py b/google/cloud/container_v1beta1/types/cluster_service.py index d0656135..8a0678be 100644 --- a/google/cloud/container_v1beta1/types/cluster_service.py +++ b/google/cloud/container_v1beta1/types/cluster_service.py @@ -366,6 +366,9 @@ class NodeConfig(proto.Message): [AutoprovisioningNodePoolDefaults][google.container.v1beta1.AutoprovisioningNodePoolDefaults] instead. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: machine_type (str): The name of a Google Compute Engine `machine @@ -733,6 +736,8 @@ class NodeConfig(proto.Message): class AdvancedMachineFeatures(proto.Message): r"""Specifies options for controlling advanced machine features. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: threads_per_core (int): The number of threads per physical core. To @@ -754,6 +759,8 @@ class AdvancedMachineFeatures(proto.Message): class NodeNetworkConfig(proto.Message): r"""Parameters for node pool-level network config. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: create_pod_range (bool): Input only. Whether to create a new range for pod IPs in @@ -816,6 +823,8 @@ class NodeNetworkConfig(proto.Message): class NetworkPerformanceConfig(proto.Message): r"""Configuration of all network bandwidth tiers + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: total_egress_bandwidth_tier (google.cloud.container_v1beta1.types.NodeNetworkConfig.NetworkPerformanceConfig.Tier): Specifies the total network bandwidth tier @@ -1678,6 +1687,9 @@ class MasterAuthorizedNetworksConfig(proto.Message): except traffic from the given CIDR blocks, Google Compute Engine Public IPs and Google Prod IPs. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: enabled (bool): Whether or not master authorized networks is @@ -2111,6 +2123,8 @@ class Type(proto.Enum): class Cluster(proto.Message): r"""A Google Kubernetes Engine cluster. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: name (str): The name of this cluster. The name must be unique within @@ -2439,6 +2453,11 @@ class Cluster(proto.Message): cluster. This field is a member of `oneof`_ ``_protect_config``. + etag (str): + This checksum is computed by the server based + on the value of cluster fields, and may be sent + on update requests to ensure the client has an + up-to-date value before proceeding. """ class Status(proto.Enum): @@ -2778,12 +2797,19 @@ class Status(proto.Enum): optional=True, message="ProtectConfig", ) + etag: str = proto.Field( + proto.STRING, + number=139, + ) class WorkloadConfig(proto.Message): r"""WorkloadConfig defines the flags to enable or disable the workload configurations for the cluster. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: audit_mode (google.cloud.container_v1beta1.types.WorkloadConfig.Mode): Sets which mode of auditing should be used @@ -2812,6 +2838,9 @@ class ProtectConfig(proto.Message): r"""ProtectConfig defines the flags needed to enable/disable features for the Protect API. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: workload_config (google.cloud.container_v1beta1.types.WorkloadConfig): WorkloadConfig defines which actions are @@ -2913,6 +2942,9 @@ class ClusterUpdate(proto.Message): update can be applied to a cluster with each request, so at most one field can be provided. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: desired_node_version (str): The Kubernetes version to change the nodes to @@ -3096,6 +3128,11 @@ class ClusterUpdate(proto.Message): desired_gateway_api_config (google.cloud.container_v1beta1.types.GatewayAPIConfig): The desired config of Gateway API on this cluster. + etag (str): + The current etag of the cluster. + If an etag is provided and does not match the + current etag of the cluster, update will be + blocked and an ABORTED error will be returned. desired_node_pool_logging_config (google.cloud.container_v1beta1.types.NodePoolLoggingConfig): The desired node pool logging configuration defaults for the cluster. @@ -3323,6 +3360,10 @@ class ClusterUpdate(proto.Message): number=114, message="GatewayAPIConfig", ) + etag: str = proto.Field( + proto.STRING, + number=115, + ) desired_node_pool_logging_config: "NodePoolLoggingConfig" = proto.Field( proto.MESSAGE, number=116, @@ -3799,6 +3840,11 @@ class UpdateNodePoolRequest(proto.Message): Confidential VM once enabled. gvnic (google.cloud.container_v1beta1.types.VirtualNIC): Enable or disable gvnic on the node pool. + etag (str): + The current etag of the node pool. + If an etag is provided and does not match the + current etag of the node pool, update will be + blocked and an ABORTED error will be returned. fast_socket (google.cloud.container_v1beta1.types.FastSocket): Enable or disable NCCL fast socket for the node pool. @@ -3900,6 +3946,10 @@ class UpdateNodePoolRequest(proto.Message): number=29, message="VirtualNIC", ) + etag: str = proto.Field( + proto.STRING, + number=30, + ) fast_socket: "FastSocket" = proto.Field( proto.MESSAGE, number=31, @@ -5147,6 +5197,11 @@ class NodePool(proto.Message): update_info (google.cloud.container_v1beta1.types.NodePool.UpdateInfo): Output only. [Output only] Update info contains relevant information during a node pool update. + etag (str): + This checksum is computed by the server based + on the value of node pool fields, and may be + sent on update requests to ensure the client has + an up-to-date value before proceeding. """ class Status(proto.Enum): @@ -5188,6 +5243,9 @@ class UpgradeSettings(proto.Message): 2. node_pool_soak_duration is the soak time after all blue nodes are drained. After this period, the blue pool nodes will be deleted. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: max_surge (int): The maximum number of nodes that can be @@ -5405,6 +5463,10 @@ class Type(proto.Enum): number=109, message=UpdateInfo, ) + etag: str = proto.Field( + proto.STRING, + number=110, + ) class NodeManagement(proto.Message): @@ -6381,6 +6443,8 @@ class CompleteIPRotationRequest(proto.Message): class AcceleratorConfig(proto.Message): r"""AcceleratorConfig represents a Hardware Accelerator request. + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: accelerator_count (int): The number of the accelerator cards exposed @@ -6430,6 +6494,9 @@ class GPUSharingConfig(proto.Message): r"""GPUSharingConfig represents the GPU sharing configuration for Hardware Accelerators. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + Attributes: max_shared_clients_per_gpu (int): The max number of containers that can share a diff --git a/samples/generated_samples/snippet_metadata_google.container.v1.json b/samples/generated_samples/snippet_metadata_google.container.v1.json index db5d85de..34c1cf39 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.15.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json index 69b77990..15a96218 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "2.15.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/scripts/fixup_container_v1beta1_keywords.py b/scripts/fixup_container_v1beta1_keywords.py index 6bb191d0..4284707b 100644 --- a/scripts/fixup_container_v1beta1_keywords.py +++ b/scripts/fixup_container_v1beta1_keywords.py @@ -72,7 +72,7 @@ class containerCallTransformer(cst.CSTTransformer): 'start_ip_rotation': ('project_id', 'zone', 'cluster_id', 'name', 'rotate_credentials', ), 'update_cluster': ('project_id', 'zone', 'cluster_id', 'update', 'name', ), 'update_master': ('project_id', 'zone', 'cluster_id', 'master_version', 'name', ), - 'update_node_pool': ('project_id', 'zone', 'cluster_id', 'node_pool_id', 'node_version', 'image_type', 'locations', 'workload_metadata_config', 'name', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'fast_socket', 'logging_config', 'resource_labels', 'windows_node_config', ), + 'update_node_pool': ('project_id', 'zone', 'cluster_id', 'node_pool_id', 'node_version', 'image_type', 'locations', 'workload_metadata_config', 'name', 'upgrade_settings', 'tags', 'taints', 'labels', 'linux_node_config', 'kubelet_config', 'node_network_config', 'gcfs_config', 'confidential_nodes', 'gvnic', 'etag', 'fast_socket', 'logging_config', 'resource_labels', 'windows_node_config', ), } def leave_Call(self, original: cst.Call, updated: cst.Call) -> cst.CSTNode: diff --git a/setup.py b/setup.py index 2b3fa71a..f2375cb5 100644 --- a/setup.py +++ b/setup.py @@ -38,6 +38,7 @@ dependencies = [ "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", + "proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", ] url = "https://github.com/googleapis/python-container" @@ -77,6 +78,7 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "Operating System :: OS Independent", "Topic :: Internet", ], diff --git a/testing/constraints-3.12.txt b/testing/constraints-3.12.txt new file mode 100644 index 00000000..ed7f9aed --- /dev/null +++ b/testing/constraints-3.12.txt @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# This constraints file is required for unit tests. +# List all library dependencies and extras in this file. +google-api-core +proto-plus +protobuf diff --git a/tests/unit/gapic/container_v1beta1/test_cluster_manager.py b/tests/unit/gapic/container_v1beta1/test_cluster_manager.py index f9d24a4f..9b550989 100644 --- a/tests/unit/gapic/container_v1beta1/test_cluster_manager.py +++ b/tests/unit/gapic/container_v1beta1/test_cluster_manager.py @@ -979,6 +979,7 @@ def test_get_cluster(request_type, transport: str = "grpc"): enable_tpu=True, tpu_ipv4_cidr_block="tpu_ipv4_cidr_block_value", id="id_value", + etag="etag_value", ) response = client.get_cluster(request) @@ -1020,6 +1021,7 @@ def test_get_cluster(request_type, transport: str = "grpc"): assert response.enable_tpu is True assert response.tpu_ipv4_cidr_block == "tpu_ipv4_cidr_block_value" assert response.id == "id_value" + assert response.etag == "etag_value" def test_get_cluster_empty_call(): @@ -1087,6 +1089,7 @@ async def test_get_cluster_async( enable_tpu=True, tpu_ipv4_cidr_block="tpu_ipv4_cidr_block_value", id="id_value", + etag="etag_value", ) ) response = await client.get_cluster(request) @@ -1129,6 +1132,7 @@ async def test_get_cluster_async( assert response.enable_tpu is True assert response.tpu_ipv4_cidr_block == "tpu_ipv4_cidr_block_value" assert response.id == "id_value" + assert response.etag == "etag_value" @pytest.mark.asyncio @@ -5820,6 +5824,7 @@ def test_get_node_pool(request_type, transport: str = "grpc"): status=cluster_service.NodePool.Status.PROVISIONING, status_message="status_message_value", pod_ipv4_cidr_size=1856, + etag="etag_value", ) response = client.get_node_pool(request) @@ -5839,6 +5844,7 @@ def test_get_node_pool(request_type, transport: str = "grpc"): assert response.status == cluster_service.NodePool.Status.PROVISIONING assert response.status_message == "status_message_value" assert response.pod_ipv4_cidr_size == 1856 + assert response.etag == "etag_value" def test_get_node_pool_empty_call(): @@ -5884,6 +5890,7 @@ async def test_get_node_pool_async( status=cluster_service.NodePool.Status.PROVISIONING, status_message="status_message_value", pod_ipv4_cidr_size=1856, + etag="etag_value", ) ) response = await client.get_node_pool(request) @@ -5904,6 +5911,7 @@ async def test_get_node_pool_async( assert response.status == cluster_service.NodePool.Status.PROVISIONING assert response.status_message == "status_message_value" assert response.pod_ipv4_cidr_size == 1856 + assert response.etag == "etag_value" @pytest.mark.asyncio From 184ab13e838c98b526895248bb434bdfe529c2d8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 11 Jan 2023 10:15:17 -0500 Subject: [PATCH 3/3] chore(main): release 2.16.0 (#330) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ google/cloud/container/gapic_version.py | 2 +- google/cloud/container_v1/gapic_version.py | 2 +- google/cloud/container_v1beta1/gapic_version.py | 2 +- .../snippet_metadata_google.container.v1.json | 2 +- .../snippet_metadata_google.container.v1beta1.json | 2 +- 7 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 96a8c91d..7731f20e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.15.0" + ".": "2.16.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1663295a..e49234f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://pypi.org/project/google-cloud-container/#history +## [2.16.0](https://github.com/googleapis/python-container/compare/v2.15.0...v2.16.0) (2023-01-10) + + +### Features + +* Add etags for cluster and node pool update operations ([8eeee3b](https://github.com/googleapis/python-container/commit/8eeee3bda1e0eaae6fb375b47cc68b959f9b9feb)) +* Add support for python 3.11 ([8eeee3b](https://github.com/googleapis/python-container/commit/8eeee3bda1e0eaae6fb375b47cc68b959f9b9feb)) + ## [2.15.0](https://github.com/googleapis/python-container/compare/v2.14.0...v2.15.0) (2023-01-09) diff --git a/google/cloud/container/gapic_version.py b/google/cloud/container/gapic_version.py index 2788e5e5..a2303530 100644 --- a/google/cloud/container/gapic_version.py +++ b/google/cloud/container/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.15.0" # {x-release-please-version} +__version__ = "2.16.0" # {x-release-please-version} diff --git a/google/cloud/container_v1/gapic_version.py b/google/cloud/container_v1/gapic_version.py index 2788e5e5..a2303530 100644 --- a/google/cloud/container_v1/gapic_version.py +++ b/google/cloud/container_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.15.0" # {x-release-please-version} +__version__ = "2.16.0" # {x-release-please-version} diff --git a/google/cloud/container_v1beta1/gapic_version.py b/google/cloud/container_v1beta1/gapic_version.py index 2788e5e5..a2303530 100644 --- a/google/cloud/container_v1beta1/gapic_version.py +++ b/google/cloud/container_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "2.15.0" # {x-release-please-version} +__version__ = "2.16.0" # {x-release-please-version} diff --git a/samples/generated_samples/snippet_metadata_google.container.v1.json b/samples/generated_samples/snippet_metadata_google.container.v1.json index 34c1cf39..734fca89 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "0.1.0" + "version": "2.16.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json index 15a96218..5036ca36 100644 --- a/samples/generated_samples/snippet_metadata_google.container.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.container.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-container", - "version": "0.1.0" + "version": "2.16.0" }, "snippets": [ {