Skip to content

Commit

Permalink
Make sky status -r updates the owner of the cluster (#1809)
Browse files Browse the repository at this point in the history
* update the owner list if the owner identity is less than the current one

* Update the comments

* rephrase
  • Loading branch information
Michaelvll authored Mar 24, 2023
1 parent 678b09a commit fae047f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions sky/backends/backend_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1768,8 +1768,16 @@ def check_owner_identity(cluster_name: str) -> None:
f'The cluster was owned by {owner_identity}, but '
f'a new identity {current_user_identity} is activated. We still '
'allow the operation as the two identities are likely to have '
'the same access to the cluster, but please be aware that '
'this is not guaranteed.')
'the same access to the cluster. Please be aware that this can '
'cause unexpected cluster leakage if the two identities are not '
'actually equivalent (e.g., belong to the same person).'
)
if i != 0 or len(owner_identity) != len(current_user_identity):
# We update the owner of a cluster, when:
# 1. The strictest identty (i.e. the first one) does not
# match, but the latter ones match.
# 2. The length of the two identities are different, which
# will only happen when the cluster is launched before #1808.
# Update the user identity to avoid showing the warning above
# again.
global_user_state.set_owner_identity_for_cluster(
Expand Down

0 comments on commit fae047f

Please sign in to comment.