-
Notifications
You must be signed in to change notification settings - Fork 415
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
[Provisioner] Avoid backward compatibility issue with provisioner #2682
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, may need this in soon as a hot fix. @suquark should take a look asap/after?
from sky.provision import common | ||
from sky.provision import gcp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
later we may scan over the directory to import all modules automatically. I am fine with the current implementation though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ypilot-org#2682) * import cloud provisioners in advance instead of importing it online * Fix lower * format * bump skylet version * Add comment * Add a comment for skylet version
Previously, the cloud-specific provisioner will only be imported when the
sky.provision.<cloud>
is used for termination and stop for spot jobs (when provisioning logic is not implemented for the cloud). It will cause backward compatibility issue, when the following happens:sky spot launch
on master (job id: 1)sky.provision.<cloud>
sky spot launch
another job, which updates the skypilot library on the spot controllersky spot cancel -a
, which will load the latestsky.provision.<cloud>
, which may not be compatible with other old code the spot job 1 used.In this PR, we import the provision modules in advance to avoid the backward compatibility issue for any changes in
sky.provision
andsky.adaptors.<cloud>
after this PR.Tested (run the relevant ones):
bash format.sh
sky launch --cloud aws --cpus 2 -i 0 echo hi
with only aws dependency installed.sky launch --cloud gcp --cpus 2 -i 0 echo hi; sky status -r; sky down cluster-name
with only gcp dependency installed.sky launch --cloud azure --cpus 2 -i 0 echo hi
with only azure dependency installed.pytest tests/test_smoke.py --aws
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh
for awsbash tests/backward_comaptibility_tests.sh
for gcp