Skip to content

Commit 0c24318

Browse files
committed
Resolving failure for PYPY 3.10
1 parent 5b7c0ab commit 0c24318

File tree

1 file changed

+10
-25
lines changed

1 file changed

+10
-25
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ jobs:
4848
helm repo add vertica-charts https://vertica.github.io/charts || true
4949
helm repo add bitnami https://charts.bitnami.com/bitnami || true
5050
helm repo update
51-
5251
# ---------------------------
5352
# MinIO Setup
5453
# ---------------------------
@@ -105,7 +104,6 @@ jobs:
105104
kubectl -n minio rollout status deployment/minio --timeout=2m || true
106105
kubectl get pods -n minio -o wide || true
107106
kubectl get svc -n minio || true
108-
109107
- name: Ensure MinIO bucket exists
110108
run: |
111109
kubectl run mc-client --rm -i --restart=Never \
@@ -116,7 +114,6 @@ jobs:
116114
mc mb --ignore-existing localminio/vertica-fleeting && \
117115
mc ls localminio
118116
"
119-
120117
- name: Create MinIO Secret
121118
run: |
122119
kubectl create ns my-verticadb-operator || true
@@ -126,7 +123,6 @@ jobs:
126123
--from-literal=accesskey="minioadmin" \
127124
--from-literal=secretkey="minioadmin"
128125
kubectl get secret communal-creds -n my-verticadb-operator -o yaml || true
129-
130126
# ---------------------------
131127
# Vertica Operator + DB Deployment
132128
# ---------------------------
@@ -209,7 +205,6 @@ jobs:
209205
- port: 5433
210206
targetPort: 5433
211207
EOF
212-
213208
- name: Wait for Vertica readiness
214209
run: |
215210
NS=my-verticadb-operator
@@ -219,22 +214,25 @@ jobs:
219214
kubectl get pod ${POD} -n ${NS} && break || sleep 10
220215
done
221216
kubectl wait --for=condition=Ready pod/${POD} -n ${NS} --timeout=5m || true
222-
223217
echo "🚀 Creating test runner pod..."
224-
kubectl -n ${NS} run test-runner --image=python:3.13-slim --restart=Never --command -- sleep infinity
225-
kubectl -n ${NS} wait --for=condition=Ready pod/test-runner --timeout=180s
218+
# Decide startup command based on image type
219+
if [[ "${IMAGE}" == *"pypy"* ]]; then
220+
START_CMD="python -c 'import time; time.sleep(10**6)'"
221+
else
222+
START_CMD="sleep infinity"
223+
fi
224+
225+
kubectl -n ${NS} run ${POD} --image=${IMAGE} --restart=Never --command -- ${START_CMD}
226226
227+
kubectl -n ${NS} wait --for=condition=Ready pod/test-runner --timeout=180s
227228
echo "🩹 Adding Vertica pod entries to /etc/hosts in test pod..."
228229
for p in $(kubectl -n $NS get pods -l app.kubernetes.io/instance=verticadb-sample -o jsonpath='{.items[*].metadata.name}'); do
229230
IP=$(kubectl -n $NS get pod $p -o jsonpath='{.status.podIP}')
230231
echo "$IP $p.$NS.svc.cluster.local $p" | kubectl -n $NS exec -i test-runner -- tee -a /etc/hosts >/dev/null
231232
echo "✔ Added $p -> $IP"
232233
done
233-
234234
echo "📂 Copying repository into pod..."
235235
kubectl -n ${NS} cp . test-runner:/workspace
236-
237-
238236
# ---------------------------
239237
# Keycloak + OAuth setup
240238
# ---------------------------
@@ -288,12 +286,10 @@ jobs:
288286
- port: 8080
289287
targetPort: 8080
290288
EOF
291-
292289
- name: Wait for Keycloak readiness
293290
run: |
294291
kubectl -n keycloak rollout status deploy/keycloak --timeout=2m
295292
kubectl -n keycloak get pods -o wide
296-
297293
- name: Configure Keycloak realm, client, and user
298294
run: |
299295
kubectl -n keycloak exec deploy/keycloak -- \
@@ -314,7 +310,6 @@ jobs:
314310
kubectl -n keycloak exec deploy/keycloak -- \
315311
/opt/keycloak/bin/kcadm.sh set-password -r test \
316312
--username oauth_user --new-password password
317-
318313
- name: Configure Vertica Authentication
319314
run: |
320315
NS=my-verticadb-operator
@@ -342,15 +337,14 @@ jobs:
342337
run: |
343338
kubectl -n my-verticadb-operator exec verticadb-sample-defaultsubcluster-0 -c server -- \
344339
/opt/vertica/bin/vsql -U dbadmin -c "SELECT get_load_balance_policy();"
345-
346340
- name: Run Python tests in-cluster
347341
run: |
348342
set -euo pipefail
349343
NS=my-verticadb-operator
350344
SVC=verticadb-sample-defaultsubcluster
351345
LOCATOR="${SVC}.${NS}.svc.cluster.local:5433"
352346
POD=py-test-runner
353-
IMAGE=python:${{ matrix.python-version }}-slim
347+
IMAGE=python:${{ matrix.python-version }}
354348
echo "Ensuring namespace ${NS} exists..."
355349
kubectl get ns ${NS} >/dev/null 2>&1 || kubectl create ns ${NS}
356350
echo "Waiting for Vertica service endpoints..."
@@ -437,41 +431,32 @@ jobs:
437431
"
438432
echo "Cleaning up test pod..."
439433
kubectl -n ${NS} delete pod ${POD} --ignore-not-found || true
440-
441434
# ---------------------------
442435
# Final Teardown (K8s + KinD)
443436
# ---------------------------
444437
- name: Cleanup Kubernetes resources
445438
if: always()
446439
run: |
447440
echo "Starting cleanup..."
448-
449441
echo "Deleting Python test runner pods..."
450442
kubectl -n my-verticadb-operator delete pod test-runner --ignore-not-found || true
451443
kubectl -n my-verticadb-operator delete pod py-test-runner --ignore-not-found || true
452-
453444
echo "Deleting Keycloak pods & services..."
454445
kubectl delete deployment keycloak -n keycloak --ignore-not-found || true
455446
kubectl delete service keycloak -n keycloak --ignore-not-found || true
456447
kubectl delete ns keycloak --ignore-not-found || true
457-
458448
echo "Deleting VerticaDB and Operator..."
459449
kubectl delete verticadb verticadb-sample -n my-verticadb-operator --ignore-not-found || true
460450
helm uninstall vdb-op -n my-verticadb-operator || true
461451
kubectl delete ns my-verticadb-operator --ignore-not-found || true
462-
463452
echo "Deleting MinIO..."
464453
kubectl delete -f minio.yaml --ignore-not-found || true
465454
kubectl delete ns minio --ignore-not-found || true
466-
467455
echo "Deleting leftover services..."
468456
kubectl delete svc vertica-node-0 -n my-verticadb-operator --ignore-not-found || true
469457
kubectl delete svc vertica-node-1 -n my-verticadb-operator --ignore-not-found || true
470458
kubectl delete svc vertica-node-2 -n my-verticadb-operator --ignore-not-found || true
471-
472459
echo "Kubernetes resources cleanup done."
473-
474-
475460
- name: Delete KinD cluster
476461
if: always()
477462
run: |

0 commit comments

Comments
 (0)