-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci(schema): check for OpenAPI and GraphQL schema changes #334
Conversation
This PR/issue depends on:
|
56d8723
to
9930d01
Compare
5e8b6a3
to
8a0a662
Compare
/build_test |
Workflow started at 3/20/2024, 12:09:31 PM. View Actions Run. |
CI build and push: All tests pass ✅ (JDK21) |
CI build and push: All tests pass ✅ (JDK17) |
It seems like it's possible to do the sorting with an OpenAPI filter in Quarkus: quarkusio/quarkus#28509 That looks like more work than simply installing and using yq though. |
Welcome to Cryostat3! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Related to #333
Description of the change:
Checks in the OpenAPI definition to
schemas/openapi.yaml
, transformed withyq
so that the keys are sorted and therefore can be compared across revisions without worrying about exact key ordering. The GraphQL schema is also checked in toschemas/schema.graphql
, but this is commented out since it depends on #294 .Then, adds a CI action on
/build_test
that runs on PR to regenerate the schema(s) within the CI runner and check if the PR schema differs from themain
schema. A bot comment indicates change/no-change for each schema, including the diff if there is a change found.Sample run: https://github.com/andrewazores/cryostat3/actions/runs/8361776180
The GraphQL schema change is expected, this patch was applied for testing: andrewazores#1
Motivation for the change:
This is meant to help developers and maintainers notice when they have made changes to the exposed interfaces, to help prevent inadvertent changes which may break compatibility, as well as to highlight intentional breakages or new features to help inform the next release's semantic versioning name.