[FLINK-34360][ci] Adds cleanup to job_init action #24277
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
There was a drop in disk space some time between Feb 2 (see 84G example workflow) and Feb 3 (see 73G example workflow). Previously, the runners had a disk size of ~84G. That dropped to ~73G. Instead of 24G free space, the e2e tests were only able to use 14G.
This seems to be a GHA runner specific issue. The Azure Pipeline runners have a disk size of 73G as well, but come with less disk being used from the start. That is why we're not seeing the issue in Azure Pipelines.
There are some binaries which we're not really using. Removing those would already free quite some disk space:
Removing these binaries results in another 15G of additional space. There is a risk that GitHub Action requires some of these dependencies, though. But for this change, I got inspired by easymon/maximize-build-space:action.yml. That plugin does exactly that (+ some other even more elaborate things like creating a LVM volumes). I didn't use the plugin itself because I wanted to keep the impact on the runner as small as possible. Just removing the files seems to be the easiest way to gain some disk space.
Brief change log
job_init
action that deletes the folders for Android, CodeQL and .NET and logs the disk space afterwardsVerifying this change
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation