Skip to content

Commit

Permalink
revert controller activate
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Jan 5, 2025
1 parent afce457 commit a2fe5de
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 3 additions & 1 deletion sky/cloud_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ def _gsutil_command(self):
gsutil_alias, alias_gen = data_utils.get_gsutil_command()
return (f'{alias_gen}; GOOGLE_APPLICATION_CREDENTIALS='
f'{gcp.DEFAULT_GCP_APPLICATION_CREDENTIAL_PATH}; '
f'{gcp.ACTIVATE_SERVICE_ACCOUNT_COMMAND}; '
'gcloud auth activate-service-account '
'--key-file=$GOOGLE_APPLICATION_CREDENTIALS '
'2> /dev/null || true; '
f'{gsutil_alias}')

def is_directory(self, url: str) -> bool:
Expand Down
7 changes: 0 additions & 7 deletions sky/clouds/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,6 @@
source ~/google-cloud-sdk/path.bash.inc >> {_GCLOUD_INSTALLATION_LOG} 2>&1; }}; }} && \
popd &>/dev/null'

ACTIVATE_SERVICE_ACCOUNT_COMMAND: str = (
'GOOGLE_APPLICATION_CREDENTIALS='
f'{DEFAULT_GCP_APPLICATION_CREDENTIAL_PATH} && '
'gcloud auth activate-service-account '
'--key-file=$GOOGLE_APPLICATION_CREDENTIALS '
'2> /dev/null || true')

# TODO(zhwu): Move the default AMI size to the catalog instead.
DEFAULT_GCP_IMAGE_GB = 50

Expand Down
3 changes: 1 addition & 2 deletions sky/utils/controller_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ def _get_cloud_dependencies_installation_commands(
elif isinstance(cloud, clouds.GCP):
step_prefix = prefix_str.replace('<step>', str(len(commands) + 1))
commands.append(f'echo -en "\\r{step_prefix}GCP SDK{empty_str}" &&'
f'{gcp.GOOGLE_SDK_INSTALLATION_COMMAND} && '
f'{{ {gcp.ACTIVATE_SERVICE_ACCOUNT_COMMAND}; }}')
f'{gcp.GOOGLE_SDK_INSTALLATION_COMMAND}')
elif isinstance(cloud, clouds.Kubernetes):
step_prefix = prefix_str.replace('<step>', str(len(commands) + 1))
commands.append(
Expand Down

0 comments on commit a2fe5de

Please sign in to comment.