fix: remove bucket-init job, wait for pods before readiness check
ci/woodpecker/push/woodpecker Pipeline failed
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.adapters.broker_adapter name:broker-adapter]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.aggregation.worker name:aggregation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.extractor.worker name:extractor]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.ingestion.worker name:ingestion]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.lake_publisher.worker name:lake-publisher]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.parser.worker name:parser]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.recommendation.worker name:recommendation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.scheduler.app name:scheduler]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.api.app:app --host 0.0.0.0 --port 8000 name:query-api]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 name:risk]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 name:symbol-registry]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 name:trading-engine]) (push) Has been cancelled
Build and Push / build-dashboard (push) Has been cancelled
Build and Push / build-superset (push) Has been cancelled
Build and Push / integration-test (push) Has been cancelled

- Remove minio-bucket-init Job entirely (seed_minio.py creates bucket)
- Wait for pods to exist before kubectl wait --for=condition=ready
- Fixes 'no matching resources found' race when pods are still ContainerCreating
This commit is contained in:
Celes Renata
2026-04-19 19:25:49 +00:00
parent b2b8aca7c6
commit 4df513d096
2 changed files with 10 additions and 104 deletions
+9 -8
View File
@@ -312,14 +312,6 @@ if ! kubectl wait --for=condition=ready pod -l app=minio -n "$NAMESPACE" --timeo
exit 2
fi
log "Waiting for minio-bucket-init job ..."
if ! kubectl wait --for=condition=complete job/minio-bucket-init -n "$NAMESPACE" --timeout=120s; then
log "WARNING: minio-bucket-init job did not complete within 120s"
log "Bucket-init pod logs:"
kubectl logs -l app=minio-bucket-init -n "$NAMESPACE" --tail=30 2>&1 || true
kubectl describe job/minio-bucket-init -n "$NAMESPACE" 2>&1 | tail -20 || true
fi
stage_end "infra_deploy" "ok"
# ══════════════════════════════════════════════════════════════════════════════
@@ -402,6 +394,15 @@ envsubst < "$REPO_ROOT/infra/inttest/services.yaml" \
| kubectl apply -n "$NAMESPACE" -f -
log "Waiting for all API services to become ready ..."
# Wait for pods to be created by the ReplicaSet controller before checking readiness.
# kubectl wait fails immediately with "no matching resources found" if no pods exist yet.
for i in $(seq 1 30); do
POD_COUNT=$(kubectl get pods -n "$NAMESPACE" -l tier=api --no-headers 2>/dev/null | wc -l)
if [ "$POD_COUNT" -ge 4 ]; then
break
fi
sleep 2
done
if ! kubectl wait --for=condition=ready pod -l tier=api -n "$NAMESPACE" --timeout=120s; then
log "FATAL: API services did not become ready"
log "Pod statuses:"