Skip to content

Commit

Permalink
[Test] Use AVAILABLE_AMIS_OSS_X86 instead of common.OSS_COMMERCIAL_X8…
Browse files Browse the repository at this point in the history
…6 for multi nics test

This avoids false failure when AMIs are not available

Signed-off-by: Hanwen <hanwenli@amazon.com>
  • Loading branch information
hanwen-cluster committed Dec 23, 2024
1 parent a7e23b2 commit 30a2d01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/integration-tests/configs/develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ test-suites:
dimensions:
- regions: ["use1-az1"]
instances: ["c6in.32xlarge"]
oss: {{ common.OSS_COMMERCIAL_X86 }}
oss: {{ AVAILABLE_AMIS_OSS_X86 }}
schedulers: ["slurm"]
networking:
test_cluster_networking.py::test_cluster_in_private_subnet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import logging
import os
from datetime import date
from functools import lru_cache

import yaml
from jinja2 import FileSystemLoader
Expand All @@ -31,7 +30,7 @@ def _get_os_parameters(config=None, args=None):
"""
available_amis_oss_x86 = _get_available_amis_oss("x86", config=config, args=args)
available_amis_oss_arm = _get_available_amis_oss("arm", config=config, args=args)
result = {}
result = {"AVAILABLE_AMIS_OSS_X86": available_amis_oss_x86, "AVAILABLE_AMIS_OSS_ARM": available_amis_oss_arm}
today_number = (date.today() - date(2020, 1, 1)).days
for index in range(len(SUPPORTED_OSES)):
result[f"OS_X86_{index}"] = available_amis_oss_x86[(today_number + index) % len(available_amis_oss_x86)]
Expand Down Expand Up @@ -115,7 +114,6 @@ def dump_rendered_config_file(config):
return yaml.dump(config, default_flow_style=False)


@lru_cache(maxsize=None)
def _render_config_file(config_file, **kwargs):
"""
Apply Jinja rendering to the specified config file.
Expand Down

0 comments on commit 30a2d01

Please sign in to comment.