From 9f557299c64f4143f17b59d0dd4e443c052506d5 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Thu, 5 Jun 2025 08:27:59 +0100 Subject: [PATCH] [2024.2 and earlier]: horizon: Work around pyscss bug See [1] and [2]. [1]: https://bugs.launchpad.net/horizon/+bug/2045394 [2]: https://launchpadlibrarian.net/792177956/horizon_4%3A25.1.0-0ubuntu1_4%3A25.1.0-0ubuntu1.1.diff.gz Change-Id: Ie99f9d941e91d438f2d983b0a0e5af01483ade82 (cherry picked from commit cb204aa173b364d3d5021afaa7995a215645791b) --- docker/horizon/extend_start.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/docker/horizon/extend_start.sh b/docker/horizon/extend_start.sh index 5a71d6be10..729f9aa026 100644 --- a/docker/horizon/extend_start.sh +++ b/docker/horizon/extend_start.sh @@ -242,7 +242,19 @@ config_zun_dashboard if settings_changed; then ${MANAGE_PY} collectstatic --noinput --clear - ${MANAGE_PY} compress --force + compress_ok="false" + for a in 1 2 3 4 5; do + if ${MANAGE_PY} compress --force 2>&1 > /dev/null; then + compress_ok="true" + break + else + echo "attempt ${a} failed" + fi + done + if [ "$compress_ok" = "false" ]; then + echo "The compress operation failed after 5 attempts." + exit 1 + fi settings_bundle | md5sum > $HASH_PATH fi