fix(2): lasuite-drive setup_custom_tests — docker service scale --detach for the run-once minio-createbuckets job (blocking scale hung the custom tier forever; --detach submits + returns, bucket-poll confirms)

This commit is contained in:
2026-05-29 06:21:42 +01:00
parent d1aae43c7e
commit f1c626cc67

View File

@ -37,9 +37,16 @@ echo " lasuite-drive setup_custom_tests: wiring OIDC against keycloak dep ${KC_
# (deterministic) rather than the README's finicky `abra app restart` (which it notes "will appear
# to fail"). (DB `backend migrate` is the README's other documented step; not run here because
# neither current test needs a migrated DB — add it when an upload-via-app test does.)
#
# `--detach` is REQUIRED: minio-createbuckets is a run-once job (restart_policy: none) that creates
# the bucket then EXITS 0, so the service never holds a steady 1/1 replica. A blocking
# `docker service scale ...=1` (the default) therefore waits forever for a convergence that can't
# happen and hangs the whole run (`|| true` does NOT help — the command hangs, it doesn't fail).
# With `--detach` the scale just submits the one-run and returns; the bucket-poll loop below
# confirms the bucket was actually created.
STACK=$(printf '%s' "$CCCI_APP_DOMAIN" | tr '.' '_')
echo " setup: creating MinIO bucket via the minio-createbuckets one-shot (scale 0->1)"
docker service scale "${STACK}_minio-createbuckets=1" >/dev/null 2>&1 || true
docker service scale --detach "${STACK}_minio-createbuckets=1" >/dev/null 2>&1 || true
# Wait up to 90s for the one-shot to create the bucket (mc mb drive/drive-media-storage; exit 0).
# Poll by checking the bucket directly from the running minio replica container.
for i in $(seq 1 30); do