Review main Abandoned

71528[WIP][TASK] Support (rootless) podman as backend for runTests.sh

Benjamin Franzke CR 0 V 0 Normal +122 −52 updated 11/16/23, 16:26

Commit message

Avoid the requirement for the rootful docker management DAEMON.

Running with podman basically means to drop all ugly docker hacks
(which were required because docker runs as root)
and just run the containers as user.

One opinionated change to the podman execution is made:
The $HOME directory isn't mounted, but a pseudo home directory
in Build/testing-podman/local/home/ is mounted instead in order to
avoid exposing the entire $HOME directory to arbitrary containers.

What is working (tested on fedora 35, selinux diabled):

 Build/Scripts/runTests.sh -b podman -s unit
 Build/Scripts/runTests.sh -b podman -s functional -d sqlite

 Build/Scripts/runTests.sh -b podman -s buildCss
 Build/Scripts/runTests.sh -b podman -s buildJavascript

 Build/Scripts/runTests.sh -b podman -s cgl
 Build/Scripts/runTests.sh -b podman -s cglGit
 Build/Scripts/runTests.sh -b podman -s checkAnnotations
 Build/Scripts/runTests.sh -b podman -s checkBom
 Build/Scripts/runTests.sh -b podman -s checkComposer
 Build/Scripts/runTests.sh -b podman -s checkCsvFixtures
 Build/Scripts/runTests.sh -b podman -s checkExceptionCodes
 Build/Scripts/runTests.sh -b podman -s checkExtensionScannerRst
 Build/Scripts/runTests.sh -b podman -s checkFilePathLength
 Build/Scripts/runTests.sh -b podman -s checkGitSubmodule
 Build/Scripts/runTests.sh -b podman -s checkGruntClean
 Build/Scripts/runTests.sh -b podman -s checkPermissions
 Build/Scripts/runTests.sh -b podman -s checkRst
 Build/Scripts/runTests.sh -b podman -s checkTestMethodsPrefix

 Build/Scripts/runTests.sh -b podman -s composerInstall
 Build/Scripts/runTests.sh -b podman -s composerInstallMax
 Build/Scripts/runTests.sh -b podman -s composerInstallMin

 Build/Scripts/runTests.sh -b podman -s update

What is not working:

 # dependant services (e.g. database are not started)
 # podman-compose doesn't handle deps in "run" right now, see TODO.
 Build/Scripts/runTests.sh -b podman -s functional -d mariadb

 # …any other variant that requires dependencies

TODO:
 * Currently requires a patched podman-compose, see
   https://github.com/bnf/podman-compose/commit/run-exit-code-v1
   => add tests and create pull request
 * Patch podman-compose to resolve dependencies (links/depends_on) in
   `run`, see:
   https://github.com/containers/podman-compose/blob/ab135030c/podman_compose.py#L1453
 * Avoid execution of dozen "podman rm" and "podman stop"
   commands in podman-compose down. Its slow and way to verbose!
   (would require another podman-compose patch)

   …or maybe TYPO3 core should not abuse docker-compose as a task runner at all? :)

Review

  • Code review CR 0
  • Verified V 0

Files 4

Review log 46

  1. Benjamin Franzke uploaded patch set 1 10/10/21, 19:43

  2. core-ci voted on patch set 1 V +1 10/10/21, 19:58 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17903

  3. Benni Mack wrote 11/29/21, 10:12

    Change destination moved from master to main
  4. Benni Mack updated the commit message in patch set 2 11/29/21, 13:35

  5. core-ci voted on patch set 2 V +1 11/29/21, 14:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/20049

  6. Benjamin Franzke abandoned the change 11/16/23, 16:26

    Done with: 80191: [TASK] runTests.sh with podman, new CI | https://review.typo3.org/c/Packages/TYPO3.CMS/+/80191