Skip to content

Commit 682fdef

Browse files
committed
feat(api): ensure StackRunConfig
StackRunConfig is part of our public API, ensure stability of this datatype using a pytest snapshot test. If the pydantic model changes, it will fail. Signed-off-by: Charlie Doern <cdoern@redhat.com>
1 parent 48a551e commit 682fdef

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.github/workflows/conformance.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,7 @@ jobs:
6969
oasdiff breaking --fail-on ERR base/docs/_static/llama-stack-spec.yaml docs/_static/llama-stack-spec.yaml --match-path '^/v1/openai/v1' \
7070
--match-path '^/v1/vector-io' \
7171
--match-path '^/v1/vector-dbs'
72+
73+
- name: Run Pydantic Model Test
74+
run: |
75+
python ./scripts/pydantic-diff.py

scripts/pydantic-diff.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
from llama_stack.core.datatypes import StackRunConfig
2+
3+
def test_build_config_v1_schema_is_unchanged(snapshot):
4+
"""
5+
Ensures the V1 schema never changes.
6+
"""
7+
snapshot.assert_match(
8+
StackRunConfig.model_json_schema(), 'stored_build_config_v1_schema.json'
9+
)

0 commit comments

Comments
 (0)