Skip to content
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

[UX] Add network failure handling for Lambda sky check #2221

Merged
merged 1 commit into from
Jul 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions sky/clouds/lambda_cloud.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Lambda Cloud."""
import json
import requests
import typing
from typing import Dict, Iterator, List, Optional, Tuple

Expand Down Expand Up @@ -227,6 +228,10 @@ def check_credentials(cls) -> Tuple[bool, Optional[str]]:
'to generate API key and add the line\n '
' api_key = [YOUR API KEY]\n '
'to ~/.lambda_cloud/lambda_keys')
except requests.exceptions.ConnectionError:
return False, ('Failed to verify Lambda Cloud credentials. '
'Check your network connection '
'and try again.')
return True, None

def get_credential_file_mounts(self) -> Dict[str, str]:
Expand Down