mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-19 01:50:51 -05:00
fix(ci): coordinate Kubernetes startup migrations (#13474)
This commit is contained in:
1 parent
2e0c6e4062
commit
93e56b801d
3 files changed
+17
-12
No files matched your search
@@ -440,11 +440,12 @@ jobs:
|
||||
cat "${RUNNER_TEMP}/postgres-port-forward.log" || true
|
||||
exit 1
|
||||
|
||||
- name: Run migrations
|
||||
- name: Wait for API startup migrations
|
||||
run: |
|
||||
cd backend
|
||||
alembic upgrade head
|
||||
alembic heads --verbose
|
||||
kubectl -n "${HELM_RELEASE_NAMESPACE}" rollout status \
|
||||
deployment/onyx-api-server --timeout=360s
|
||||
kubectl -n "${HELM_RELEASE_NAMESPACE}" exec deployment/onyx-api-server -- \
|
||||
alembic current --check-heads
|
||||
|
||||
- name: Wait for chart OpenSearch ready
|
||||
run: |
|
||||
|
||||
@@ -5,7 +5,7 @@ home: https://www.onyx.app/
|
||||
sources:
|
||||
- "https://github.com/onyx-dot-app/onyx"
|
||||
type: application
|
||||
version: 0.8.2
|
||||
version: 0.8.3
|
||||
appVersion: latest
|
||||
annotations:
|
||||
category: Productivity
|
||||
@@ -17,10 +17,8 @@ annotations:
|
||||
image: docker.io/onyxdotapp/onyx-backend:latest
|
||||
artifacthub.io/changes: |
|
||||
- kind: changed
|
||||
description: Documented that the default backend images no longer ship psql (it
|
||||
moved to the -dev suffixed image variants); the opt-in tooling.pgInto helper
|
||||
now needs a -dev backend image tag or a custom image providing the client
|
||||
binary.
|
||||
description: Made the Kubernetes CI profile coordinate API startup migrations
|
||||
through deployment readiness before running tests.
|
||||
dependencies:
|
||||
# Helm uses the first condition path that exists: `postgresqlOperator.enabled`
|
||||
# is unset by default, so this falls through to `postgresql.enabled`. Set it
|
||||
|
||||
@@ -123,9 +123,15 @@ webserver:
|
||||
|
||||
api:
|
||||
replicaCount: 1
|
||||
# The workflow runs `alembic upgrade head` once after Postgres is reachable.
|
||||
# Keep API startup from racing that centralized migration step.
|
||||
runStartupMigrations: false
|
||||
runStartupMigrations: true
|
||||
# The API port opens only after startup migrations finish and Uvicorn starts.
|
||||
# This makes rollout status a reliable migration-completion barrier.
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: api-server-port
|
||||
periodSeconds: 2
|
||||
timeoutSeconds: 1
|
||||
failureThreshold: 180
|
||||
resources:
|
||||
requests:
|
||||
cpu: 250m
|
||||
|
||||
Reference in new issue
Block a user