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] Support checking user specified cloud(s) with sky check from CLI #3229

Merged
merged 14 commits into from
May 16, 2024

Conversation

dtran24
Copy link
Contributor

@dtran24 dtran24 commented Feb 25, 2024

Fixes #3131

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
    • sky check. Tests no cloud being specified. All clouds checked as expected
    • sky check aws. Tests checking single enabled cloud
    • sky check aws gcp. Tests checking mix of multiple enabled clouds
    • sky check aws gcp oci. Tests checking mix of enabled and disabled clouds
    • sky check gcp oci aws. Tests alphabetical
    • sky check aws gcp oci fluidstack
    • sky check aws gcp oci Test. Tests invalid cloud. As expected, raises error
  • 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

@dtran24 dtran24 marked this pull request as ready for review February 25, 2024 22:21
@dtran24
Copy link
Contributor Author

dtran24 commented Feb 25, 2024

Requesting review @Michaelvll @romilbhardwaj

Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

Thanks @dtran24! This is great, personally this feature will save me a lot of time :)

sky/check.py Outdated Show resolved Hide resolved
sky/cli.py Outdated Show resolved Hide resolved
sky/check.py Show resolved Hide resolved
sky/cli.py Show resolved Hide resolved
sky/check.py Outdated Show resolved Hide resolved
@concretevitamin
Copy link
Member

This is very useful and we should get it in soon!

@dtran24
Copy link
Contributor Author

dtran24 commented Mar 28, 2024

PTAL when you have the chance! @romilbhardwaj

Copy link
Collaborator

@romilbhardwaj romilbhardwaj left a comment

Choose a reason for hiding this comment

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

Thanks @dtran24! Tested it and works nicely! Left some comments on the code.

sky/check.py Show resolved Hide resolved
sky/check.py Outdated Show resolved Hide resolved
sky/check.py Show resolved Hide resolved
sky/check.py Outdated Show resolved Hide resolved
sky/check.py Outdated

def check_one_cloud(cloud_tuple: Tuple[str, clouds.Cloud]) -> None:
def check_one_cloud(cloud_tuple: Tuple[str, Any]) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note - Any was required for cloudflare support, which is not a cloud but a module.

Copy link
Collaborator

Choose a reason for hiding this comment

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

How about Union[sky_clouds.Cloud, ModuleType]? (from types import ModuleType)

@romilbhardwaj
Copy link
Collaborator

Ready for review @cblmemo! Tested with:

  • Tests from PR description:
    • sky check. Tests no cloud being specified. All clouds checked as expected
    • sky check aws. Tests checking single enabled cloud
    • sky check aws gcp. Tests checking mix of multiple enabled clouds
    • sky check aws gcp oci. Tests checking mix of enabled and disabled clouds
    • sky check gcp oci aws. Tests alphabetical
    • sky check aws gcp oci fluidstack
    • sky check aws gcp oci Test. Tests invalid cloud. As expected, raises error
  • Manual sky jobs launch --cloud gcp -- echo hi
  • Manual sky launch --cloud gcp -- echo hi

Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @romilbhardwaj ! The PR looks great to me except for several its. It should be ready to go after fixing those!

sky/check.py Outdated

def check_one_cloud(cloud_tuple: Tuple[str, clouds.Cloud]) -> None:
def check_one_cloud(cloud_tuple: Tuple[str, Any]) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about Union[sky_clouds.Cloud, ModuleType]? (from types import ModuleType)

sky/check.py Show resolved Hide resolved
sky/check.py Outdated Show resolved Hide resolved
sky/cli.py Show resolved Hide resolved
sky/check.py Show resolved Hide resolved
Copy link
Collaborator

@cblmemo cblmemo left a comment

Choose a reason for hiding this comment

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

Thanks for the quick fix! LGTM :))

@romilbhardwaj
Copy link
Collaborator

Thanks for the reviews @cblmemo! Merging now.

@romilbhardwaj romilbhardwaj merged commit f24425c into skypilot-org:master May 16, 2024
20 checks passed
@concretevitamin
Copy link
Member

concretevitamin commented May 16, 2024 via email

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.

[UX] sky check support checking a single cloud
4 participants