Skip to content

Commit

Permalink
Add basic remediation advice to LowDiskSpace(MacOS) Problem in doctor
Browse files Browse the repository at this point in the history
Summary:
This diff adds a basic remediation message to LowDiskSpace Problem and moves the help text of LowDiskSpaceMacOS to the remediation message.

This is being done because LowDiskSpace Problems were being counted as a Problem without a defined fix. This change makes them Manual Fix problems.

Reviewed By: MichaelCuevas

Differential Revision: D69066997

fbshipit-source-id: 16961efc6e185432172ccd02b16a3c1062d838c1
  • Loading branch information
Chris Dinh authored and facebook-github-bot committed Feb 4, 2025
1 parent 1eb04fe commit 42136be
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions eden/fs/cli/doctor/check_filesystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ def get_mount_pts_set(

class LowDiskSpace(Problem):
def __init__(self, message: str, severity: ProblemSeverity) -> None:
super().__init__(message, severity=severity)
remediation_msg = "Check your disk usage and free up space."
super().__init__(message, remediation=remediation_msg, severity=severity)


class LowDiskSpaceMacOS(Problem):
Expand All @@ -226,12 +227,12 @@ class LowDiskSpaceMacOS(Problem):
util_purge = "eden du --purgeable"

def __init__(self, message: str, severity: ProblemSeverity) -> None:
addtl_msg = (
remediation_msg = (
f"\nA significant portion of your disk may be used up by purgeable "
f"space. You can check and clear purgeable space with: \n\n'{self.util_purge}'\n\n"
f"See https://fburl.com/edenfs_purgeable for more info.\n"
)
super().__init__(message + addtl_msg, severity=severity)
super().__init__(message, remediation=remediation_msg, severity=severity)


def check_disk_usage(
Expand Down

0 comments on commit 42136be

Please sign in to comment.