Use nginx-side readiness probe for E2E frontend
Some checks failed
CICD / Build and Publish CICD Base Image (push) Successful in 24s
CICD / Build and Push CICD Image (push) Successful in 26m37s
CICD / Build CICD Image Failure Postmortem (push) Has been skipped
CICD / Backend Tests (push) Successful in 9m29s
CICD / Backend Doctests (push) Has been cancelled
CICD / CICD Tests Complete (push) Has been cancelled
CICD / Build Backend Base Image (push) Has been cancelled
CICD / Build Frontend Base Image (push) Has been cancelled
CICD / Build Integration Tester Image (push) Has been cancelled
CICD / Build E2E Tester Image (push) Has been cancelled
CICD / Build and Publish Runtime Images (Legacy Disabled) (push) Has been cancelled
CICD / Build Backend Main Image (push) Has been cancelled
CICD / Build Frontend Main Image (push) Has been cancelled
CICD / Production Images Complete (push) Has been cancelled
CICD / Runtime Images Failure Postmortem (push) Has been cancelled
CICD / Source Lanes Failure Postmortem (push) Has been cancelled
CICD / Runtime Black-Box Integration Tests (push) Has been cancelled
CICD / Integration Tests Failure Postmortem (push) Has been cancelled
CICD / End-to-End Tests (push) Has been cancelled
CICD / E2E Tests Failure Postmortem (push) Has been cancelled
CICD / Pre-commit Checks (push) Has started running
CICD / Frontend Tests (push) Has started running

This commit is contained in:
copilotcoder
2026-07-09 09:11:47 -04:00
parent acb446c30f
commit aa1c1b7900

View File

@@ -2320,7 +2320,6 @@ jobs:
DB_PASSWORD="plex_password"
DB_URL="postgresql://plex_user:${DB_PASSWORD}@database:5432/plex_playlist"
E2E_REPO_DIR="$(mktemp -d)"
FRONTEND_URL_COMPOSE="http://frontend:80"
if ! command -v docker >/dev/null 2>&1; then
echo "❌ Docker is required"
@@ -2412,44 +2411,6 @@ jobs:
echo "${http_code}"
}
fetch_url_from_backend() {
target_url="$1"
output_file="$2"
probe_tmp="$(mktemp)"
if ! docker run --rm \
--network "${COMPOSE_PROJECT_NAME}_default" \
"${INTEGRATION_TESTER_DIGEST_REF}" \
python -c "$(printf '%s\n' \
'import sys' \
'import urllib.error' \
'import urllib.request' \
'target_url = sys.argv[1]' \
'try:' \
' with urllib.request.urlopen(target_url, timeout=2) as response:' \
' body = response.read().decode(\"utf-8\", errors=\"replace\")' \
' print(response.status)' \
' print(body)' \
'except urllib.error.HTTPError as err:' \
' body = err.read().decode(\"utf-8\", errors=\"replace\")' \
' print(err.code)' \
' print(body)' \
'except Exception:' \
' print(\"000\")' \
' print("")')" \
"${target_url}" >"${probe_tmp}" 2>/dev/null; then
: >"${output_file}"
rm -f "${probe_tmp}"
echo "000"
return 0
fi
http_code="$(head -n 1 "${probe_tmp}")"
tail -n +2 "${probe_tmp}" >"${output_file}"
rm -f "${probe_tmp}"
echo "${http_code}"
}
dump_failure_context() {
echo "=== Runtime E2E Failure Context ==="
docker compose -p "${COMPOSE_PROJECT_NAME}" -f "${COMPOSE_FILE}" ps || true
@@ -2643,13 +2604,10 @@ jobs:
for i in $(seq 1 30); do
frontend_running_count="$(docker compose -p "${COMPOSE_PROJECT_NAME}" -f "${COMPOSE_FILE}" ps --status running --services frontend | wc -l)"
if [ "${frontend_running_count}" -gt 0 ]; then
frontend_root_code="$(fetch_url_from_backend "${FRONTEND_URL_COMPOSE}" /tmp/e2e-frontend-root.html)"
case "${frontend_root_code}" in
2*|3*)
frontend_ready=true
break
;;
esac
if docker compose -p "${COMPOSE_PROJECT_NAME}" -f "${COMPOSE_FILE}" exec -T frontend sh -lc 'wget -q -T 2 -O /dev/null http://127.0.0.1/'; then
frontend_ready=true
break
fi
fi
sleep 2
done