Skip to content

Commit 6d1ee29

Browse files
♻️ refactor github workflow file (#6926)
1 parent e9bc718 commit 6d1ee29

File tree

3 files changed

+97
-82
lines changed

3 files changed

+97
-82
lines changed

.github/workflows/ci-testing-deploy.yml

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -2661,84 +2661,3 @@ jobs:
26612661
env:
26622662
TAG_PREFIX: hotfix-staging-github
26632663
run: ./ci/deploy/dockerhub-deploy.bash -n
2664-
2665-
system-api-specs:
2666-
needs: [changes]
2667-
if: ${{ needs.changes.outputs.anything-py == 'true' || github.event_name == 'push' }}
2668-
timeout-minutes: 10
2669-
name: "[sys] check api-specs are up to date"
2670-
runs-on: ubuntu-latest
2671-
steps:
2672-
- name: Ensure job passes if not PR # ensure pass so upstream jobs which depend on this will run (dockerhub deployment)
2673-
if: ${{ github.event.pull_request == null }}
2674-
run: echo "::notice Passing job because not in PR"; exit 0
2675-
- name: setup python environment
2676-
uses: actions/setup-python@v5
2677-
with:
2678-
python-version: "3.11"
2679-
- name: install uv
2680-
uses: astral-sh/setup-uv@v4
2681-
with:
2682-
version: "0.4.x"
2683-
enable-cache: false
2684-
- name: checkout source branch
2685-
uses: actions/checkout@v4
2686-
- name: Regenerate specs and check
2687-
run: |
2688-
uv venv .venv && source .venv/bin/activate
2689-
make openapi-specs
2690-
./ci/github/helpers/openapi-specs-diff.bash diff \
2691-
https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name }}/refs/heads/${{ github.event.pull_request.head.ref }} \
2692-
.
2693-
2694-
system-backwards-compatibility:
2695-
needs: [changes, system-api-specs]
2696-
if: ${{ needs.changes.outputs.anything-py == 'true' || github.event_name == 'push' }}
2697-
timeout-minutes: 10
2698-
name: "[sys] api-server backwards compatibility"
2699-
runs-on: ubuntu-latest
2700-
steps:
2701-
- name: Ensure job passes if not PR # ensure pass so upstream jobs which depend on this will run (dockerhub deployment)
2702-
if: ${{ github.event.pull_request == null }}
2703-
run: echo "::notice Passing job because not in PR"; exit 0
2704-
- name: setup python environment
2705-
uses: actions/setup-python@v5
2706-
with:
2707-
python-version: "3.11"
2708-
- name: install uv
2709-
uses: astral-sh/setup-uv@v4
2710-
with:
2711-
version: "0.4.x"
2712-
enable-cache: false
2713-
- name: checkout
2714-
uses: actions/checkout@v4
2715-
- name: check api-server backwards compatibility
2716-
run: |
2717-
./scripts/openapi-diff.bash breaking --fail-on ERR\
2718-
https://raw.githubusercontent.com/${{ github.event.pull_request.base.repo.full_name }}/refs/heads/${{ github.event.pull_request.base.ref }}/services/api-server/openapi.json \
2719-
/specs/services/api-server/openapi.json
2720-
2721-
api-spec-backwards-compatibility:
2722-
needs: [changes, system-api-specs]
2723-
if: ${{ needs.changes.outputs.anything-py == 'true' && github.event_name == 'push' && github.event.pull_request != null }}
2724-
continue-on-error: true
2725-
timeout-minutes: 10
2726-
name: "api-specs-backwards-compatibility"
2727-
runs-on: ubuntu-latest
2728-
steps:
2729-
- name: setup python environment
2730-
uses: actions/setup-python@v5
2731-
with:
2732-
python-version: "3.11"
2733-
- name: install uv
2734-
uses: astral-sh/setup-uv@v4
2735-
with:
2736-
version: "0.4.x"
2737-
enable-cache: false
2738-
- name: checkout
2739-
uses: actions/checkout@v4
2740-
- name: Check openapi-specs backwards compatibility
2741-
run: |
2742-
./ci/github/helpers/openapi-specs-diff.bash breaking \
2743-
https://raw.githubusercontent.com/${{ github.event.pull_request.base.repo.full_name }}/refs/heads/${{ github.event.pull_request.base.ref }} \
2744-
.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# This workflow holds jobs which are required to pass before merging into master
2+
3+
name: PR CI
4+
on:
5+
pull_request:
6+
branches:
7+
- "*"
8+
# https://github.blog/changelog/2023-02-08-pull-request-merge-queue-public-beta/
9+
merge_group:
10+
branches:
11+
- "master"
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
api-specs:
19+
timeout-minutes: 10
20+
name: "check oas' are up to date"
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: setup python environment
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.11"
27+
- name: install uv
28+
uses: astral-sh/setup-uv@v4
29+
with:
30+
version: "0.4.x"
31+
enable-cache: false
32+
- name: checkout source branch
33+
uses: actions/checkout@v4
34+
- name: Regenerate specs and check
35+
run: |
36+
uv venv .venv && source .venv/bin/activate
37+
make openapi-specs
38+
./ci/github/helpers/openapi-specs-diff.bash diff \
39+
https://raw.githubusercontent.com/${{ github.event.pull_request.head.repo.full_name }}/refs/heads/${{ github.event.pull_request.head.ref }} \
40+
.
41+
42+
api-server-backwards-compatibility:
43+
needs: api-specs
44+
timeout-minutes: 10
45+
name: "api-server backwards compatibility"
46+
runs-on: ubuntu-latest
47+
steps:
48+
- name: setup python environment
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: "3.11"
52+
- name: install uv
53+
uses: astral-sh/setup-uv@v4
54+
with:
55+
version: "0.4.x"
56+
enable-cache: false
57+
- name: checkout
58+
uses: actions/checkout@v4
59+
- name: check api-server backwards compatibility
60+
run: |
61+
./scripts/openapi-diff.bash breaking --fail-on ERR\
62+
https://raw.githubusercontent.com/${{ github.event.pull_request.base.repo.full_name }}/refs/heads/${{ github.event.pull_request.base.ref }}/services/api-server/openapi.json \
63+
/specs/services/api-server/openapi.json
64+
65+
oas-backwards-compatibility:
66+
needs: api-specs
67+
continue-on-error: true
68+
timeout-minutes: 10
69+
name: "oas backwards compatibility"
70+
runs-on: ubuntu-latest
71+
steps:
72+
- name: setup python environment
73+
uses: actions/setup-python@v5
74+
with:
75+
python-version: "3.11"
76+
- name: install uv
77+
uses: astral-sh/setup-uv@v4
78+
with:
79+
version: "0.4.x"
80+
enable-cache: false
81+
- name: checkout
82+
uses: actions/checkout@v4
83+
- name: Check openapi-specs backwards compatibility
84+
run: |
85+
./ci/github/helpers/openapi-specs-diff.bash breaking \
86+
https://raw.githubusercontent.com/${{ github.event.pull_request.base.repo.full_name }}/refs/heads/${{ github.event.pull_request.base.ref }} \
87+
.

services/catalog/openapi.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -628,11 +628,17 @@
628628
},
629629
"image": {
630630
"type": "string",
631+
"maxLength": 2083,
632+
"minLength": 1,
633+
"format": "uri",
631634
"title": "Image",
632635
"description": "Url to the badge"
633636
},
634637
"url": {
635638
"type": "string",
639+
"maxLength": 2083,
640+
"minLength": 1,
641+
"format": "uri",
636642
"title": "Url",
637643
"description": "Link to the status"
638644
}
@@ -2843,7 +2849,10 @@
28432849
"thumbnail": {
28442850
"anyOf": [
28452851
{
2846-
"type": "string"
2852+
"type": "string",
2853+
"maxLength": 2083,
2854+
"minLength": 1,
2855+
"format": "uri"
28472856
},
28482857
{
28492858
"type": "null"

0 commit comments

Comments
 (0)