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

[Core] Fix aws dependency check #2942

Merged
merged 5 commits into from
Jan 4, 2024
Merged

[Core] Fix aws dependency check #2942

merged 5 commits into from
Jan 4, 2024

Conversation

Michaelvll
Copy link
Collaborator

Since we remove the aws dependency from the pip install skypilot, we need to check the installation of the AWS dependency in sky check.

To reproduce this:

pip install .
pip install awscli
sky check

Error:

...
  File "/home/gcpuser/skypilot/sky/clouds/service_catalog/aws_catalog.py", line 197, in validate_region_zone
    return common.validate_region_zone_impl('aws', _get_df(), region, zone)
  File "/home/gcpuser/skypilot/sky/clouds/service_catalog/aws_catalog.py", line 158, in _get_df
    _user_df = _fetch_and_apply_az_mapping(_default_df)
  File "/home/gcpuser/skypilot/sky/clouds/service_catalog/aws_catalog.py", line 114, in _fetch_and_apply_az_mapping
    user_identity_list = aws.AWS.get_current_user_identity()
  File "/home/gcpuser/skypilot/sky/clouds/aws.py", line 626, in get_current_user_identity
    except aws.botocore_exceptions().NoCredentialsError as e:
  File "/home/gcpuser/skypilot/sky/adaptors/aws.py", line 88, in wrapper
    raise ImportError('Fail to import dependencies for AWS. '
ImportError: Fail to import dependencies for AWS. Try pip install "skypilot[aws]"

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • The reproducible code above.
  • All smoke tests: pytest tests/test_smoke.py
  • Relevant individual smoke tests: pytest tests/test_smoke.py::test_fill_in_the_name
  • Backward compatibility tests: bash tests/backward_comaptibility_tests.sh

Copy link
Collaborator

@concretevitamin concretevitamin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Michaelvll.

Can we also check #2926 ? E.g., when [aws] or [gcp] are not installed, does sky show-gpus work (it should)?

sky/clouds/aws.py Outdated Show resolved Hide resolved
Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>
@Michaelvll
Copy link
Collaborator Author

Thanks @Michaelvll.

Can we also check #2926 ? E.g., when [aws] or [gcp] are not installed, does sky show-gpus work (it should)?

Thanks for mentioning this! Just tried sky show-gpus in a clean env with docker run -it --rm --name skypilot-debug2 berkeleyskypilot/skypilot-debug /bin/bash, and it seems working normally without [aws] or [gcp].

@Michaelvll Michaelvll merged commit b13e9c6 into master Jan 4, 2024
19 checks passed
@Michaelvll Michaelvll deleted the fix-check-for-aws branch January 4, 2024 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants