Skip to content
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

OpenAPI breaking changes CI tests #6612

Merged
merged 6 commits into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/openapi-breaking-changes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: lakeFS OpenAPI Compatibility Tests

on:
pull_request:
paths:
- "api/**"
push:
branches:
- master
workflow_dispatch: {}

jobs:
swagger-backward-compatibility:
name: Swagger compatibility tests
runs-on: ubuntu-20.04
steps:
- name: Check-out revised code
uses: actions/checkout@v4
with:
path: 'changed'
sparse-checkout: |
api/swagger.yml
api/authorization.yml
sparse-checkout-cone-mode: false
- name: Check-out base code
uses: actions/checkout@v4
with:
ref: 'master'
path: 'base'
sparse-checkout: |
api/swagger.yml
api/authorization.yml
sparse-checkout-cone-mode: false
- name: Check lakeFS swagger YAML
id: test_swagger_breaking_changes
uses: oasdiff/oasdiff-action/breaking@main
with:
base: base/api/swagger.yml
revision: changed/api/swagger.yml
fail-on-diff: true
- name: Check authorization YAML
id: test_authorization_breaking_changes
uses: oasdiff/oasdiff-action/breaking@main
with:
base: base/api/authorization.yml
revision: changed/api/authorization.yml
fail-on-diff: true
10 changes: 5 additions & 5 deletions api/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ components:
application/json:
schema:
$ref: "#/components/schemas/ErrorNoACL"

Unauthorized:
description: Unauthorized
content:
Expand Down Expand Up @@ -1271,7 +1271,7 @@ components:
example: s3://my-bucket/production/collections/
destination:
type: string
description: Destination for the imported objects on the branch
description: Destination for the imported objects on the branch
example: collections/

ImportCreation:
Expand Down Expand Up @@ -1378,14 +1378,14 @@ components:
required:
- update_time
- completed

ImportCreationResponse:
type: object
properties:
id:
description: The id of the import process
type: string
required:
required:
- id

MetaRangeCreation:
Expand Down Expand Up @@ -4243,7 +4243,7 @@ paths:
$ref: "#/components/responses/NotFound"
default:
$ref: "#/components/responses/ServerError"

post:
tags:
- retention
Expand Down