From a90efef06968ddfabce5ef6444983dab278cb458 Mon Sep 17 00:00:00 2001 From: Shubham Pal Date: Tue, 21 Jul 2026 08:45:29 +0000 Subject: [PATCH] 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 --- .../ansible_playbooks/base-integration-test.yml | 13 ++++++++++++- .../ansible_playbooks/slurm-integration-test.yml | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml b/tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml index 9d662375d6..f75e41abc0 100644 --- a/tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml +++ b/tools/cloud-build/daily-tests/ansible_playbooks/base-integration-test.yml @@ -57,8 +57,18 @@ ansible.builtin.include_tasks: file: tasks/create_deployment_directory.yml + - name: Set actual_network variable + ansible.builtin.set_fact: + actual_network: "{% if use_fixed_vpc | default(false) | bool %}{{ test_prefix | default('') }}{{ test_name }}-0{% else %}{{ network }}{% endif %}" + - name: Create Infrastructure and test block: + - name: Clean up any existing PSA resources from previous runs + ansible.builtin.include_tasks: + file: tasks/cleanup_existing_psa.yml + vars: + psa_network: "{{ actual_network }}" + - name: Create Cluster with gcluster register: deployment changed_when: deployment.changed @@ -120,7 +130,7 @@ - "{{ deployment_name }}" - --direction=INGRESS - --priority=1000 - - --network={% if use_fixed_vpc | default(false) %}{{ test_prefix | default('') }}{{ test_name }}-0{% else %}{{ network }}{% endif %} + - --network={{ actual_network }} - --action=ALLOW - --rules=tcp:22 - --source-ranges={{ build_ip.stdout }} @@ -143,6 +153,7 @@ ansible.builtin.add_host: hostname: "{{ remote_ip }}" groups: [remote_host] + actual_network: "{{ actual_network }}" when: (remote_ip | default('')) | ansible.utils.ipaddr != false - name: Wait for host tasks diff --git a/tools/cloud-build/daily-tests/ansible_playbooks/slurm-integration-test.yml b/tools/cloud-build/daily-tests/ansible_playbooks/slurm-integration-test.yml index 4d8b0505a1..43f9512674 100644 --- a/tools/cloud-build/daily-tests/ansible_playbooks/slurm-integration-test.yml +++ b/tools/cloud-build/daily-tests/ansible_playbooks/slurm-integration-test.yml @@ -54,7 +54,7 @@ - name: Set actual network name ansible.builtin.set_fact: - actual_network: "{% if use_fixed_vpc | default(false) %}{{ test_prefix | default('') }}{{ test_name }}-0{% else %}{{ network }}{% endif %}" + actual_network: "{% if use_fixed_vpc | default(false) | bool %}{{ test_prefix | default('') }}{{ test_name }}-0{% else %}{{ network }}{% endif %}" - name: Run Pre Deploy Tasks ansible.builtin.include_tasks: "{{ pre_deploy_task }}"