-
Notifications
You must be signed in to change notification settings - Fork 4
ci: add the oasdiff breaking-change gate #201
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: API diff | ||
| # | ||
| # Breaking-change gate on the OpenAPI contract (#196). | ||
| # | ||
| # Cryptify's routes are unversioned, so there is no way to keep an old shape | ||
| # running next to a new one: any breaking change to api-description.yaml | ||
| # breaks the clients pinned to it (pg-js, pg-dotnet, the add-ins). This job | ||
| # diffs the PR's spec against the branch it targets and fails on anything | ||
| # oasdiff rates ERR. Additive changes pass. | ||
| # | ||
| # To land a genuinely breaking change: add a new versioned route, leave the | ||
| # old one in place, and deprecate it once privacybydesign/postguard-ops#64 | ||
| # telemetry shows nobody is calling it. | ||
| # | ||
|
|
||
| on: | ||
| pull_request: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit — a bare The default activity types are This PR is the live example. The substance happens to be fine here (the spec blob is identical at both bases), and the stacked-PR flow the description recommends is exactly the flow that hits this. It matters more once this becomes a required check, because a stale green is still a passing required check. Fix is one line: on:
pull_request:
types: [opened, synchronize, reopened, edited]
|
||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
|
|
||
| breaking-changes: | ||
| name: oasdiff breaking changes | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out the pull request | ||
| uses: actions/checkout@v6 | ||
| - name: Check out the base spec | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| ref: ${{ github.event.pull_request.base.sha }} | ||
| path: base | ||
| - name: Diff the spec against the base branch | ||
| uses: oasdiff/oasdiff-action/breaking@v0.1.10 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. style — third-party Docker action pinned to a mutable tag.
Every other action here is first-party or well-known ( uses: oasdiff/oasdiff-action/breaking@0ab8ad204b00d25acc5ae87106281433e288d0c1 # v0.1.10Blast radius is already small ( |
||
| with: | ||
| base: base/api-description.yaml | ||
| revision: api-description.yaml | ||
| fail-on: ERR | ||
| # Do not upload the spec to oasdiff.com for a side-by-side review | ||
| # page. The default is `true`; detection and annotations work | ||
| # without it, so nothing leaves CI. | ||
| review: false | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit — dead cross-reference.
privacybydesign/postguard-ops#64does not resolve: the repo 404s on the API and is absent from a fullrepo listof both orgs. The string appears nowhere else in cryptify.This is the one pointer a future maintainer follows to answer "when may I drop the old route", so a 404 there costs real time.
#196andencryption4all/postguard#247both resolve if you want an existing tracker, or create the ops issue and update the line.