From 24d09d17c3ac7f6cda178ce0b6f373da68918833 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sun, 9 Oct 2022 05:10:15 +0000 Subject: [PATCH 1/8] tests: fixing more fixed tests - gcp_compute_ssl_certificate: region is not a supported parameter. --- plugins/modules/gcp_compute_ssl_certificate.py | 1 - .../integration/targets/gcp_compute_ssl_certificate/aliases | 3 +-- .../targets/gcp_compute_ssl_certificate/tasks/autogen.yml | 5 ----- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/modules/gcp_compute_ssl_certificate.py b/plugins/modules/gcp_compute_ssl_certificate.py index 5d0ef0f..15ddaba 100644 --- a/plugins/modules/gcp_compute_ssl_certificate.py +++ b/plugins/modules/gcp_compute_ssl_certificate.py @@ -133,7 +133,6 @@ EXAMPLES = ''' - name: create a SSL certificate google.cloud.gcp_compute_ssl_certificate: name: test_object - region: us-central1 description: A certificate for testing. Do not use this certificate in production certificate: |- -----BEGIN CERTIFICATE----- diff --git a/tests/integration/targets/gcp_compute_ssl_certificate/aliases b/tests/integration/targets/gcp_compute_ssl_certificate/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_compute_ssl_certificate/aliases +++ b/tests/integration/targets/gcp_compute_ssl_certificate/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file diff --git a/tests/integration/targets/gcp_compute_ssl_certificate/tasks/autogen.yml b/tests/integration/targets/gcp_compute_ssl_certificate/tasks/autogen.yml index 911bc63..a8346cd 100644 --- a/tests/integration/targets/gcp_compute_ssl_certificate/tasks/autogen.yml +++ b/tests/integration/targets/gcp_compute_ssl_certificate/tasks/autogen.yml @@ -16,7 +16,6 @@ - name: delete a SSL certificate google.cloud.gcp_compute_ssl_certificate: name: "{{ resource_name }}" - region: us-central1 description: A certificate for testing. Do not use this certificate in production certificate: |- -----BEGIN CERTIFICATE----- @@ -50,7 +49,6 @@ - name: create a SSL certificate google.cloud.gcp_compute_ssl_certificate: name: "{{ resource_name }}" - region: us-central1 description: A certificate for testing. Do not use this certificate in production certificate: |- -----BEGIN CERTIFICATE----- @@ -103,7 +101,6 @@ - name: create a SSL certificate that already exists google.cloud.gcp_compute_ssl_certificate: name: "{{ resource_name }}" - region: us-central1 description: A certificate for testing. Do not use this certificate in production certificate: |- -----BEGIN CERTIFICATE----- @@ -142,7 +139,6 @@ - name: delete a SSL certificate google.cloud.gcp_compute_ssl_certificate: name: "{{ resource_name }}" - region: us-central1 description: A certificate for testing. Do not use this certificate in production certificate: |- -----BEGIN CERTIFICATE----- @@ -195,7 +191,6 @@ - name: delete a SSL certificate that does not exist google.cloud.gcp_compute_ssl_certificate: name: "{{ resource_name }}" - region: us-central1 description: A certificate for testing. Do not use this certificate in production certificate: |- -----BEGIN CERTIFICATE----- From f1f41177e4bd71f418e2407ca479150ecb113d31 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sun, 9 Oct 2022 05:27:18 +0000 Subject: [PATCH 2/8] tests: fixing gcp_iam_service_account there was a hardcoded GCP project for testing purposes. --- .../targets/gcp_iam_service_account/aliases | 3 +-- .../gcp_iam_service_account/tasks/autogen.yml | 14 +++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/integration/targets/gcp_iam_service_account/aliases b/tests/integration/targets/gcp_iam_service_account/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_iam_service_account/aliases +++ b/tests/integration/targets/gcp_iam_service_account/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file diff --git a/tests/integration/targets/gcp_iam_service_account/tasks/autogen.yml b/tests/integration/targets/gcp_iam_service_account/tasks/autogen.yml index 9c70ab3..e511e99 100644 --- a/tests/integration/targets/gcp_iam_service_account/tasks/autogen.yml +++ b/tests/integration/targets/gcp_iam_service_account/tasks/autogen.yml @@ -15,7 +15,7 @@ # Pre-test setup - name: delete a service account google.cloud.gcp_iam_service_account: - name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com + name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com display_name: My Ansible test key project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" @@ -24,7 +24,7 @@ #---------------------------------------------------------- - name: create a service account google.cloud.gcp_iam_service_account: - name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com + name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com display_name: My Ansible test key project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" @@ -46,11 +46,11 @@ - name: verify that command succeeded assert: that: - - results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com.*") | list | length == 1 + - results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com.*") | list | length == 1 # ---------------------------------------------------------------------------- - name: create a service account that already exists google.cloud.gcp_iam_service_account: - name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com + name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com display_name: My Ansible test key project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" @@ -64,7 +64,7 @@ #---------------------------------------------------------- - name: delete a service account google.cloud.gcp_iam_service_account: - name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com + name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com display_name: My Ansible test key project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" @@ -86,11 +86,11 @@ - name: verify that command succeeded assert: that: - - results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com.*") | list | length == 0 + - results['resources'] | map(attribute='name') | select("match", ".*sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com.*") | list | length == 0 # ---------------------------------------------------------------------------- - name: delete a service account that does not exist google.cloud.gcp_iam_service_account: - name: sa-{{ resource_name.split("-")[-1] }}@graphite-playground.google.com.iam.gserviceaccount.com + name: sa-{{ resource_name.split("-")[-1] }}@{{ gcp_project }}.iam.gserviceaccount.com display_name: My Ansible test key project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" From 1a753eff05a85ff1de1147c16f99ef2f63af2d85 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sun, 9 Oct 2022 05:45:37 +0000 Subject: [PATCH 3/8] tests: fix key_ring and redis - gcp_key_ring was already passing, needed to be enabled. - gcp_redis_instance was using legacy networks, switch to net networks. --- scripts/bootstrap-project.sh | 1 + tests/integration/targets/gcp_kms_key_ring/aliases | 3 +-- tests/integration/targets/gcp_mlengine_version/aliases | 2 +- tests/integration/targets/gcp_redis_instance/aliases | 3 +-- tests/integration/targets/gcp_redis_instance/tasks/autogen.yml | 2 ++ 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/bootstrap-project.sh b/scripts/bootstrap-project.sh index 0bce608..924d713 100755 --- a/scripts/bootstrap-project.sh +++ b/scripts/bootstrap-project.sh @@ -21,6 +21,7 @@ SERVICE_LIST=( "dns" "file.googleapis.com" "ml.googleapis.com" + "redis.googleapis.com" "runtimeconfig.googleapis.com" "sourcerepo.googleapis.com" "spanner.googleapis.com" diff --git a/tests/integration/targets/gcp_kms_key_ring/aliases b/tests/integration/targets/gcp_kms_key_ring/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_kms_key_ring/aliases +++ b/tests/integration/targets/gcp_kms_key_ring/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file diff --git a/tests/integration/targets/gcp_mlengine_version/aliases b/tests/integration/targets/gcp_mlengine_version/aliases index 9812f01..ff7eb2d 100644 --- a/tests/integration/targets/gcp_mlengine_version/aliases +++ b/tests/integration/targets/gcp_mlengine_version/aliases @@ -1,2 +1,2 @@ cloud/gcp -unsupported +unsupported \ No newline at end of file diff --git a/tests/integration/targets/gcp_redis_instance/aliases b/tests/integration/targets/gcp_redis_instance/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_redis_instance/aliases +++ b/tests/integration/targets/gcp_redis_instance/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file diff --git a/tests/integration/targets/gcp_redis_instance/tasks/autogen.yml b/tests/integration/targets/gcp_redis_instance/tasks/autogen.yml index 3580c1a..9980558 100644 --- a/tests/integration/targets/gcp_redis_instance/tasks/autogen.yml +++ b/tests/integration/targets/gcp_redis_instance/tasks/autogen.yml @@ -19,6 +19,7 @@ project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" + auto_create_subnetworks: true state: present register: network - name: delete a instance @@ -165,6 +166,7 @@ project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" + auto_create_subnetworks: true state: absent register: network ignore_errors: true From cfbc4d8be516ab6a7f97efb08d985bb71b461b64 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sun, 9 Oct 2022 06:07:25 +0000 Subject: [PATCH 4/8] tests: cleaning up resourcemanager, enabling spanner - gcp_spanner_instance works, enabling for CI. - gcp_resourcemanager_project is running into quota issues for listing the API to verify state. Adding a to-do as well as removing some people-specific names. --- plugins/modules/gcp_resourcemanager_project.py | 2 +- scripts/bootstrap-project.sh | 1 + .../targets/gcp_resourcemanager_project/aliases | 2 +- .../gcp_resourcemanager_project/tasks/autogen.yml | 10 +++++----- .../targets/gcp_serviceusage_service/tasks/autogen.yml | 5 +++++ tests/integration/targets/gcp_spanner_instance/aliases | 3 +-- 6 files changed, 14 insertions(+), 9 deletions(-) diff --git a/plugins/modules/gcp_resourcemanager_project.py b/plugins/modules/gcp_resourcemanager_project.py index 41664bf..9cae5f0 100644 --- a/plugins/modules/gcp_resourcemanager_project.py +++ b/plugins/modules/gcp_resourcemanager_project.py @@ -134,7 +134,7 @@ EXAMPLES = ''' - name: create a project google.cloud.gcp_resourcemanager_project: name: My Sample Project - id: alextest-{{ 10000000000 | random }} + id: ansible-test-{{ 10000000000 | random }} auth_kind: serviceaccount service_account_file: "/tmp/auth.pem" parent: diff --git a/scripts/bootstrap-project.sh b/scripts/bootstrap-project.sh index 924d713..2cf6cd9 100755 --- a/scripts/bootstrap-project.sh +++ b/scripts/bootstrap-project.sh @@ -33,6 +33,7 @@ SERVICE_LIST=( REQUIRED_ROLE_LIST=( "roles/storage.objectAdmin" "roles/source.admin" + "roles/resourcemanager.projects.create" ) for SERVICE in "${SERVICE_LIST[@]}"; do diff --git a/tests/integration/targets/gcp_resourcemanager_project/aliases b/tests/integration/targets/gcp_resourcemanager_project/aliases index 9812f01..ff7eb2d 100644 --- a/tests/integration/targets/gcp_resourcemanager_project/aliases +++ b/tests/integration/targets/gcp_resourcemanager_project/aliases @@ -1,2 +1,2 @@ cloud/gcp -unsupported +unsupported \ No newline at end of file diff --git a/tests/integration/targets/gcp_resourcemanager_project/tasks/autogen.yml b/tests/integration/targets/gcp_resourcemanager_project/tasks/autogen.yml index 81043b0..5e02c41 100644 --- a/tests/integration/targets/gcp_resourcemanager_project/tasks/autogen.yml +++ b/tests/integration/targets/gcp_resourcemanager_project/tasks/autogen.yml @@ -16,7 +16,7 @@ - name: delete a project google.cloud.gcp_resourcemanager_project: name: My Sample Project - id: alextest-{{ 10000000000 | random }} + id: ansible-test-{{ 10000000000 | random }} auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" parent: @@ -27,7 +27,7 @@ - name: create a project google.cloud.gcp_resourcemanager_project: name: My Sample Project - id: alextest-{{ 10000000000 | random }} + id: ansible-test-{{ 10000000000 | random }} auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" parent: @@ -55,7 +55,7 @@ - name: create a project that already exists google.cloud.gcp_resourcemanager_project: name: My Sample Project - id: alextest-{{ 10000000000 | random }} + id: ansible-test-{{ 10000000000 | random }} auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" parent: @@ -71,7 +71,7 @@ - name: delete a project google.cloud.gcp_resourcemanager_project: name: My Sample Project - id: alextest-{{ 10000000000 | random }} + id: ansible-test-{{ 10000000000 | random }} auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" parent: @@ -99,7 +99,7 @@ - name: delete a project that does not exist google.cloud.gcp_resourcemanager_project: name: My Sample Project - id: alextest-{{ 10000000000 | random }} + id: ansible-test-{{ 10000000000 | random }} auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" parent: diff --git a/tests/integration/targets/gcp_serviceusage_service/tasks/autogen.yml b/tests/integration/targets/gcp_serviceusage_service/tasks/autogen.yml index 473a198..6db1573 100644 --- a/tests/integration/targets/gcp_serviceusage_service/tasks/autogen.yml +++ b/tests/integration/targets/gcp_serviceusage_service/tasks/autogen.yml @@ -71,6 +71,11 @@ assert: that: - result.changed == true +# TODO(@toumorokoshi): investigate if the pause helps +# prevent quota issues. +# - name: Pause for 1 minute to keep from hitting quota limit +# ansible.builtin.pause: +# minutes: 1 - name: verify that service was deleted google.cloud.gcp_serviceusage_service_info: project: "{{ gcp_project }}" diff --git a/tests/integration/targets/gcp_spanner_instance/aliases b/tests/integration/targets/gcp_spanner_instance/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_spanner_instance/aliases +++ b/tests/integration/targets/gcp_spanner_instance/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file From d03d7beda201353546ef26d94ef4c0e9c6e90b5b Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sun, 9 Oct 2022 06:15:24 +0000 Subject: [PATCH 5/8] tests: fix gcp_storage_bucket test - gcp_storage_bucket had a hard-coded bucket name. Making it based on the GCP project name to allow some attribution in the case of garbage detection. --- tests/integration/targets/gcp_storage_bucket/aliases | 3 +-- .../targets/gcp_storage_bucket/defaults/main.yml | 2 +- .../targets/gcp_storage_bucket/tasks/autogen.yml | 10 +++++----- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/integration/targets/gcp_storage_bucket/aliases b/tests/integration/targets/gcp_storage_bucket/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_storage_bucket/aliases +++ b/tests/integration/targets/gcp_storage_bucket/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file diff --git a/tests/integration/targets/gcp_storage_bucket/defaults/main.yml b/tests/integration/targets/gcp_storage_bucket/defaults/main.yml index ba66644..10f1ec1 100644 --- a/tests/integration/targets/gcp_storage_bucket/defaults/main.yml +++ b/tests/integration/targets/gcp_storage_bucket/defaults/main.yml @@ -1,2 +1,2 @@ --- -resource_name: "{{ resource_prefix }}" +resource_name: "{{ gcp_project }}-ansible-test-bucket" diff --git a/tests/integration/targets/gcp_storage_bucket/tasks/autogen.yml b/tests/integration/targets/gcp_storage_bucket/tasks/autogen.yml index c82302e..b6d83e4 100644 --- a/tests/integration/targets/gcp_storage_bucket/tasks/autogen.yml +++ b/tests/integration/targets/gcp_storage_bucket/tasks/autogen.yml @@ -15,7 +15,7 @@ # Pre-test setup - name: delete a bucket google.cloud.gcp_storage_bucket: - name: ansible-storage-module + name: "{{ resource_name }}" project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" @@ -23,7 +23,7 @@ #---------------------------------------------------------- - name: create a bucket google.cloud.gcp_storage_bucket: - name: ansible-storage-module + name: "{{ resource_name }}" project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" @@ -36,7 +36,7 @@ # ---------------------------------------------------------------------------- - name: create a bucket that already exists google.cloud.gcp_storage_bucket: - name: ansible-storage-module + name: "{{ resource_name }}" project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" @@ -49,7 +49,7 @@ #---------------------------------------------------------- - name: delete a bucket google.cloud.gcp_storage_bucket: - name: ansible-storage-module + name: "{{ resource_name }}" project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" @@ -62,7 +62,7 @@ # ---------------------------------------------------------------------------- - name: delete a bucket that does not exist google.cloud.gcp_storage_bucket: - name: ansible-storage-module + name: "{{ resource_name }}" project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" From d8c1d2f8b8f0e5dd39fd94d4f346738a8c892df0 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Sun, 9 Oct 2022 06:34:12 +0000 Subject: [PATCH 6/8] tests: fix gcp_tpu_node test - gcp_tpu_node was using an old TensorFlow version, as well as using a popular TPU variant (3-8) in a zone that had a capacity limit. Both have been updated to working values. --- scripts/bootstrap-project.sh | 1 - .../integration/targets/gcp_tpu_node/aliases | 3 +-- .../targets/gcp_tpu_node/tasks/autogen.yml | 20 +++++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/scripts/bootstrap-project.sh b/scripts/bootstrap-project.sh index 2cf6cd9..924d713 100755 --- a/scripts/bootstrap-project.sh +++ b/scripts/bootstrap-project.sh @@ -33,7 +33,6 @@ SERVICE_LIST=( REQUIRED_ROLE_LIST=( "roles/storage.objectAdmin" "roles/source.admin" - "roles/resourcemanager.projects.create" ) for SERVICE in "${SERVICE_LIST[@]}"; do diff --git a/tests/integration/targets/gcp_tpu_node/aliases b/tests/integration/targets/gcp_tpu_node/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_tpu_node/aliases +++ b/tests/integration/targets/gcp_tpu_node/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file diff --git a/tests/integration/targets/gcp_tpu_node/tasks/autogen.yml b/tests/integration/targets/gcp_tpu_node/tasks/autogen.yml index 4f00836..eeadf54 100644 --- a/tests/integration/targets/gcp_tpu_node/tasks/autogen.yml +++ b/tests/integration/targets/gcp_tpu_node/tasks/autogen.yml @@ -17,8 +17,8 @@ google.cloud.gcp_tpu_node: name: "{{ resource_name }}" zone: us-central1-b - accelerator_type: v3-8 - tensorflow_version: '1.11' + accelerator_type: v2-8 + tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" @@ -29,8 +29,8 @@ google.cloud.gcp_tpu_node: name: "{{ resource_name }}" zone: us-central1-b - accelerator_type: v3-8 - tensorflow_version: '1.11' + accelerator_type: v2-8 + tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" @@ -59,8 +59,8 @@ google.cloud.gcp_tpu_node: name: "{{ resource_name }}" zone: us-central1-b - accelerator_type: v3-8 - tensorflow_version: '1.11' + accelerator_type: v2-8 + tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" @@ -76,8 +76,8 @@ google.cloud.gcp_tpu_node: name: "{{ resource_name }}" zone: us-central1-b - accelerator_type: v3-8 - tensorflow_version: '1.11' + accelerator_type: v2-8 + tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" @@ -106,8 +106,8 @@ google.cloud.gcp_tpu_node: name: "{{ resource_name }}" zone: us-central1-b - accelerator_type: v3-8 - tensorflow_version: '1.11' + accelerator_type: v2-8 + tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" From 3aa8682d5fb178ff4cf4697a440a29c438302e90 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Mon, 10 Oct 2022 18:50:27 +0000 Subject: [PATCH 7/8] tests: enable forwarding_rule, disable global version the wrong forwarding rule was turned on, while the correct one was turned off. --- tests/integration/targets/gcp_compute_forwarding_rule/aliases | 3 +-- .../targets/gcp_compute_global_forwarding_rule/aliases | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/targets/gcp_compute_forwarding_rule/aliases b/tests/integration/targets/gcp_compute_forwarding_rule/aliases index 9812f01..0e4419e 100644 --- a/tests/integration/targets/gcp_compute_forwarding_rule/aliases +++ b/tests/integration/targets/gcp_compute_forwarding_rule/aliases @@ -1,2 +1 @@ -cloud/gcp -unsupported +cloud/gcp \ No newline at end of file diff --git a/tests/integration/targets/gcp_compute_global_forwarding_rule/aliases b/tests/integration/targets/gcp_compute_global_forwarding_rule/aliases index 0e4419e..ff7eb2d 100644 --- a/tests/integration/targets/gcp_compute_global_forwarding_rule/aliases +++ b/tests/integration/targets/gcp_compute_global_forwarding_rule/aliases @@ -1 +1,2 @@ -cloud/gcp \ No newline at end of file +cloud/gcp +unsupported \ No newline at end of file From 3f6a50208d46befa46793d3abc4bd93d64cb9436 Mon Sep 17 00:00:00 2001 From: Yusuke Tsutsumi Date: Mon, 10 Oct 2022 20:33:23 +0000 Subject: [PATCH 8/8] tests: changing gcp_tpu_node side v2-8 seems to be in high demand causing test failures. changing it to v2-32 seems to pass more consistently. --- .../targets/gcp_tpu_node/tasks/autogen.yml | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/integration/targets/gcp_tpu_node/tasks/autogen.yml b/tests/integration/targets/gcp_tpu_node/tasks/autogen.yml index eeadf54..e44d632 100644 --- a/tests/integration/targets/gcp_tpu_node/tasks/autogen.yml +++ b/tests/integration/targets/gcp_tpu_node/tasks/autogen.yml @@ -16,8 +16,8 @@ - name: delete a node google.cloud.gcp_tpu_node: name: "{{ resource_name }}" - zone: us-central1-b - accelerator_type: v2-8 + zone: us-central1-a + accelerator_type: "v2-32" tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}" @@ -28,8 +28,8 @@ - name: create a node google.cloud.gcp_tpu_node: name: "{{ resource_name }}" - zone: us-central1-b - accelerator_type: v2-8 + zone: us-central1-a + accelerator_type: "v2-32" tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}" @@ -43,7 +43,7 @@ - result.changed == true - name: verify that node was created google.cloud.gcp_tpu_node_info: - zone: us-central1-b + zone: us-central1-a project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" @@ -58,8 +58,8 @@ - name: create a node that already exists google.cloud.gcp_tpu_node: name: "{{ resource_name }}" - zone: us-central1-b - accelerator_type: v2-8 + zone: us-central1-a + accelerator_type: "v2-32" tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}" @@ -75,8 +75,8 @@ - name: delete a node google.cloud.gcp_tpu_node: name: "{{ resource_name }}" - zone: us-central1-b - accelerator_type: v2-8 + zone: us-central1-a + accelerator_type: "v2-32" tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}" @@ -90,7 +90,7 @@ - result.changed == true - name: verify that node was deleted google.cloud.gcp_tpu_node_info: - zone: us-central1-b + zone: us-central1-a project: "{{ gcp_project }}" auth_kind: "{{ gcp_cred_kind }}" service_account_file: "{{ gcp_cred_file }}" @@ -105,8 +105,8 @@ - name: delete a node that does not exist google.cloud.gcp_tpu_node: name: "{{ resource_name }}" - zone: us-central1-b - accelerator_type: v2-8 + zone: us-central1-a + accelerator_type: "v2-32" tensorflow_version: '2.10.0' cidr_block: 10.2.0.0/29 project: "{{ gcp_project }}"