Skip to content

Commit 2f23476

Browse files
committed
Add GitHub action step to free disk space before executing System tests
System tests were failing with: `no space left on device` error. With this patch we're removing pre-cached/pre-installed tools not required for our tests. Space is passing from: ``` Filesystem Size Used Avail Use% Mounted on /dev/root 84G 66G 18G 79% / ``` to: ``` Filesystem Size Used Avail Use% Mounted on /dev/root 84G 44G 40G 53% / ``` Did a minor change in one of the cookbook file to trigger system tests. References: * https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh * https://github.com/orgs/community/discussions/25678 * https://github.com/jlumbroso/free-disk-space Signed-off-by: Enrico Usai <[email protected]>
1 parent 259c2e7 commit 2f23476

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

.github/workflows/dokken-system-tests.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,28 @@ jobs:
3838
fail-fast: false
3939
steps:
4040
- uses: actions/checkout@main
41+
- name: Free disk space
42+
id: free-disk-space
43+
run: |
44+
df -h /
45+
echo "Removing tool cache"
46+
# Ref https://github.com/orgs/community/discussions/25678
47+
sudo rm -rf /opt/hostedtoolcache
48+
echo "Removing docker images"
49+
sudo docker image prune --all --force || true
50+
echo "Removing large packages"
51+
# Ref https://github.com/apache/flink/blob/master/tools/azure-pipelines/free_disk_space.sh
52+
sudo apt-get remove -y '^aspnetcore-.*'
53+
sudo apt-get remove -y '^dotnet-.*' --fix-missing
54+
sudo apt-get remove -y 'php.*' --fix-missing
55+
sudo apt-get remove -y '^mongodb-.*' --fix-missing
56+
sudo apt-get remove -y '^mysql-.*' --fix-missing
57+
sudo apt-get remove -y azure-cli google-chrome-stable firefox powershell mono-devel libgl1-mesa-dri --fix-missing
58+
sudo apt-get autoremove -y
59+
sudo apt-get clean
60+
echo "Removing large directories"
61+
rm -rf /usr/share/dotnet/
62+
df -h /
4163
- name: Get changed files
4264
id: changed-files-excluding-tests
4365
uses: tj-actions/[email protected]

cookbooks/aws-parallelcluster-awsbatch/recipes/install.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# frozen_string_literal: true
22

33
#
4-
# Cookbook:: aws-parallelcluster
54
# Recipe:: aws_batch
65
#
7-
# Copyright:: 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
6+
# Copyright:: 2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
87
#
98
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the
109
# License. A copy of the License is located at

0 commit comments

Comments
 (0)