-
Notifications
You must be signed in to change notification settings - Fork 589
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
[Core] Fix status refresh for INIT cluster #2491
Conversation
sky/backends/backend_utils.py
Outdated
logger.debug( | ||
f'Refreshing status ({cluster_name!r}): failed ' | ||
f'to get the ssh ports. Handle: {handle}') | ||
raise exceptions.FetchIPError( |
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.
Shall we use a new exception named FetchPortError
instead?
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.
Changed to RuntimeError
, as this error is only internal facing and should not be raised in most cases, we probably don't want to add a new exception. Wdyt?
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.
Sounds good!
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.
Just tested and it works great for me! Left several nits ;)
sky/backends/backend_utils.py
Outdated
raise exceptions.FetchIPError( | ||
reason=exceptions.FetchIPError.Reason.HEAD) | ||
|
||
if handle.head_ssh_port is None: | ||
# Refresh the ssh ports. It is ok to refresh as it is fast. | ||
handle.external_ssh_ports() |
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.
Shall we use update_ssh_ports
for better readability?
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.
Good point! Actually, we don't need to handle this None
or refresh case, as we already have it in the external_ssh_ports
call. changed to that instead.
sky/backends/backend_utils.py
Outdated
logger.debug( | ||
f'Refreshing status ({cluster_name!r}): failed ' | ||
f'to get the ssh ports. Handle: {handle}') | ||
raise exceptions.FetchIPError( |
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.
Sounds good!
Fixes #2490
Tested (run the relevant ones):
bash format.sh
pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh