Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
andylizf committed Oct 10, 2024
1 parent dd3c27b commit 6c5a04d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions sky/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2768,13 +2768,14 @@ def _down_or_stop_clusters(
hint_or_raise = _CONTROLLER_TO_HINT_OR_RAISE[controller]
if not force:
try:
# TODO(zhwu): This hint or raise is not transactional, which
# means even if it passed the check with no in-progress spot
# or service and prompt the confirmation for termination,
# a user could still do a `sky jobs launch` or a
# `sky serve up` before typing the delete, causing a leaked
# managed job or service. We should make this check atomic
# with the termination.
# TODO(zhwu): This hint or raise is not transactional,
# which means even if it passed the check with no
# in-progress spot or service and prompt the
# confirmation for termination, a user could still
# do a `sky jobs launch` or a `sky serve up` before
# typing the delete, causing a leaked managed job or
# service. We should make this check atomic with the
# termination.
hint_or_raise(controller_name)
except (exceptions.ClusterOwnerIdentityMismatchError,
RuntimeError) as e:
Expand Down

0 comments on commit 6c5a04d

Please sign in to comment.