Skip to content

chore: run make clean on workspace startup - #16660

Merged
aslilac merged 3 commits into
mainfrom
lilac/make-clean-on-shutdown
Feb 24, 2025
Merged

aslilac merged 3 commits into
mainfrom
lilac/make-clean-on-shutdown

Conversation

@aslilac

@aslilac aslilac commented Feb 21, 2025 •

Copy link
Copy Markdown
Member

I originally thought using shutdown_script would be better, but after some testing it seems like shutdown_scripts don't get run nearly as consistently. Idk what's going on there, but running this on startup shouldn't be too bad because it should always be fast, at least.

Our various build outputs can easily take up dozens of gigabytes per workspace. Multiply that across dozens of engineers, and it's considerable. We've been seeing a lot of disk utilization warnings lately because some of our disks are getting "too" full (even though in reality they often have hundreds of gigabytes of spare capacity). This is an easy way to quiet those warnings, and leave us with plenty of capacity to onboard additional engineers without needing to upgrade our actual storage resources.

Also bumps threshold to 90%, because realistically that's still a ton of spare capacity.

@aslilac aslilac changed the title chore: run make clean on workspace shutdown chore: run make clean on workspace startup Feb 21, 2025
@aslilac
aslilac marked this pull request as ready for review February 21, 2025 22:20
@aslilac
aslilac requested a review from matifali February 21, 2025 22:52

@matifali matifali left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we move this to a coder_script with run_on_stop = true.

@aslilac

aslilac commented Feb 24, 2025

Copy link
Copy Markdown
Member Author

in my testing, run_on_stop just never runs at all. :\ I agree that it would be better there, but it also wouldn't do anything.

can we fix run_on_stop and then do that? I agree we should be dogfooding it, but if we did it right now this pr would do nothing

@aslilac
aslilac requested a review from matifali February 24, 2025 17:22
@aslilac
aslilac merged commit dfa33b1 into main Feb 24, 2025
@aslilac
aslilac deleted the lilac/make-clean-on-shutdown branch February 24, 2025 17:43
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 24, 2025
@matifali

Copy link
Copy Markdown
Member

@aslilac can you create an issue with your experience with run_on_stop? Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants