Repository navigation
doc tests: schema-check only the PR's pages, including new ones - #1540
Open
kristin-kronstain-brown wants to merge 2 commits into
Open
kristin-kronstain-brown wants to merge 2 commits into
kristin-kronstain-brown wants to merge 2 commits into
Conversation
Pass the pages a PR reaches to the schema check as --file, as kgateway.dev does. docs-tests then also checks any of them that has no test yet, so a new page is checked on the PR that adds it instead of after the nightly scaffold adds its test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kristin Brown <kristin.brown@solo.io>
Deploying agentproxy with
|
| Latest commit: |
f155c28
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://02a61e3e.agentproxy.pages.dev |
| Branch Preview URL: | https://schema-check-new-pages-on-pr.agentproxy.pages.dev |
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.
Why
A new page gets its schema test from the nightly scaffold in solo-io/docs-tests, which runs only after the page merges. Until then, nothing checks the page's YAML, and the first PR to run the new test afterward fails for a mistake it did not make.
docs-tests now handles this in
doc_test_schema_check.py: any page passed with--filethat has no test yet is checked with the schema test the nightly scaffold would add. The test goes into a temporary copy of docs-tests only.What changed
discoverjob exposes the pages the PR reaches (already computed in "Get changed markdown files") as apagesoutput.--file, the same way kgateway.dev does.Behavior change
On a pull request, the schema check now runs only for the pages the PR reaches, not for every schema test in the repo.
Testing
Run locally with the updated docs-tests script against a scratch copy of this repo, using a new standalone page whose
oidcpolicy was missing the requiredredirectURI:--file, the page had no test and nothing checked it.--file <page>, the check addedscratch-new-page-schemaand failed with'redirectURI' is a required property. The docs-tests checkout was not changed.The workflow change itself has not run in CI yet. This PR changes
doc-tests.yamland reaches no content pages, so its own run uses the full suite.🤖 Generated with Claude Code