-
Notifications
You must be signed in to change notification settings - Fork 414
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 the NoOp for rich status #2678
Conversation
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.
Thanks @Michaelvll, LGTM.
@@ -15,7 +15,7 @@ class _NoOpConsoleStatus: | |||
"""An empty class for multi-threaded console.status.""" | |||
|
|||
def __enter__(self): | |||
pass | |||
return self |
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.
Q: which call path into this caused the original issue?
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.
The ones like this:
skypilot/sky/provision/provisioner.py
Lines 352 to 353 in f2cf032
with rich_utils.safe_status( | |
'[bold cyan]Launching - Waiting for SSH access[/]') as status: |
The status
will be None, when the provisioner is called with sky_logging.is_silent()
, which is used for sky spot queue
:
Lines 1620 to 1623 in f2cf032
with sky_logging.silent(): | |
# Make the call silent | |
spot_jobs = core.spot_queue(refresh=refresh, | |
skip_finished=skip_finished) |
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.
SG
* Fix the NoOp for rich status * fix shell completion installation * pin pandas * revert dependency
Fixes #2665
Previously, when
NoOp
is returned,with rich_utils.safe_status() as status:
, thestatus
is actually the return value of__enter__
(None for theNoOp
), causing failure ifstatus
is used later.Tested (run the relevant ones):
bash format.sh
spot queue -r
failed to restart spot controller butstart
works #2665.pytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh