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] Print useful message when image id not found #2535

Merged
merged 11 commits into from
Sep 28, 2023
Merged

[UX] Print useful message when image id not found #2535

merged 11 commits into from
Sep 28, 2023

Conversation

cblmemo
Copy link
Collaborator

@cblmemo cblmemo commented Sep 8, 2023

Fixes #2519 by adding some messages to help the user debug. Most of the messages are pasted from our yaml-spec.rst.

Current docker implementation won't check whether the docker image exists, so no message for docker is added in this PR.

Tested (run the relevant ones):

  • Code formatting: bash format.sh
  • Any manual or new tests for this PR (please specify below)
(sky-dev) ➜  skypilot git:(ux-image-id) $ sky launch --cloud gcp --image-id some-random-string
ValueError: Image 'some-random-string' not found in GCP.

To find GCP images: https://cloud.google.com/compute/docs/images
Format: projects/<project-id>/global/images/<image-name>
Example: projects/deeplearning-platform-release/global/images/common-cpu-v20230615-debian-11-py310

To find machine images: https://cloud.google.com/compute/docs/machine-images
Format: projects/<project-id>/global/machineImages/<machine-image-name>

You can query image id using: gcloud compute images list --project <project-id> --no-standard-images
To query common AI images: gcloud compute images list --project deeplearning-platform-release | less
(sky-dev) ➜  skypilot git:(ux-image-id) $ sky launch --cloud aws --image-id some-random-string --region us-east-1
ValueError: Image 'some-random-string' not found in AWS region us-east-1.

To find AWS AMI IDs: https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-images.html#examples
Example: ami-0729d913a335efca7
  • 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 @cblmemo. Minor UX nits. I guess it's fine to leave docker:xxx to the future?

sky/clouds/gcp.py Outdated Show resolved Hide resolved
sky/clouds/gcp.py Outdated Show resolved Hide resolved
sky/clouds/gcp.py Outdated Show resolved Hide resolved
sky/clouds/gcp.py Outdated Show resolved Hide resolved
sky/clouds/aws.py Outdated Show resolved Hide resolved
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 @cblmemo, LGTM.

@@ -83,15 +84,18 @@
# TODO(zhwu): Move the default AMI size to the catalog instead.
DEFAULT_GCP_IMAGE_GB = 50

USER_PORTS_FIREWALL_RULE_NAME = 'sky-ports-{}'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Short comment? Add a blank line to separate it from L88

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry wdym by 'short comment'? Did you mean to short the following string so we could get rid of the # pylint: disable=line-too-long?

Copy link
Collaborator

Choose a reason for hiding this comment

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

# Describe this var briefly.
USER_PORTS_FIREWALL_RULE_NAME = 'sky-ports-{}'

:)

@cblmemo cblmemo merged commit 33b05ff into master Sep 28, 2023
18 checks passed
@cblmemo cblmemo deleted the ux-image-id branch September 28, 2023 20:22
jc9123 pushed a commit to jc9123/skypilot that referenced this pull request Oct 11, 2023
* add aws, gcp

* fix

* fix

* add IBM message

* Update sky/clouds/gcp.py

Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>

* Update sky/clouds/aws.py

Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>

* apply suggestion from code review

* add newline

* add blank line

* add comments for constants

---------

Co-authored-by: Zongheng Yang <zongheng.y@gmail.com>
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: image 'xxx' not found error should print to-fix and cloud command used to query
2 participants