Skip to content

Commit a808b47

Browse files
authored
Merge branch 'onyx-dot-app:main' into main
2 parents 2cf566e + c10d7fb commit a808b47

File tree

877 files changed

+52869
-57012
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

877 files changed

+52869
-57012
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "Prepare Build (OpenAPI generation)"
2+
description: "Sets up Python with uv, installs deps, generates OpenAPI schema and Python client, uploads artifact"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Checkout code
7+
uses: actions/checkout@v4
8+
9+
- name: Setup uv
10+
uses: astral-sh/setup-uv@v3
11+
12+
- name: Setup Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.11"
16+
17+
- name: Install Python dependencies with uv
18+
shell: bash
19+
run: |
20+
uv pip install --system \
21+
-r backend/requirements/default.txt \
22+
-r backend/requirements/dev.txt
23+
24+
- name: Generate OpenAPI schema
25+
shell: bash
26+
working-directory: backend
27+
env:
28+
PYTHONPATH: "."
29+
run: |
30+
python scripts/onyx_openapi_schema.py --filename generated/openapi.json
31+
32+
- name: Generate OpenAPI Python client
33+
shell: bash
34+
run: |
35+
docker run --rm \
36+
-v "${{ github.workspace }}/backend/generated:/local" \
37+
openapitools/openapi-generator-cli generate \
38+
-i /local/openapi.json \
39+
-g python \
40+
-o /local/onyx_openapi_client \
41+
--package-name onyx_openapi_client \
42+
--skip-validate-spec \
43+
--openapi-normalizer "SIMPLIFY_ONEOF_ANYOF=true,SET_OAS3_NULLABLE=true"
44+
45+
- name: Upload OpenAPI artifacts
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: openapi-artifacts
49+
path: backend/generated/
50+

.github/workflows/docker-build-push-backend-container-on-tag.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ on:
88
env:
99
REGISTRY_IMAGE: ${{ contains(github.ref_name, 'cloud') && 'onyxdotapp/onyx-backend-cloud' || 'onyxdotapp/onyx-backend' }}
1010
DEPLOYMENT: ${{ contains(github.ref_name, 'cloud') && 'cloud' || 'standalone' }}
11-
12-
# don't tag cloud images with "latest"
13-
LATEST_TAG: ${{ contains(github.ref_name, 'latest') && !contains(github.ref_name, 'cloud') }}
11+
12+
# tag nightly builds with "edge"
13+
EDGE_TAG: ${{ startsWith(github.ref_name, 'nightly-latest') }}
1414

1515
jobs:
1616
build-and-push:
@@ -33,7 +33,16 @@ jobs:
3333
run: |
3434
platform=${{ matrix.platform }}
3535
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
36-
36+
37+
- name: Check if stable release version
38+
id: check_version
39+
run: |
40+
if [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.ref_name }}" != *"cloud"* ]]; then
41+
echo "is_stable=true" >> $GITHUB_OUTPUT
42+
else
43+
echo "is_stable=false" >> $GITHUB_OUTPUT
44+
fi
45+
3746
- name: Checkout code
3847
uses: actions/checkout@v4
3948

@@ -46,7 +55,8 @@ jobs:
4655
latest=false
4756
tags: |
4857
type=raw,value=${{ github.ref_name }}
49-
type=raw,value=${{ env.LATEST_TAG == 'true' && 'latest' || '' }}
58+
type=raw,value=${{ steps.check_version.outputs.is_stable == 'true' && 'latest' || '' }}
59+
type=raw,value=${{ env.EDGE_TAG == 'true' && 'edge' || '' }}
5060
5161
- name: Set up Docker Buildx
5262
uses: docker/setup-buildx-action@v3
@@ -99,6 +109,15 @@ jobs:
99109
# Needed for trivyignore
100110
- name: Checkout
101111
uses: actions/checkout@v4
112+
113+
- name: Check if stable release version
114+
id: check_version
115+
run: |
116+
if [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.ref_name }}" != *"cloud"* ]]; then
117+
echo "is_stable=true" >> $GITHUB_OUTPUT
118+
else
119+
echo "is_stable=false" >> $GITHUB_OUTPUT
120+
fi
102121
103122
- name: Download digests
104123
uses: actions/download-artifact@v4
@@ -119,7 +138,8 @@ jobs:
119138
latest=false
120139
tags: |
121140
type=raw,value=${{ github.ref_name }}
122-
type=raw,value=${{ env.LATEST_TAG == 'true' && 'latest' || '' }}
141+
type=raw,value=${{ steps.check_version.outputs.is_stable == 'true' && 'latest' || '' }}
142+
type=raw,value=${{ env.EDGE_TAG == 'true' && 'edge' || '' }}
123143
124144
- name: Login to Docker Hub
125145
uses: docker/login-action@v3

.github/workflows/docker-build-push-model-server-container-on-tag.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ env:
1111
BUILDKIT_PROGRESS: plain
1212
DEPLOYMENT: ${{ contains(github.ref_name, 'cloud') && 'cloud' || 'standalone' }}
1313

14-
# don't tag cloud images with "latest"
15-
LATEST_TAG: ${{ contains(github.ref_name, 'latest') && !contains(github.ref_name, 'cloud') }}
14+
# tag nightly builds with "edge"
15+
EDGE_TAG: ${{ startsWith(github.ref_name, 'nightly-latest') }}
1616

1717
jobs:
1818

@@ -88,7 +88,7 @@ jobs:
8888
push: true
8989
tags: ${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-amd64
9090
build-args: |
91-
DANSWER_VERSION=${{ github.ref_name }}
91+
ONYX_VERSION=${{ github.ref_name }}
9292
outputs: type=registry
9393
provenance: false
9494
cache-from: type=s3,prefix=cache/${{ github.repository }}/${{ env.DEPLOYMENT }}/model-server-${{ env.PLATFORM_PAIR }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
@@ -134,7 +134,7 @@ jobs:
134134
push: true
135135
tags: ${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-arm64
136136
build-args: |
137-
DANSWER_VERSION=${{ github.ref_name }}
137+
ONYX_VERSION=${{ github.ref_name }}
138138
outputs: type=registry
139139
provenance: false
140140
cache-from: type=s3,prefix=cache/${{ github.repository }}/${{ env.DEPLOYMENT }}/model-server-${{ env.PLATFORM_PAIR }}/,region=${{ env.RUNS_ON_AWS_REGION }},bucket=${{ env.RUNS_ON_S3_BUCKET_CACHE }}
@@ -145,6 +145,15 @@ jobs:
145145
if: needs.check_model_server_changes.outputs.changed == 'true'
146146
runs-on: ubuntu-latest
147147
steps:
148+
- name: Check if stable release version
149+
id: check_version
150+
run: |
151+
if [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.ref_name }}" != *"cloud"* ]]; then
152+
echo "is_stable=true" >> $GITHUB_OUTPUT
153+
else
154+
echo "is_stable=false" >> $GITHUB_OUTPUT
155+
fi
156+
148157
- name: Login to Docker Hub
149158
uses: docker/login-action@v3
150159
with:
@@ -157,11 +166,16 @@ jobs:
157166
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }} \
158167
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-amd64 \
159168
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-arm64
160-
if [[ "${{ env.LATEST_TAG }}" == "true" ]]; then
169+
if [[ "${{ steps.check_version.outputs.is_stable }}" == "true" ]]; then
161170
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:latest \
162171
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-amd64 \
163172
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-arm64
164173
fi
174+
if [[ "${{ env.EDGE_TAG }}" == "true" ]]; then
175+
docker buildx imagetools create -t ${{ env.REGISTRY_IMAGE }}:edge \
176+
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-amd64 \
177+
${{ env.REGISTRY_IMAGE }}:${{ github.ref_name }}-arm64
178+
fi
165179
166180
- name: Run Trivy vulnerability scanner
167181
uses: nick-fields/retry@v3

.github/workflows/docker-build-push-web-container-on-tag.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ on:
77

88
env:
99
REGISTRY_IMAGE: onyxdotapp/onyx-web-server
10-
LATEST_TAG: ${{ contains(github.ref_name, 'latest') }}
10+
11+
# tag nightly builds with "edge"
12+
EDGE_TAG: ${{ startsWith(github.ref_name, 'nightly-latest') }}
13+
1114
DEPLOYMENT: standalone
1215

1316
jobs:
@@ -45,6 +48,15 @@ jobs:
4548
platform=${{ matrix.platform }}
4649
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
4750
51+
- name: Check if stable release version
52+
id: check_version
53+
run: |
54+
if [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
55+
echo "is_stable=true" >> $GITHUB_OUTPUT
56+
else
57+
echo "is_stable=false" >> $GITHUB_OUTPUT
58+
fi
59+
4860
- name: Checkout
4961
uses: actions/checkout@v4
5062

@@ -57,7 +69,8 @@ jobs:
5769
latest=false
5870
tags: |
5971
type=raw,value=${{ github.ref_name }}
60-
type=raw,value=${{ env.LATEST_TAG == 'true' && 'latest' || '' }}
72+
type=raw,value=${{ steps.check_version.outputs.is_stable == 'true' && 'latest' || '' }}
73+
type=raw,value=${{ env.EDGE_TAG == 'true' && 'edge' || '' }}
6174
6275
- name: Set up Docker Buildx
6376
uses: docker/setup-buildx-action@v3
@@ -107,6 +120,15 @@ jobs:
107120
if: needs.precheck.outputs.should-run == 'true'
108121
runs-on: ubuntu-latest
109122
steps:
123+
- name: Check if stable release version
124+
id: check_version
125+
run: |
126+
if [[ "${{ github.ref_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && [[ "${{ github.ref_name }}" != *"cloud"* ]]; then
127+
echo "is_stable=true" >> $GITHUB_OUTPUT
128+
else
129+
echo "is_stable=false" >> $GITHUB_OUTPUT
130+
fi
131+
110132
- name: Download digests
111133
uses: actions/download-artifact@v4
112134
with:
@@ -126,7 +148,8 @@ jobs:
126148
latest=false
127149
tags: |
128150
type=raw,value=${{ github.ref_name }}
129-
type=raw,value=${{ env.LATEST_TAG == 'true' && 'latest' || '' }}
151+
type=raw,value=${{ steps.check_version.outputs.is_stable == 'true' && 'latest' || '' }}
152+
type=raw,value=${{ env.EDGE_TAG == 'true' && 'edge' || '' }}
130153
131154
- name: Login to Docker Hub
132155
uses: docker/login-action@v3

.github/workflows/docker-tag-latest.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,7 @@ jobs:
3535
- name: Pull, Tag and Push API Server Image
3636
run: |
3737
docker buildx imagetools create -t onyxdotapp/onyx-backend:latest onyxdotapp/onyx-backend:${{ github.event.inputs.version }}
38+
39+
- name: Pull, Tag and Push Model Server Image
40+
run: |
41+
docker buildx imagetools create -t onyxdotapp/onyx-model-server:latest onyxdotapp/onyx-model-server:${{ github.event.inputs.version }}

.github/workflows/helm-chart-releases.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ jobs:
2525

2626
- name: Add required Helm repositories
2727
run: |
28-
helm repo add bitnami https://charts.bitnami.com/bitnami
28+
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
2929
helm repo add onyx-vespa https://onyx-dot-app.github.io/vespa-helm-charts
30-
helm repo add keda https://kedacore.github.io/charts
30+
helm repo add cloudnative-pg https://cloudnative-pg.github.io/charts
31+
helm repo add ot-container-kit https://ot-container-kit.github.io/helm-charts
32+
helm repo add minio https://charts.min.io/
3133
helm repo update
3234
3335
- name: Build chart dependencies

0 commit comments

Comments
 (0)