Skip to content

Commit

Permalink
Add detector for network environment
Browse files Browse the repository at this point in the history
Summary:
## Context

It's helpful to collect information about the networking environment when edenfs is not working properly.

## This Diff

Added a hook for `eden rage` to check networking environment. It should be implemented based on specific requirements.

Reviewed By: jdelliot

Differential Revision: D68598730

fbshipit-source-id: dc1b1748a6b03f8b66d981525abaffe0b7ffdbd1
  • Loading branch information
lXXXw authored and facebook-github-bot committed Jan 24, 2025
1 parent 1d5f114 commit 1518f43
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions eden/fs/cli/rage.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
from .facebook.rage import (
find_fb_cdb,
get_host_dashboard_url,
get_networking_environment,
get_quickstack_cmd,
setup_fb_env,
)
Expand All @@ -62,6 +63,9 @@ def get_quickstack_cmd(
) -> Optional[List[str]]:
return None

def get_networking_environment() -> Optional[str]:
return None


try:
from eden.fs.cli.doctor.facebook.check_vscode_extensions import (
Expand Down Expand Up @@ -179,11 +183,16 @@ def print_diagnostic_info(
section_title("System info:", out)
user = getpass.getuser()
host = hostname_mod.get_normalized_hostname()
net_env = get_networking_environment()
header = (
f"User : {user}\n"
f"Hostname : {host}\n"
f"Version : {version_mod.get_current_version()}\n"
)

if net_env:
header += f"Network : {net_env}\n"

out.write(header)
if sys.platform != "win32":
# We attempt to report the RPM version on Linux as well as Mac, since Mac OS
Expand Down

0 comments on commit 1518f43

Please sign in to comment.