Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for freeing disk space #964

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Conversation

danielrbradley
Copy link
Member

@danielrbradley danielrbradley commented Jun 10, 2024

Stacked on top of #942

  • Provide dedicated option instead of relying on providers to use custom steps which are run after tool installs.
  • Run as first step so we don't delete things that have just been installed.
  • Default to off to maintain existing behaviour. This can take around 3 minutes to run, so we should only run it if we're having issues.
# Set to true to clear disk space before running prerequisites workflow.
freeDiskSpaceBeforeBuild: false
# Set to true to clear disk space before running test jobs.
freeDiskSpaceBeforeTest: false

This fixes oddities in Azure and AWS where we've added steps in the preBuild and preTest to clear disk space but then have to install tools (e.g. dotnet) a second time as they get deleted.

@danielrbradley danielrbradley self-assigned this Jun 10, 2024
@danielrbradley danielrbradley force-pushed the add-cleanup-option branch 2 times, most recently from 912c60b to a409010 Compare June 10, 2024 20:26
@danielrbradley danielrbradley requested a review from a team June 10, 2024 20:28
@iwahbe
Copy link
Member

iwahbe commented Jun 10, 2024

Could you change the target branch to #942's branch. That way we will see only the diffs that this PR introduces?

@danielrbradley
Copy link
Member Author

danielrbradley commented Jun 10, 2024

Add option for freeing disk space

Planning to rebase tomorrow once #942 merges. The diff can be seen here (it's just the last commit): a409010

Edit: updated for now - will put it back tomorrow.

@danielrbradley danielrbradley changed the base branch from master to remove-splices June 10, 2024 20:44
Base automatically changed from remove-splices to master June 11, 2024 13:19
- Provide dedicated option instead of relying on providers to use custom steps which are run after tool installs.
- Run as first step so we don't delete things that have just been installed.
- Default to off to maintain existing behaviour. This can take around 3 minutes to run, so we should only run it if we're having issues.
@danielrbradley danielrbradley merged commit 02e2ce7 into master Jun 12, 2024
5 checks passed
@danielrbradley danielrbradley deleted the add-cleanup-option branch June 12, 2024 08:36
danielrbradley added a commit that referenced this pull request Jun 12, 2024
We should honour `freeDiskSpaceBeforeTest` anywhere we previously allowed `actions.preTest` to be used.

Follow-up to #964
danielrbradley added a commit that referenced this pull request Jun 12, 2024
We should honour `freeDiskSpaceBeforeTest` anywhere we previously
allowed `actions.preTest` to be used.

Follow-up to #964

Found while testing simplifying AWS's config using the latest changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants