From 95161dd6058fe1a810ec28065a768f1c90d837b4 Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Wed, 4 Dec 2024 21:44:51 +0100 Subject: [PATCH] Prevent import-examples to fail The mariadb images seems to now allow a smaller maximum packet by default. This resulted in problems for the boolfind problem which we didn't detect as all checks would still pass correctly. We now also capture the SQL logs to detect this easier and increase the maximum packetsize (1G). --- .github/jobs/baseinstall.sh | 1 + .github/workflows/chroot-checks.yml | 2 +- .github/workflows/integration.yml | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/jobs/baseinstall.sh b/.github/jobs/baseinstall.sh index 2c61bc2a7b..9123500eb5 100755 --- a/.github/jobs/baseinstall.sh +++ b/.github/jobs/baseinstall.sh @@ -64,6 +64,7 @@ mysql_root "show databases" mysql_root "SELECT CURRENT_USER();" mysql_root "SELECT USER();" mysql_root "SELECT user,host FROM mysql.user" +mysql_root "SET max_allowed_packet=1073741824" echo "unused:sqlserver:domjudge:domjudge:domjudge:3306" > /opt/domjudge/domserver/etc/dbpasswords.secret mysql_user "SELECT CURRENT_USER();" mysql_user "SELECT USER();" diff --git a/.github/workflows/chroot-checks.yml b/.github/workflows/chroot-checks.yml index 7dc3901121..f3ebd6609c 100644 --- a/.github/workflows/chroot-checks.yml +++ b/.github/workflows/chroot-checks.yml @@ -8,7 +8,7 @@ on: jobs: check-chroot-arch: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 container: image: domjudge/gitlabci:24.04 options: --privileged --cgroupns=host --init diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e9d9d0c651..47a4b18d6a 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -36,6 +36,7 @@ jobs: cat /proc/cpuinfo - name: pstree run: pstree -p + - run: apt update; apt install -y docker.io - name: Install DOMjudge run: .github/jobs/baseinstall.sh all - name: Set up chroot @@ -88,6 +89,13 @@ jobs: with: name: DB-dump path: /tmp/db.sql + - name: Get SQL logs + run: docker logs "${{ job.services.sqlserver.id }}" + - name: Collect docker logs on failure + if: ${{ !cancelled() }} + uses: jwalton/gh-docker-logs@v1 + with: + dest: '/tmp/docker-logs' - name: Upload all logs/artifacts if: ${{ !cancelled() }} uses: actions/upload-artifact@v4 @@ -96,6 +104,8 @@ jobs: path: | /var/log/nginx /opt/domjudge/domserver/webapp/var/log/*.log + /tmp/docker-logs + /tmp/artifacts - name: Verifying submissions shell: bash run: |