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

More robust status command #38

Merged
merged 3 commits into from
Jul 24, 2024
Merged

More robust status command #38

merged 3 commits into from
Jul 24, 2024

Conversation

Aptimex
Copy link
Collaborator

@Aptimex Aptimex commented Jul 6, 2024

Fixes #37

Adds a 3s timeout when trying to get info from a server via the status command, and still shows data about the rest of the working network instead of immediately exiting.

Copy link
Collaborator

@luker983 luker983 left a comment

Choose a reason for hiding this comment

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

Makes sense to me! Could you please include a side-by-side of the behavior from the Issue and how it looks now as fixed by this PR?

src/api/api.go Show resolved Hide resolved
src/cmd/status.go Outdated Show resolved Hide resolved
src/cmd/status.go Outdated Show resolved Hide resolved
@Aptimex
Copy link
Collaborator Author

Aptimex commented Jul 18, 2024

Makes sense to me! Could you please include a side-by-side of the behavior from the Issue and how it looks now as fixed by this PR?

Before (one server setup but not connected):

./wiretap status
2024/07/17 21:25:48 failed to fetch node's configuration as peer: Get "http://::2:80/serverinfo?": dial tcp [::2]:80: connect: network is unreachable

After:

./wiretap status
2024/07/17 21:25:34 failed to fetch node's configuration as peer: Get "http://::2:80/serverinfo?": dial tcp [::2]:80: connect: network is unreachable

╭────────────────────────╮ 
│ Wiretap Network Status │                                                                                                                                                                                                                  
╰────────────┬───────────╯                                                                                                                                                                                                                  
             │                                                                                                                                                                                                                              
  ╭──────────┴──────────╮                                                                                                                                                                                                                   
  │client               │                                                                                                                                                                                                                   
  │                     │                                                                                                                                                                                                                   
  │  relay: EcX0bRmF... │                                                                                                                                                                                                                   
  │   e2ee: N7Fkb6rq... │                                                                                                                                                                                                                   
  │                     │                                                                                                                                                                                                                   
  ╰─────────────────────╯

@Aptimex
Copy link
Collaborator Author

Aptimex commented Jul 18, 2024

Added a second commit to undo the whitespace and file permission changes.

@luker983
Copy link
Collaborator

I don't have write access to this repository anymore, but I approve!

@Aptimex Aptimex requested a review from a team July 24, 2024 21:55
@Segudmu Segudmu merged commit f53fd29 into sandialabs:main Jul 24, 2024
1 check passed
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.

Status command fails on timeout
3 participants