]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ci: work around #19442 to make CI happy again
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 19 May 2021 18:15:53 +0000 (20:15 +0200)
committerFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 19 May 2021 21:07:19 +0000 (23:07 +0200)
Let's introduce a somewhat ugly workaround for #19442 and retry
the systemd-nspawn image boot test up to three times in case it dies
with the dissect timeout. Since this issue occurs only in the Arch job,
limit the workaround to this job only.

.github/workflows/mkosi.yml

index c7508a5bd9199d213181a6d9463adfdeda10948e..d1f989106274764a3a9ee8d1aa88e352ba2035a3 100644 (file)
@@ -48,8 +48,14 @@ jobs:
     - name: Build ${{ matrix.distro }}
       run: sudo python3 -m mkosi --password= --qemu-headless build
 
+    # Ugly workaround for systemd/systemd#19442 where systemd-nspawn
+    # occasionally fails with 'Failed to dissect image xxx: Connection timed out
+    - name: Retry the build if necessary
+      if: ${{ matrix.distro == 'arch' }}
+      run: echo "BUILD_RETRY_MAX=3" >> $GITHUB_ENV
+
     - name: Boot ${{ matrix.distro }} systemd-nspawn
-      run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless boot
+      run: sudo -E bash +e -x -c 'for _ in $(seq 1 ${BUILD_RETRY_MAX:-1}); do ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless boot && break; done'
 
     - name: Boot ${{ matrix.distro }} QEMU
       run: sudo ./.github/workflows/test_mkosi_boot.py python3 -m mkosi --password= --qemu-headless qemu