From 2b301d1c2f8ab4e50d2d50377ebc75ea7e891b52 Mon Sep 17 00:00:00 2001 From: Ivan Podkidyshev Date: Mon, 24 Aug 2026 12:53:38 +0200 Subject: [PATCH 1/5] run conf verification command in ci --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b1a2e2fa..e2c89f6f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,6 +77,14 @@ jobs: uv run --locked --python 3.14 --extra dev python -m pytest -vv -m ci_only + - name: Verify common configurations + run: | + output="$(uv run --locked --python 3.14 cloudai verify-configs --tests-dir conf/common/test conf/common/test_scenario)" + printf '%s\n' "$output" + if grep -q '^\[ERROR\]' <<< "$output"; then + exit 1 + fi + smoke: name: Smoke test From 3a12ed9c26e192c5605fe1a9a28f34c1e4bcba57 Mon Sep 17 00:00:00 2001 From: Ivan Podkidyshev Date: Mon, 24 Aug 2026 16:10:28 +0200 Subject: [PATCH 2/5] more verbose error display for verify-configs --- .github/workflows/ci.yml | 7 +------ src/cloudai/cli/cli.py | 2 +- src/cloudai/cli/handlers.py | 14 ++++++++++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2c89f6f7..e6421a39e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,12 +78,7 @@ jobs: uv run --locked --python 3.14 --extra dev python -m pytest -vv -m ci_only - name: Verify common configurations - run: | - output="$(uv run --locked --python 3.14 cloudai verify-configs --tests-dir conf/common/test conf/common/test_scenario)" - printf '%s\n' "$output" - if grep -q '^\[ERROR\]' <<< "$output"; then - exit 1 - fi + run: uv run --locked --python 3.14 cloudai verify-configs --tests-dir conf/common/test conf/common/test_scenario smoke: name: Smoke test diff --git a/src/cloudai/cli/cli.py b/src/cloudai/cli/cli.py index 1d30d01dd..7d56957da 100644 --- a/src/cloudai/cli/cli.py +++ b/src/cloudai/cli/cli.py @@ -268,7 +268,7 @@ def generate_report(system_cfg: Path, tests_dir: Path, scenario_cfg: Path, hook_ def verify_configs(configs_dir: Path, tests_dir: Path): """Verify the configuration TOML files.""" args = argparse.Namespace(configs_dir=configs_dir, tests_dir=tests_dir) - handle_verify_all_configs(args) + exit(1 if handle_verify_all_configs(args) else 0) @main.command() diff --git a/src/cloudai/cli/handlers.py b/src/cloudai/cli/handlers.py index 09de12f85..3aae2e927 100644 --- a/src/cloudai/cli/handlers.py +++ b/src/cloudai/cli/handlers.py @@ -451,13 +451,15 @@ def verify_system_configs(system_tomls: List[Path]) -> int: with _ensure_kube_config_exists(system_toml, content): Parser.parse_system(system_toml) except Exception as e: - logging.debug(f"Failed to parse system config {system_toml}: {e}", exc_info=True) + logging.error(f"Failed to verify system config {system_toml}: {e}") + logging.debug("", exc_info=True) nfailed += 1 else: try: Parser.parse_system(system_toml) except Exception as e: - logging.debug(f"Failed to parse system config {system_toml}: {e}", exc_info=True) + logging.error(f"Failed to verify system config {system_toml}: {e}") + logging.debug("", exc_info=True) nfailed += 1 if nfailed: @@ -477,7 +479,9 @@ def verify_test_configs(test_tomls: List[Path]) -> int: with test_toml.open() as fh: tp.current_file = test_toml tp.load_test_definition(load_test_toml_file(fh, test_toml)) - except Exception: + except Exception as e: + logging.error(f"Failed to verify Test: {test_toml}: {e}") + logging.debug("", exc_info=True) nfailed += 1 if nfailed: @@ -501,7 +505,9 @@ def verify_test_scenarios( hooks = Parser.parse_hooks(hook_tomls, system, {t.name: t for t in hook_tests}) scenario = Parser.parse_test_scenario(scenario_file, system, {t.name: t for t in tests}, hooks) validate_domain_randomization_active(scenario) - except Exception: + except Exception as e: + logging.error(f"Failed to verify Test Scenario: {scenario_file}: {e}") + logging.debug("", exc_info=True) nfailed += 1 if nfailed: From cb392d80118a6e24c58ec7eb91517f77ec0746cf Mon Sep 17 00:00:00 2001 From: Ivan Podkidyshev Date: Mon, 24 Aug 2026 16:24:15 +0200 Subject: [PATCH 3/5] attempt to fix the verify-configs --- .github/workflows/ci.yml | 6 ------ src/cloudai/cli/handlers.py | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6421a39e..925bb3a01 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -77,9 +77,6 @@ jobs: uv run --locked --python 3.14 --extra dev python -m pytest -vv -m ci_only - - name: Verify common configurations - run: uv run --locked --python 3.14 cloudai verify-configs --tests-dir conf/common/test conf/common/test_scenario - smoke: name: Smoke test @@ -118,9 +115,6 @@ jobs: .smoke-venv/bin/cloudai --help - # this checks that all TOMLs are valid, Test Scenarios are checked for _all_ tests - .smoke-venv/bin/cloudai verify-configs conf/ - # this checks that all TOMLs are valid, Test Scenarios are checked _only_ the tests in the specified directory .smoke-venv/bin/cloudai verify-configs --tests-dir conf/common/test conf/common .smoke-venv/bin/cloudai verify-configs --tests-dir conf/release/spcx/l40s/test conf/release/spcx/l40s diff --git a/src/cloudai/cli/handlers.py b/src/cloudai/cli/handlers.py index 3aae2e927..3f46c0286 100644 --- a/src/cloudai/cli/handlers.py +++ b/src/cloudai/cli/handlers.py @@ -495,7 +495,7 @@ def verify_test_configs(test_tomls: List[Path]) -> int: def verify_test_scenarios( scenario_tomls: List[Path], test_tomls: list[Path], hook_tomls: List[Path], hook_test_tomls: list[Path] ) -> int: - system = Mock(spec=System) + system = Mock(spec=System, sol={}) nfailed = 0 for scenario_file in scenario_tomls: logging.debug(f"Verifying Test Scenario: {scenario_file}...") From fa7ec04d3be3a8bc94e4b88f9b4e3a3030e7526d Mon Sep 17 00:00:00 2001 From: Ivan Podkidyshev Date: Mon, 24 Aug 2026 16:26:57 +0200 Subject: [PATCH 4/5] remove redundant installation --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 925bb3a01..f452349c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,8 +105,6 @@ jobs: python -m venv .smoke-venv .smoke-venv/bin/python -m pip install . - .smoke-venv/bin/python -m pip uninstall --yes cloudai - .smoke-venv/bin/python -m pip install --editable . - name: Test commands run: | From c1ce5dd1ccbcd97ca7a5217a8c6de9ddb7e1de51 Mon Sep 17 00:00:00 2001 From: Ivan Podkidyshev Date: Mon, 24 Aug 2026 16:31:38 +0200 Subject: [PATCH 5/5] use proper exit --- src/cloudai/cli/cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cloudai/cli/cli.py b/src/cloudai/cli/cli.py index 7d56957da..071147451 100644 --- a/src/cloudai/cli/cli.py +++ b/src/cloudai/cli/cli.py @@ -268,7 +268,7 @@ def generate_report(system_cfg: Path, tests_dir: Path, scenario_cfg: Path, hook_ def verify_configs(configs_dir: Path, tests_dir: Path): """Verify the configuration TOML files.""" args = argparse.Namespace(configs_dir=configs_dir, tests_dir=tests_dir) - exit(1 if handle_verify_all_configs(args) else 0) + raise click.exceptions.Exit(1 if handle_verify_all_configs(args) else 0) @main.command()