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

feat: Add the ability to cleanup all (or at least many) bazel workspaces #124

Merged
merged 28 commits into from
May 26, 2022

Conversation

JesseTatasciore
Copy link
Member

@JesseTatasciore JesseTatasciore commented Jan 27, 2022

When user is attempting to clean up all bazel workspaces from their disk we will:

  1. Process the workspaces to find out how large they are and when they were last used.
  2. Prompt the user to find out if they would like to remove them
  3. Delete those workspaces selected for deletion by the user

Both the processing and deletion of the workspaces are done in separate threads in an attempt to provide a smoother user experience

@JesseTatasciore JesseTatasciore self-assigned this Jan 27, 2022
@CLAassistant
Copy link

CLAassistant commented Jan 27, 2022

CLA assistant check
All committers have signed the CLA.

@JesseTatasciore JesseTatasciore linked an issue Jan 27, 2022 that may be closed by this pull request
@JesseTatasciore JesseTatasciore force-pushed the jtatasciore/clean-all-bazel-repos branch 2 times, most recently from 43b71b5 to bcc321f Compare February 14, 2022 22:11
@JesseTatasciore JesseTatasciore marked this pull request as ready for review February 14, 2022 22:40
pkg/aspect/clean/clean.go Show resolved Hide resolved
pkg/aspect/clean/clean.go Show resolved Hide resolved
pkg/aspect/clean/windows.go Show resolved Hide resolved
@alexeagle
Copy link
Member

seems like it just gets stuck in a loop if I say No

% ./bazel-bin/cmd/aspect/aspect_/aspect clean
✔ Reclaim disk space for all Bazel workspaces
? Workspace: Unknown Workspace, Age: 37h54m10.254816344s, Size: 356.52 KB. Would you like to remove?? [y/N]
? Workspace: Unknown Workspace, Age: 37h54m10.254816344s, Size: 356.52 KB. Would you like to remove?? [y/N]
? Workspace: Unknown Workspace, Age: 37h54m10.254816344s, Size: 356.52 KB. Would you like to remove?? [y/N]
? Workspace: Unknown Workspace, Age: 37h54m10.254816344s, Size: 356.52 KB. Would you like to remove?? [y/N]
? Workspace: Unknown Workspace, Age: 37h54m10.254816344s, Size: 356.52 KB. Would you like to remove?? [y/N]
? Workspace: Unknown Workspace, Age: 37h54m10.254816344s, Size: 356.52 KB. Would you like to remove?? [y/N]
? Workspace: Unknown Workspace, Age: 37h54m10.254816344s, Size: 356.52 KB. Would you like to remove?? [y/N]

pkg/aspect/clean/clean.go Show resolved Hide resolved
pkg/aspect/clean/windows.go Show resolved Hide resolved
pkg/aspect/clean/linux.go Show resolved Hide resolved
pkg/aspect/clean/darwin.go Outdated Show resolved Hide resolved
pkg/aspect/clean/darwin.go Outdated Show resolved Hide resolved
@JesseTatasciore JesseTatasciore force-pushed the jtatasciore/clean-all-bazel-repos branch from a8b116b to 6c2702d Compare March 25, 2022 16:34
@alexeagle alexeagle requested a review from f0rmiga April 14, 2022 17:32
pkg/aspect/clean/clean.go Outdated Show resolved Hide resolved
pkg/aspect/clean/clean.go Outdated Show resolved Hide resolved
pkg/aspect/clean/clean.go Outdated Show resolved Hide resolved
pkg/aspect/clean/clean.go Outdated Show resolved Hide resolved
pkg/aspect/clean/clean.go Outdated Show resolved Hide resolved
pkg/aspect/clean/clean.go Outdated Show resolved Hide resolved
pkg/aspect/clean/clean.go Outdated Show resolved Hide resolved
pkg/aspect/clean/clean.go Outdated Show resolved Hide resolved
pkg/aspect/clean/darwin.go Outdated Show resolved Hide resolved
pkg/aspect/clean/linux.go Show resolved Hide resolved
@JesseTatasciore JesseTatasciore force-pushed the jtatasciore/clean-all-bazel-repos branch from 2698668 to 69e7de3 Compare May 10, 2022 23:53
@JesseTatasciore JesseTatasciore force-pushed the jtatasciore/clean-all-bazel-repos branch from 4f1fb3c to 1694b51 Compare May 11, 2022 19:13
@JesseTatasciore
Copy link
Member Author

Related tickets for completing some of the missing work:
#210
#211

@JesseTatasciore JesseTatasciore merged commit a1034bd into main May 26, 2022
@JesseTatasciore JesseTatasciore deleted the jtatasciore/clean-all-bazel-repos branch May 26, 2022 16:42
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.

help manage my disk space
4 participants