Commit 3c00759d authored by Jochen Roth's avatar Jochen Roth Committed by Christian Kuhn
Browse files

[TASK] runTest.sh: Version check docker-compose v2

Docker for Mac (and Windows?) currently misuses their
users as canary testers by actively activating an
"experimental" feature toggle which then ships
a docker-compose v2 rc release.

docker-composer v2's yaml parsing however is broken
(you had ONE job!): It does not properly detect strings
as strings and mumbles about this, and worse, it transforms
shell "don't linebreak!" '\' operator into linebreaks. This
breaks our carefully crafted and formatted testing related
docker-compose.yml configuration.

The situation persists for weeks already, there is no
solution except manually disabling this docker for mac
experimental feature toggle.

The patch makes runTests.sh detect docker-composer v2,
exits out with an error message telling the version
is not supported and how to disable it. ddev went with
a similar approach recently.

Resolves: #95057
Releases: master, 10.4, 9.5
Change-Id: Iee1e6fd28d876262f00aba769a7e047c14db903c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/70845


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 61d4f9ae
......@@ -260,6 +260,16 @@ if ! type "docker-compose" > /dev/null; then
exit 1
fi
# docker-compose v2 is enabled by docker for mac as experimental feature without
# asking the user. v2 is currently broken. Detect the version and error out.
DOCKER_COMPOSE_VERSION=`docker-compose version --short`
DOCKER_COMPOSE_MAJOR=`echo $DOCKER_COMPOSE_VERSION | cut -d'.' -f1 | tr -d 'v'`
if [[ "$DOCKER_COMPOSE_MAJOR" -gt "1" ]]; then
echo "docker-compose $DOCKER_COMPOSE_VERSION is currently broken and not supported by runTests.sh."
echo "If you are running Docker Desktop for MacOS/Windows disable 'Use Docker Compose V2 release candidate' (Settings > Experimental Features)"
exit 1
fi
# Go to the directory this script is located, so everything else is relative
# to this dir, no matter from where this script is called.
THIS_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment