-
Notifications
You must be signed in to change notification settings - Fork 39
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
add info msg to cli output if logs are not available #1689
Conversation
runhouse/main.py
Outdated
@@ -501,8 +501,14 @@ def cluster_logs( | |||
headers=rns_client.request_headers(), | |||
) | |||
|
|||
if ( | |||
resp.status_code == 404 | |||
and resp.json().get("detail") == "No logs found for the requested resource" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to parse the output, don't we know if its a 404 that the logs arent readfy yety?
34dd406
to
42ece33
Compare
runhouse/main.py
Outdated
if resp.status_code != 200: | ||
console.print("Failed to load cluster logs.") | ||
console.print(f"Failed to load cluster logs: {resp.json().get('detail')}.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any additional info here in the response we would want to expose to a user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well it feels like it will be a bit easier to debug it, since the user might just report us the response msg back to us so well get a sense of what went wrong before going though the logs. But I see your point why we should not print it to the user, removing.
42ece33
to
27c8405
Compare
No description provided.