feat(ci): add OpenAI API spec conformance tracking#2197
Open
m-misiura wants to merge 3 commits into
Open
Conversation
Collaborator
|
Thanks @m-misiura. few things worth reconsidering before this lands:
|
Contributor
Author
Hi @Pouyanpi As always, many thanks for the very useful feedback. Correspondingly:
I will work on those changes accordingly. |
Collaborator
|
Thank you @m-misiura . it sounds good, plan works for me. I think we should keep the upstream ref pinned for the gating check (let the weekly job track master and flag drift) 👍🏻 |
|
|
||
|
|
||
| def _fetch_openai_spec(url: str = OPENAI_SPEC_URL) -> Path: | ||
| tmp = Path(tempfile.mktemp(suffix=".yml")) |
| from nemoguardrails.server.api import app | ||
|
|
||
| spec = app.openapi() | ||
| tmp = Path(tempfile.mktemp(suffix=".yml")) |
Contributor
Author
Ack, thanks @Pouyanpi. Let me know what you think about the introduced changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds oasdiff to check for breaking API changes and regression against a committed baseline via:
oasdiff breakingshould catch breaking changes infern/openapi.ymlvs HEADoasdiff changelogshould count conformance gaps vs vendored OpenAI spec; fails if count increasesNote that we use
--fail-on ERR, so only error-level breaking changes fail the hook. Warning-level changes (like removing an optional request property) should pass through.fern/openapi.yml) against the vendored OpenAI spec (schemas/openai-spec.yml) and lists all per-endpoint differencesRelated Issue(s)
This PR deals with the following issue: GH Issue #2061
Verification
AI Assistance
Checklist
cc @Pouyanpi @tgasser-nv