From 5513f82bf691cbef2b8d8e8b2e6b1bb41217325a Mon Sep 17 00:00:00 2001 From: Hanxuan Zhang Date: Mon, 14 Jul 2025 17:05:30 -0400 Subject: [PATCH 1/2] [Subnet Prioritization] Add the new integ test as part of the daily integration test set --- tests/integration-tests/configs/develop.yaml | 6 ++++++ .../tests/networking/test_cluster_networking.py | 11 +++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/integration-tests/configs/develop.yaml b/tests/integration-tests/configs/develop.yaml index e8a8be7357..67e9c04d68 100644 --- a/tests/integration-tests/configs/develop.yaml +++ b/tests/integration-tests/configs/develop.yaml @@ -340,6 +340,12 @@ test-suites: instances: {{ common.INSTANCES_DEFAULT_X86 }} oss: [{{ OS_X86_1 }}] schedulers: ["slurm"] + test_cluster_networking.py::test_cluster_with_subnet_prioritization: + dimensions: + - regions: [ "us-east-2" ] + instances: [ "t3.large" ] + oss: [ { { OS_X86_1 } } ] + schedulers: [ "slurm" ] test_networking.py::test_public_network_topology: dimensions: - regions: ["af-south-1", "us-gov-east-1", "cn-northwest-1"] diff --git a/tests/integration-tests/tests/networking/test_cluster_networking.py b/tests/integration-tests/tests/networking/test_cluster_networking.py index fccc2ccdde..8149662041 100644 --- a/tests/integration-tests/tests/networking/test_cluster_networking.py +++ b/tests/integration-tests/tests/networking/test_cluster_networking.py @@ -257,13 +257,12 @@ def test_cluster_with_subnet_prioritization( queues = ["queue1", "queue2"] logging.info(f"Public subnets: {public_subnets}") # Check that all instances are launched in the subnet with the highest priority - with soft_assertions(): - for queue in queues: - scheduler_commands.submit_command("sleep 60", nodes=5, partition=queue) - wait_for_num_instances_in_queue(cluster.cfn_name, cluster.region, desired=5, queue=queue) + for queue in queues: + scheduler_commands.submit_command("sleep 60", nodes=5, partition=queue) + wait_for_num_instances_in_queue(cluster.cfn_name, cluster.region, desired=5, queue=queue) - subnet_ids = get_compute_nodes_subnet_ids(cluster.cfn_name, region, node_type="Compute", queue_name=queue) - logging.info(f"Subnets: {subnet_ids}") + subnet_ids = get_compute_nodes_subnet_ids(cluster.cfn_name, region, node_type="Compute", queue_name=queue) + with soft_assertions(): for subnet_id in subnet_ids: assert_that(subnet_id).is_equal_to(public_subnets[0]) From 16387a3a5d58f02c67cf7258f7069414c9bcf4b0 Mon Sep 17 00:00:00 2001 From: Hanxuan Zhang Date: Mon, 14 Jul 2025 17:18:22 -0400 Subject: [PATCH 2/2] [Subnet Prioritization] Fix format issue in develop.yaml --- tests/integration-tests/configs/develop.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration-tests/configs/develop.yaml b/tests/integration-tests/configs/develop.yaml index 67e9c04d68..48b791cf1b 100644 --- a/tests/integration-tests/configs/develop.yaml +++ b/tests/integration-tests/configs/develop.yaml @@ -344,7 +344,7 @@ test-suites: dimensions: - regions: [ "us-east-2" ] instances: [ "t3.large" ] - oss: [ { { OS_X86_1 } } ] + oss: [{{ OS_X86_1 }}] schedulers: [ "slurm" ] test_networking.py::test_public_network_topology: dimensions: