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

[DO] Unexpect output in sky check #4537

Open
Michaelvll opened this issue Jan 7, 2025 · 1 comment
Open

[DO] Unexpect output in sky check #4537

Michaelvll opened this issue Jan 7, 2025 · 1 comment
Labels
good first issue Good for newcomers

Comments

@Michaelvll
Copy link
Collaborator

sky check shows a long output when DO dependencies are not setup. We should avoid the long error message, and make it more user friendly, e.g. see other clouds below

 DO: disabled                              
    Reason: Traceback (most recent call last):
  File "/workspaces/skypilot/sky/clouds/do.py", line 263, in check_credentials
    do_utils.client().droplets.list()
  File "/workspaces/skypilot/sky/provision/do/utils.py", line 94, in client
    _client = _init_client()
  File "/workspaces/skypilot/sky/provision/do/utils.py", line 56, in _init_client
    raise DigitalOceanError(
sky.provision.do.utils.DigitalOceanError: no credentials file found from the following paths ['/home/vscode/Library/Application Support/doctl/config.yaml', '/home/vscode/.config/doctl/config.yaml']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/workspaces/skypilot/sky/adaptors/common.py", line 31, in load_module
    self._module = importlib.import_module(self._module_name)
  File "/opt/conda/envs/sky/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'pydo'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/workspaces/skypilot/sky/check.py", line 41, in check_one_cloud
    ok, reason = cloud.check_credentials()
  File "/workspaces/skypilot/sky/clouds/do.py", line 264, in check_credentials
    except do.exceptions().HttpResponseError as err:
  File "/workspaces/skypilot/sky/adaptors/common.py", line 64, in wrapper
    m.load_module()
  File "/workspaces/skypilot/sky/adaptors/common.py", line 36, in load_module
    raise ImportError(self._import_error_message) from e
ImportError: Failed to import dependencies for DO. Try pip install "skypilot[do]"
  OCI: disabled                              
    Reason: Missing credential file at ~/.oci/config. For more details, refer to: https://docs.skypilot.co/en/latest/getting-started/installation.html#oracle-cloud-infrastructure-oci
  Paperspace: disabled                              
    Reason: Failed to access Paperspace Cloud with credentials.
    To configure credentials, follow the instructions at: https://docs.skypilot.co/en/latest/getting-started/installation.html#paperspace
    Generate API key and create a json at `~/.paperspace/config.json` with 
         {"apiKey": "[YOUR API KEY]"}
    Reason: Credentials not found

Version & Commit info:

  • sky -v: PLEASE_FILL_IN
  • sky -c: PLEASE_FILL_IN
@Michaelvll
Copy link
Collaborator Author

cc'ing @asaiacai @cblmemo

@Michaelvll Michaelvll added the good first issue Good for newcomers label Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant