From c1fccbb88e4b3a177a9834dd302d9d68172cbf7c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 7 Mar 2022 22:27:09 +0100 Subject: [PATCH 1/5] chore(deps): update dependency google-cloud-container to v2.10.6 (#207) --- 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 66866c5a..5c2e68e5 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,3 +1,3 @@ -google-cloud-container==2.10.5 +google-cloud-container==2.10.6 backoff==1.11.1 pytest==7.0.1 \ No newline at end of file From 37950317451df2015fe69b126f7df69c2ee48d6b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sun, 13 Mar 2022 21:15:37 +0100 Subject: [PATCH 2/5] chore(deps): update dependency pytest to v7.1.0 (#209) --- 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 5c2e68e5..8e73b527 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,3 +1,3 @@ google-cloud-container==2.10.6 backoff==1.11.1 -pytest==7.0.1 \ No newline at end of file +pytest==7.1.0 \ No newline at end of file From 260108196d290b1ee091ac151bdd6edc9aef32ab Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 19 Mar 2022 11:57:34 +0100 Subject: [PATCH 3/5] chore(deps): update dependency pytest to v7.1.1 (#211) --- 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 8e73b527..cba90b27 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1,3 +1,3 @@ google-cloud-container==2.10.6 backoff==1.11.1 -pytest==7.1.0 \ No newline at end of file +pytest==7.1.1 \ No newline at end of file From 529bcbf618858aab17b6f5e86d25069a1266860a Mon Sep 17 00:00:00 2001 From: Shabir Mohamed Abdul Samadh <7249208+Shabirmean@users.noreply.github.com> Date: Mon, 21 Mar 2022 21:08:38 -0400 Subject: [PATCH 4/5] fix: test cleanup stages with try finally (#212) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: test cleanup stages with try finally * 🦉 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 --- samples/snippets/create_cluster_test.py | 32 +++++++++++++------------ 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/samples/snippets/create_cluster_test.py b/samples/snippets/create_cluster_test.py index a06ab2c5..728c0750 100644 --- a/samples/snippets/create_cluster_test.py +++ b/samples/snippets/create_cluster_test.py @@ -37,21 +37,23 @@ def setup_and_tear_down() -> None: # run the tests here yield - # delete the cluster - client = gke.ClusterManagerClient() - cluster_location = client.common_location_path(PROJECT_ID, ZONE) - cluster_name = f"{cluster_location}/clusters/{CLUSTER_NAME}" - op = client.delete_cluster({"name": cluster_name}) - op_id = f"{cluster_location}/operations/{op.name}" - - # schedule a retry to ensure the cluster is deleted - @backoff.on_predicate( - backoff.expo, lambda x: x != gke.Operation.Status.DONE, max_tries=20 - ) - def wait_for_delete() -> gke.Operation.Status: - return client.get_operation({"name": op_id}).status - - wait_for_delete() + try: + # delete the cluster + client = gke.ClusterManagerClient() + cluster_location = client.common_location_path(PROJECT_ID, ZONE) + cluster_name = f"{cluster_location}/clusters/{CLUSTER_NAME}" + op = client.delete_cluster({"name": cluster_name}) + op_id = f"{cluster_location}/operations/{op.name}" + + finally: + # schedule a retry to ensure the cluster is deleted + @backoff.on_predicate( + backoff.expo, lambda x: x != gke.Operation.Status.DONE, max_tries=20 + ) + def wait_for_delete() -> gke.Operation.Status: + return client.get_operation({"name": op_id}).status + + wait_for_delete() def test_create_clusters(capsys: object) -> None: From 55a656652e9f0d93ec096b751b6dab60dba8b60a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 22:28:46 -0400 Subject: [PATCH 5/5] chore(main): release 2.10.7 (#213) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 590a88d2..4e359255 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-container/#history +### [2.10.7](https://github.com/googleapis/python-container/compare/v2.10.6...v2.10.7) (2022-03-22) + + +### Bug Fixes + +* test cleanup stages with try finally ([#212](https://github.com/googleapis/python-container/issues/212)) ([529bcbf](https://github.com/googleapis/python-container/commit/529bcbf618858aab17b6f5e86d25069a1266860a)) + ### [2.10.6](https://github.com/googleapis/python-container/compare/v2.10.5...v2.10.6) (2022-03-07) diff --git a/setup.py b/setup.py index f04272b5..045f45aa 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ name = "google-cloud-container" description = "Google Container Engine API client library" -version = "2.10.6" +version = "2.10.7" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta'