Skip to content

Commit 751871d

Browse files
committed
Fix CI test failures due to insufficient disk space
Add aggressive disk cleanup in test job initialization to prevent 'Check free disk space' errors, especially for ic-good-opt-on and ic-good-opt-off tests. Changes: - Clean dnf/yum caches, /tmp, /var/tmp, and user .cache directories - Remove unnecessary locale, doc, and man files - Add cleanup between test configurations to free temporary files - Add disk space logging before and after cleanup for debugging
1 parent 8bde32c commit 751871d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/build-cloudberry.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,8 +926,28 @@ jobs:
926926
chmod -R 755 .
927927
chmod 777 "${LOGS_DIR}"
928928
929+
echo "=== Disk space before cleanup ==="
929930
df -kh /
931+
932+
# Aggressive disk cleanup for test jobs
930933
rm -rf /__t/*
934+
rm -rf /var/cache/dnf/*
935+
rm -rf /var/cache/yum/*
936+
rm -rf /tmp/* 2>/dev/null || true
937+
rm -rf /var/tmp/* 2>/dev/null || true
938+
rm -rf /root/.cache/* 2>/dev/null || true
939+
rm -rf /home/*/.cache/* 2>/dev/null || true
940+
941+
# Clean up package manager caches
942+
dnf clean all 2>/dev/null || true
943+
yum clean all 2>/dev/null || true
944+
945+
# Remove unnecessary locale files
946+
rm -rf /usr/share/locale/* 2>/dev/null || true
947+
rm -rf /usr/share/doc/* 2>/dev/null || true
948+
rm -rf /usr/share/man/* 2>/dev/null || true
949+
950+
echo "=== Disk space after cleanup ==="
931951
df -kh /
932952
933953
df -h | tee -a "${LOGS_DIR}/details/disk-usage.log"
@@ -1385,6 +1405,17 @@ jobs:
13851405
esac
13861406
13871407
echo "Log file: $config_log"
1408+
1409+
# Clean up temporary files between test configurations to free disk space
1410+
echo "Cleaning up temporary files after configuration $((i+1))..."
1411+
rm -rf /tmp/gpdb_* 2>/dev/null || true
1412+
rm -rf /tmp/pg_* 2>/dev/null || true
1413+
rm -rf /tmp/*.sql 2>/dev/null || true
1414+
rm -rf /tmp/*.out 2>/dev/null || true
1415+
sync
1416+
echo "Disk space after cleanup:"
1417+
df -kh /
1418+
13881419
echo "=== End configuration $((i+1)) execution ==="
13891420
echo ""
13901421
done

0 commit comments

Comments
 (0)