Skip to content

Commit a90efef

Browse files
committed
fix(validation): Resolve PSA collisions in base tests & fix boolean evaluation
- Apply PSA cleanup and variable scope fixes to `base-integration-test.yml` to resolve collisions in GKE/Lustre tests. - Add `| bool` filter to `use_fixed_vpc` evaluation in both base and Slurm playbooks to ensure string representations of booleans are correctly parsed. - Simplify firewall rule network parameter in base playbook to use `actual_network` directly. Change-Id: I35699c046cb1bdcb837e678f01692929180a3ffc
1 parent c891ffe commit a90efef

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,18 @@
5757
ansible.builtin.include_tasks:
5858
file: tasks/create_deployment_directory.yml
5959

60+
- name: Set actual_network variable
61+
ansible.builtin.set_fact:
62+
actual_network: "{% if use_fixed_vpc | default(false) | bool %}{{ test_prefix | default('') }}{{ test_name }}-0{% else %}{{ network }}{% endif %}"
63+
6064
- name: Create Infrastructure and test
6165
block:
66+
- name: Clean up any existing PSA resources from previous runs
67+
ansible.builtin.include_tasks:
68+
file: tasks/cleanup_existing_psa.yml
69+
vars:
70+
psa_network: "{{ actual_network }}"
71+
6272
- name: Create Cluster with gcluster
6373
register: deployment
6474
changed_when: deployment.changed
@@ -120,7 +130,7 @@
120130
- "{{ deployment_name }}"
121131
- --direction=INGRESS
122132
- --priority=1000
123-
- --network={% if use_fixed_vpc | default(false) %}{{ test_prefix | default('') }}{{ test_name }}-0{% else %}{{ network }}{% endif %}
133+
- --network={{ actual_network }}
124134
- --action=ALLOW
125135
- --rules=tcp:22
126136
- --source-ranges={{ build_ip.stdout }}
@@ -143,6 +153,7 @@
143153
ansible.builtin.add_host:
144154
hostname: "{{ remote_ip }}"
145155
groups: [remote_host]
156+
actual_network: "{{ actual_network }}"
146157
when: (remote_ip | default('')) | ansible.utils.ipaddr != false
147158

148159
- name: Wait for host tasks

tools/cloud-build/daily-tests/ansible_playbooks/slurm-integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
5555
- name: Set actual network name
5656
ansible.builtin.set_fact:
57-
actual_network: "{% if use_fixed_vpc | default(false) %}{{ test_prefix | default('') }}{{ test_name }}-0{% else %}{{ network }}{% endif %}"
57+
actual_network: "{% if use_fixed_vpc | default(false) | bool %}{{ test_prefix | default('') }}{{ test_name }}-0{% else %}{{ network }}{% endif %}"
5858

5959
- name: Run Pre Deploy Tasks
6060
ansible.builtin.include_tasks: "{{ pre_deploy_task }}"

0 commit comments

Comments
 (0)