From b2ab5c28073e29f59eba875fc2c69ef853522b69 Mon Sep 17 00:00:00 2001 From: Charlie Doern Date: Mon, 1 Dec 2025 14:26:35 -0500 Subject: [PATCH] fix: fix `llama stack list` llama stack list was still using build.yaml, convert cmd and tests to just use config.yaml Signed-off-by: Charlie Doern --- src/llama_stack/cli/stack/list_stacks.py | 16 +++++++--------- tests/unit/distribution/test_stack_list.py | 8 +++----- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/llama_stack/cli/stack/list_stacks.py b/src/llama_stack/cli/stack/list_stacks.py index 0153b3391..761332374 100644 --- a/src/llama_stack/cli/stack/list_stacks.py +++ b/src/llama_stack/cli/stack/list_stacks.py @@ -59,19 +59,17 @@ class StackListBuilds(Subcommand): print("No distributions found") return - headers = ["Stack Name", "Source", "Path", "Build Config", "Run Config"] + headers = ["Stack Name", "Source", "Path", "Config"] rows = [] for name, (path, source_type) in sorted(distributions.items()): row = [name, source_type, str(path)] - # Check for build and run config files - # For built-in distributions, configs are named build.yaml and config.yaml - # For custom distributions, configs are named {name}-build.yaml and {name}-config.yaml + # Check for config files + # For built-in distributions, configs are named config.yaml + # For custom distributions, configs are named {name}-config.yaml if source_type == "built-in": - build_config = "Yes" if (path / "build.yaml").exists() else "No" - run_config = "Yes" if (path / "config.yaml").exists() else "No" + config = "Yes" if (path / "config.yaml").exists() else "No" else: - build_config = "Yes" if (path / f"{name}-build.yaml").exists() else "No" - run_config = "Yes" if (path / f"{name}-config.yaml").exists() else "No" - row.extend([build_config, run_config]) + config = "Yes" if (path / f"{name}-config.yaml").exists() else "No" + row.extend([config]) rows.append(row) print_table(rows, headers, separate_rows=True) diff --git a/tests/unit/distribution/test_stack_list.py b/tests/unit/distribution/test_stack_list.py index 7a51ee7e6..eef39bbbc 100644 --- a/tests/unit/distribution/test_stack_list.py +++ b/tests/unit/distribution/test_stack_list.py @@ -31,8 +31,7 @@ def mock_distribs_base_dir(tmp_path): # Create a custom distribution starter_custom = custom_dir / "starter" starter_custom.mkdir() - (starter_custom / "starter-build.yaml").write_text("# build config") - (starter_custom / "starter-config.yaml").write_text("# run config") + (starter_custom / "starter-config.yaml").write_text("# config") return custom_dir @@ -47,8 +46,7 @@ def mock_distro_dir(tmp_path): for distro_name in ["starter", "nvidia", "dell"]: distro_path = distro_dir / distro_name distro_path.mkdir() - (distro_path / "build.yaml").write_text("# build config") - (distro_path / "config.yaml").write_text("# run config") + (distro_path / "config.yaml").write_text("# config") return distro_dir @@ -112,7 +110,7 @@ class TestStackList: # Add a hidden directory hidden_dir = mock_distro_dir / ".hidden" hidden_dir.mkdir() - (hidden_dir / "build.yaml").write_text("# build") + (hidden_dir / "config.yaml").write_text("# config") # Add a __pycache__ directory pycache_dir = mock_distro_dir / "__pycache__"