From 0671189e34e70db105875c5928c6c007a677e9cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 3 Nov 2025 12:06:52 +0100 Subject: [PATCH] chore: add backward compatibility in CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Sébastien Han --- .github/workflows/conformance.yml | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index d1ee4473f..112e4a408 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -111,16 +111,27 @@ jobs: exit 1 fi - # Check base branch - if [ -f "base/docs/static/stable-llama-stack-spec.json" ]; then - echo "✓ Found stable API spec in base branch" - BASE_SPEC="base/docs/static/stable-llama-stack-spec.json" - elif [ -f "base/docs/static/llama-stack-spec.json" ]; then - echo "✓ Found monolithic API spec in base branch" - BASE_SPEC="base/docs/static/llama-stack-spec.json" + + # Handles old YAML specs + # TODO: remove this once the JSON specs are merged + if [ -f "docs/static/stable-llama-stack-spec.yaml" ]; then + echo "✓ Found legacy YAML format stable API spec in current branch" + BASE_SPEC="docs/static/stable-llama-stack-spec.yaml" + elif [ -f "docs/static/llama-stack-spec.yaml" ]; then + echo "✓ Found legacy YAML format monolithic API spec in current branch" + BASE_SPEC="docs/static/llama-stack-spec.yaml" else - echo "❌ No API specs found in base branch" - exit 1 + echo "No legacy YAML format API specs found in current branch, trying JSON specs" + if [ -f "base/docs/static/stable-llama-stack-spec.json" ]; then + echo "✓ Found stable API spec in base branch" + BASE_SPEC="base/docs/static/stable-llama-stack-spec.json" + elif [ -f "base/docs/static/llama-stack-spec.json" ]; then + echo "✓ Found monolithic API spec in base branch" + BASE_SPEC="base/docs/static/llama-stack-spec.json" + else + echo "❌ No API specs found in base branch" + exit 1 + fi fi # Export for next step