From b14dfd204ed575c9956c894c252a1459628bf29b Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Tue, 13 Jan 2026 12:01:22 +0100 Subject: [PATCH 1/2] Add free-disk-space action to regtest + spark_client_regtests The "Spark Client Regression Tests" CI job requires some disk space to operate. With just a little bit of added "content", the job will fail to `no space left on device` during the `docker compose` invocation building an image. Such errors make it impossible to get the log from the workflow, unless you capture the log before the workflow runs into the `no space left on device` situation. With "no space left", GitHub workflow infra is unable to capture the logs. ``` #10 ERROR: failed to copy files: userspace copy failed: write /home/spark/polaris/v3.5/integration/build/2.13/quarkus-build/gen/quarkus-app/lib/main/com.google.http-client.google-http-client-1.47.1.jar: no space left on device ``` This change is a stop-gap solution to prevent this error from happening for now. --- .github/actions/free-disk-space/action.yml | 84 +++++++++++++++++++++ .github/workflows/regtest.yml | 3 + .github/workflows/spark_client_regtests.yml | 3 + 3 files changed, 90 insertions(+) create mode 100644 .github/actions/free-disk-space/action.yml diff --git a/.github/actions/free-disk-space/action.yml b/.github/actions/free-disk-space/action.yml new file mode 100644 index 0000000000..ddb83af8fc --- /dev/null +++ b/.github/actions/free-disk-space/action.yml @@ -0,0 +1,84 @@ +# Copyright (C) 2020 Dremio +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 'Free disk space' +description: 'Free runner disk space' +runs: + using: "composite" + steps: + - name: Disk usage + shell: bash + run: df -h + # (as of 2026-01-13) + # Filesystem Size Used Avail Use% Mounted on + # /dev/root 72G 54G 18G 76% / + # tmpfs 7.9G 84K 7.9G 1% /dev/shm + # tmpfs 3.2G 1.2M 3.2G 1% /run + # tmpfs 5.0M 0 5.0M 0% /run/lock + # /dev/sda16 881M 62M 758M 8% /boot + # /dev/sda15 105M 6.2M 99M 6% /boot/efi + # tmpfs 1.6G 12K 1.6G 1% /run/user/1001 + #- name: opt-hostedtoolcache + # run: du -sh /opt/hostedtoolcache/* + #- name: usr-share + # run: du -sh /usr/share/* + #- name: usr-local-lib + # run: du -sh /usr/local/lib/* + #- name: docker images + # run: docker image ls -a + - name: Delete unneeded files + shell: bash + run: | + # 1.7G /opt/hostedtoolcache/CodeQL + sudo rm -rf /opt/hostedtoolcache/CodeQL + # 520M /opt/hostedtoolcache/PyPy + sudo rm -rf /opt/hostedtoolcache/PyPy + # 1.9G /opt/hostedtoolcache/Python + sudo rm -rf /opt/hostedtoolcache/Python + # 217M /opt/hostedtoolcache/Ruby + sudo rm -rf /opt/hostedtoolcache/Ruby + # 1.1G /opt/hostedtoolcache/go + sudo rm -rf /opt/hostedtoolcache/go + # 574M /opt/hostedtoolcache/node + sudo rm -rf /opt/hostedtoolcache/node + + # 496M /usr/share/az_12.5.0 + sudo rm -rf /usr/share/az_* + # 60M /usr/share/doc + sudo rm -rf /usr/share/doc + # 109M /usr/share/man + sudo rm -rf /usr/share/man + # 4.0G /usr/share/dotnet + sudo rm -rf /usr/share/dotnet + # 788M /usr/share/miniconda + sudo rm -rf /usr/share/miniconda + # 3.2G /usr/share/swift + sudo rm -rf /usr/share/swift + + # 12G /usr/local/lib/android + sudo rm -rf /usr/local/lib/android + # 483M /usr/local/lib/node_modules + sudo rm -rf /usr/local/lib/node_modules + - name: Disk usage + shell: bash + run: df -h + # (as of 2026-01-13) + # Filesystem Size Used Avail Use% Mounted on + # /dev/root 72G 28G 45G 39% / + # tmpfs 7.9G 84K 7.9G 1% /dev/shm + # tmpfs 3.2G 1.2M 3.2G 1% /run + # tmpfs 5.0M 0 5.0M 0% /run/lock + # /dev/sda16 881M 62M 758M 8% /boot + # /dev/sda15 105M 6.2M 99M 6% /boot/efi + # tmpfs 1.6G 12K 1.6G 1% /run/user/1001 diff --git a/.github/workflows/regtest.yml b/.github/workflows/regtest.yml index d8019fc710..1c39c08b41 100644 --- a/.github/workflows/regtest.yml +++ b/.github/workflows/regtest.yml @@ -39,6 +39,9 @@ jobs: steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - name: Free disk space + uses: ./.github/actions/free-disk-space + - name: Set up JDK 21 uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5 with: diff --git a/.github/workflows/spark_client_regtests.yml b/.github/workflows/spark_client_regtests.yml index aa38700622..705647d881 100644 --- a/.github/workflows/spark_client_regtests.yml +++ b/.github/workflows/spark_client_regtests.yml @@ -39,6 +39,9 @@ jobs: steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 + - name: Free disk space + uses: ./.github/actions/free-disk-space + - name: Set up JDK 21 uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5 with: From 59c6415e0e851e5ab64aa75bedc365a7e04a8201 Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Tue, 13 Jan 2026 12:24:40 +0100 Subject: [PATCH 2/2] some more to prune --- .github/actions/free-disk-space/action.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/actions/free-disk-space/action.yml b/.github/actions/free-disk-space/action.yml index ddb83af8fc..e044a72465 100644 --- a/.github/actions/free-disk-space/action.yml +++ b/.github/actions/free-disk-space/action.yml @@ -70,6 +70,18 @@ runs: sudo rm -rf /usr/local/lib/android # 483M /usr/local/lib/node_modules sudo rm -rf /usr/local/lib/node_modules + + # Haskell + sudo rm -rf /usr/local/.ghcup + # Chromium + sudo rm -rf /usr/local/share/chromium + # Microsoft/Edge + sudo rm -rf /opt/microsoft + # Google Chrome + sudo rm -rf /opt/google + # Powershell + sudo rm -rf /usr/local/share/powershell + - name: Disk usage shell: bash run: df -h