Skip to content

Commit 5eed445

Browse files
authored
Allow blacklisting broken, but published services (#130)
* fix: Allow blacklisting broken, but published services * fix: Add blacklisting for python generation as well * fix: disable unsupported go versions to unblock pipeline * disable go 1.23 for test * separate build/test and linting steps
1 parent 67bdbcd commit 5eed445

File tree

4 files changed

+48
-5
lines changed

4 files changed

+48
-5
lines changed

.github/workflows/ci.yaml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest, macos-latest]
15-
go-version: ["1.18", "1.19", "1.20", "1.21", "1.22"]
15+
go-version: ["1.21", "1.22", "1.23"]
1616
runs-on: ${{ matrix.os }}
1717
steps:
1818
- name: Install SSH Key
@@ -37,13 +37,43 @@ jobs:
3737
uses: actions/setup-go@v5
3838
with:
3939
go-version: ${{ matrix.go-version }}
40-
- name: Lint
41-
if: ${{ matrix.go-version == '1.19' || matrix.go-version == '1.20' || matrix.go-version == '1.21' || matrix.go-version == '1.22'}}
42-
working-directory: ./sdk-repo-updated
43-
run: make lint skip-non-generated-files=true
4440
- name: Test
4541
working-directory: ./sdk-repo-updated
4642
run: make test skip-non-generated-files=true
43+
44+
lint-go:
45+
name: CI [Go]
46+
strategy:
47+
matrix:
48+
os: [ubuntu-latest, macos-latest]
49+
runs-on: ${{ matrix.os }}
50+
steps:
51+
- name: Install SSH Key
52+
uses: shimataro/ssh-key-action@v2
53+
with:
54+
key: ${{ secrets.SSH_PRIVATE_KEY }}
55+
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
56+
- name: Install Java
57+
uses: actions/setup-java@v4
58+
with:
59+
distribution: "temurin"
60+
java-version: ${{ env.JAVA_VERSION }}
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
- name: Build
64+
uses: ./.github/actions/build/go
65+
with:
66+
go-version: ${{ env.GO_VERSION_BUILD }}
67+
- name: Generate SDK
68+
uses: ./.github/actions/generate-sdk/go
69+
- name: Install Go ${{ env.GO_VERSION_BUILD }}
70+
uses: actions/setup-go@v5
71+
with:
72+
go-version: ${{ env.GO_VERSION_BUILD }}
73+
- name: Lint
74+
working-directory: ./sdk-repo-updated
75+
run: make lint skip-non-generated-files=true
76+
4777
main-python:
4878
name: CI [Python]
4979
strategy:

blacklist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Transitional file to force generation of the new regional api for selected services
2+
# It will be removed when all services have been migrated to the new regional api
3+
modelserving

scripts/generate-sdk/languages/go.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ generate_go_sdk() {
130130
exit 1
131131
fi
132132

133+
if grep -E "^$service$" ${ROOT_DIR}/blacklist.txt; then
134+
echo "Skipping blacklisted service ${service}"
135+
continue
136+
fi
137+
133138
echo -e "\n>> Generating \"${service}\" service..."
134139
cd ${ROOT_DIR}
135140

scripts/generate-sdk/languages/python.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ generate_python_sdk() {
8989
service=$(echo "${service}" | tr '[:upper:]' '[:lower:]') # convert upper case letters to lower case
9090
service=$(echo "${service}" | tr -d -c '[:alnum:]') # remove non-alphanumeric characters
9191

92+
if grep -E "^$service$" ${ROOT_DIR}/blacklist.txt; then
93+
echo "Skipping blacklisted service ${service}"
94+
continue
95+
fi
96+
9297
echo ">> Generating \"${service}\" service..."
9398
cd ${ROOT_DIR}
9499

0 commit comments

Comments
 (0)