mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-13 14:08:39 +00:00
Some checks failed
SqlStore Integration Tests / test-postgres (3.12) (push) Failing after 0s
SqlStore Integration Tests / test-postgres (3.13) (push) Failing after 0s
Integration Auth Tests / test-matrix (oauth2_token) (push) Failing after 1s
Python Package Build Test / build (3.12) (push) Failing after 1s
Python Package Build Test / build (3.13) (push) Failing after 1s
Integration Tests (Replay) / Integration Tests (, , , client=, ) (push) Failing after 3s
Test External Providers Installed via Module / test-external-providers-from-module (venv) (push) Has been skipped
Vector IO Integration Tests / test-matrix (push) Failing after 5s
API Conformance Tests / check-schema-compatibility (push) Successful in 9s
Test External API and Providers / test-external (venv) (push) Failing after 4s
Unit Tests / unit-tests (3.12) (push) Failing after 4s
Unit Tests / unit-tests (3.13) (push) Failing after 4s
UI Tests / ui-tests (22) (push) Successful in 38s
Pre-commit / pre-commit (push) Successful in 1m27s
# What does this PR do? Allows passing through extra_body parameters to inference providers. With this, we removed the 2 vllm-specific parameters from completions API into `extra_body`. Before/After <img width="1883" height="324" alt="image" src="https://github.com/user-attachments/assets/acb27c08-c748-46c9-b1da-0de64e9908a1" /> closes #2720 ## Test Plan CI and added new test ``` ❯ uv run pytest -s -v tests/integration/ --stack-config=server:starter --inference-mode=record -k 'not( builtin_tool or safety_with_image or code_interpreter or test_rag ) and test_openai_completion_guided_choice' --setup=vllm --suite=base --color=yes Uninstalled 3 packages in 125ms Installed 3 packages in 19ms INFO 2025-10-10 14:29:54,317 tests.integration.conftest:118 tests: Applying setup 'vllm' for suite base INFO 2025-10-10 14:29:54,331 tests.integration.conftest:47 tests: Test stack config type: server (stack_config=server:starter) ============================================================================================================== test session starts ============================================================================================================== platform darwin -- Python 3.12.11, pytest-8.4.2, pluggy-1.6.0 -- /Users/erichuang/projects/llama-stack-1/.venv/bin/python cachedir: .pytest_cache metadata: {'Python': '3.12.11', 'Platform': 'macOS-15.6.1-arm64-arm-64bit', 'Packages': {'pytest': '8.4.2', 'pluggy': '1.6.0'}, 'Plugins': {'anyio': '4.9.0', 'html': '4.1.1', 'socket': '0.7.0', 'asyncio': '1.1.0', 'json-report': '1.5.0', 'timeout': '2.4.0', 'metadata': '3.1.1', 'cov': '6.2.1', 'nbval': '0.11.0'}} rootdir: /Users/erichuang/projects/llama-stack-1 configfile: pyproject.toml plugins: anyio-4.9.0, html-4.1.1, socket-0.7.0, asyncio-1.1.0, json-report-1.5.0, timeout-2.4.0, metadata-3.1.1, cov-6.2.1, nbval-0.11.0 asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function collected 285 items / 284 deselected / 1 selected tests/integration/inference/test_openai_completion.py::test_openai_completion_guided_choice[txt=vllm/Qwen/Qwen3-0.6B] instantiating llama_stack_client Starting llama stack server with config 'starter' on port 8321... Waiting for server at http://localhost:8321... (0.0s elapsed) Waiting for server at http://localhost:8321... (0.5s elapsed) Waiting for server at http://localhost:8321... (5.1s elapsed) Waiting for server at http://localhost:8321... (5.6s elapsed) Waiting for server at http://localhost:8321... (10.1s elapsed) Waiting for server at http://localhost:8321... (10.6s elapsed) Server is ready at http://localhost:8321 llama_stack_client instantiated in 11.773s PASSEDTerminating llama stack server process... Terminating process 98444 and its group... Server process and children terminated gracefully ============================================================================================================= slowest 10 durations ============================================================================================================== 11.88s setup tests/integration/inference/test_openai_completion.py::test_openai_completion_guided_choice[txt=vllm/Qwen/Qwen3-0.6B] 3.02s call tests/integration/inference/test_openai_completion.py::test_openai_completion_guided_choice[txt=vllm/Qwen/Qwen3-0.6B] 0.01s teardown tests/integration/inference/test_openai_completion.py::test_openai_completion_guided_choice[txt=vllm/Qwen/Qwen3-0.6B] ================================================================================================ 1 passed, 284 deselected, 3 warnings in 16.21s ================================================================================================= ```
144 lines
6.1 KiB
YAML
144 lines
6.1 KiB
YAML
# API Conformance Tests
|
|
# This workflow ensures that API changes maintain backward compatibility and don't break existing integrations
|
|
# It runs schema validation and OpenAPI diff checks to catch breaking changes early
|
|
#
|
|
# The workflow handles both monolithic and split API specifications:
|
|
# - If split specs exist (stable/experimental/deprecated), they are stitched together for comparison
|
|
# - If only monolithic spec exists, it is used directly
|
|
# This allows for clean API organization while maintaining robust conformance testing
|
|
|
|
name: API Conformance Tests
|
|
|
|
run-name: Run the API Conformance test suite on the changes.
|
|
|
|
on:
|
|
push:
|
|
branches: [ main ]
|
|
pull_request:
|
|
branches: [ main ]
|
|
types: [opened, synchronize, reopened, edited]
|
|
paths:
|
|
- 'docs/static/llama-stack-spec.yaml' # Legacy monolithic spec
|
|
- 'docs/static/stable-llama-stack-spec.yaml' # Stable APIs spec
|
|
- 'docs/static/experimental-llama-stack-spec.yaml' # Experimental APIs spec
|
|
- 'docs/static/deprecated-llama-stack-spec.yaml' # Deprecated APIs spec
|
|
- 'docs/static/llama-stack-spec.html' # Legacy HTML spec
|
|
- '.github/workflows/conformance.yml' # This workflow itself
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }}
|
|
# Cancel in-progress runs when new commits are pushed to avoid wasting CI resources
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
# Job to check if API schema changes maintain backward compatibility
|
|
check-schema-compatibility:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout PR Code
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# Check if we should skip conformance testing due to breaking changes
|
|
- name: Check if conformance test should be skipped
|
|
id: skip-check
|
|
env:
|
|
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
run: |
|
|
# Skip if title contains "!:" indicating breaking change (like "feat!:")
|
|
if [[ "$PR_TITLE" == *"!:"* ]]; then
|
|
echo "skip=true" >> $GITHUB_OUTPUT
|
|
exit 0
|
|
fi
|
|
|
|
# Get all commits in this PR and check for BREAKING CHANGE footer
|
|
git log --format="%B" ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | \
|
|
grep -q "BREAKING CHANGE:" && echo "skip=true" >> $GITHUB_OUTPUT || echo "skip=false" >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
# Checkout the base branch to compare against (usually main)
|
|
# This allows us to diff the current changes against the previous state
|
|
- name: Checkout Base Branch
|
|
if: steps.skip-check.outputs.skip != 'true'
|
|
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
with:
|
|
ref: ${{ github.event.pull_request.base.ref }}
|
|
path: 'base'
|
|
|
|
# Cache oasdiff to avoid checksum failures and speed up builds
|
|
- name: Cache oasdiff
|
|
if: steps.skip-check.outputs.skip != 'true'
|
|
id: cache-oasdiff
|
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
|
|
with:
|
|
path: ~/oasdiff
|
|
key: oasdiff-${{ runner.os }}
|
|
|
|
# Install oasdiff: https://github.com/oasdiff/oasdiff, a tool for detecting breaking changes in OpenAPI specs.
|
|
- name: Install oasdiff
|
|
if: steps.skip-check.outputs.skip != 'true' && steps.cache-oasdiff.outputs.cache-hit != 'true'
|
|
run: |
|
|
curl -fsSL https://raw.githubusercontent.com/oasdiff/oasdiff/main/install.sh | sh
|
|
cp /usr/local/bin/oasdiff ~/oasdiff
|
|
|
|
# Setup cached oasdiff
|
|
- name: Setup cached oasdiff
|
|
if: steps.skip-check.outputs.skip != 'true' && steps.cache-oasdiff.outputs.cache-hit == 'true'
|
|
run: |
|
|
sudo cp ~/oasdiff /usr/local/bin/oasdiff
|
|
sudo chmod +x /usr/local/bin/oasdiff
|
|
|
|
# Install yq for YAML processing
|
|
- name: Install yq
|
|
run: |
|
|
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
|
|
sudo chmod +x /usr/local/bin/yq
|
|
|
|
# Verify API specs exist for conformance testing
|
|
- name: Check API Specs
|
|
if: steps.skip-check.outputs.skip != 'true'
|
|
run: |
|
|
echo "Checking for API specification files..."
|
|
|
|
# Check current branch
|
|
if [ -f "docs/static/stable-llama-stack-spec.yaml" ]; then
|
|
echo "✓ Found stable API spec in current branch"
|
|
CURRENT_SPEC="docs/static/stable-llama-stack-spec.yaml"
|
|
elif [ -f "docs/static/llama-stack-spec.yaml" ]; then
|
|
echo "✓ Found monolithic API spec in current branch"
|
|
CURRENT_SPEC="docs/static/llama-stack-spec.yaml"
|
|
else
|
|
echo "❌ No API specs found in current branch"
|
|
exit 1
|
|
fi
|
|
|
|
# Check base branch
|
|
if [ -f "base/docs/static/stable-llama-stack-spec.yaml" ]; then
|
|
echo "✓ Found stable API spec in base branch"
|
|
BASE_SPEC="base/docs/static/stable-llama-stack-spec.yaml"
|
|
elif [ -f "base/docs/static/llama-stack-spec.yaml" ]; then
|
|
echo "✓ Found monolithic API spec in base branch"
|
|
BASE_SPEC="base/docs/static/llama-stack-spec.yaml"
|
|
else
|
|
echo "❌ No API specs found in base branch"
|
|
exit 1
|
|
fi
|
|
|
|
# Export for next step
|
|
echo "BASE_SPEC=${BASE_SPEC}" >> $GITHUB_ENV
|
|
echo "CURRENT_SPEC=${CURRENT_SPEC}" >> $GITHUB_ENV
|
|
|
|
echo "Will compare: ${BASE_SPEC} -> ${CURRENT_SPEC}"
|
|
|
|
# Run oasdiff to detect breaking changes in the API specification
|
|
# This step will fail if incompatible changes are detected, preventing breaking changes from being merged
|
|
- name: Run OpenAPI Breaking Change Diff
|
|
if: steps.skip-check.outputs.skip != 'true'
|
|
run: |
|
|
oasdiff breaking --fail-on ERR $BASE_SPEC $CURRENT_SPEC --match-path '^/v1/'
|
|
|
|
# Report when test is skipped
|
|
- name: Report skip reason
|
|
if: steps.skip-check.outputs.skip == 'true'
|
|
run: |
|
|
echo "Conformance test skipped due to breaking change indicator"
|