-
Notifications
You must be signed in to change notification settings - Fork 510
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] Fix Azure disk tier explicitly shown in resources str #3064
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.
Thanks for submitting the PR @cblmemo! Left a comment.
sky/clouds/azure.py
Outdated
def _failover_disk_tier() -> Optional[resources_utils.DiskTier]: | ||
# Failover disk tier. | ||
all_tiers = list(reversed(resources_utils.DiskTier)) | ||
start_index = all_tiers.index( | ||
Azure._translate_disk_tier(r.disk_tier)) | ||
while start_index < len(all_tiers): | ||
disk_tier = all_tiers[start_index] | ||
ok, _ = Azure.check_disk_tier(r.instance_type, disk_tier) | ||
if ok: | ||
return disk_tier | ||
start_index += 1 | ||
return None |
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.
Does this mean a user specifying --disk-tier medium
may get an instance with disk_tier low?
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.
Good point! We should only do failover if the disk tier is None or BEST. Just pushed a commit to fix that.
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.
Just re-run every tests and passed
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.
Thanks for the fix @cblmemo! LGTM.
Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>
Co-authored-by: Zhanghao Wu <zhanghao.wu@outlook.com>
To reproduce:
Tested (run the relevant ones):
bash format.sh
sky launch -t Standard_D8_v5 --disk-tier medium
and correctly throws an errorpytest tests/test_smoke.py
pytest tests/test_smoke.py::test_fill_in_the_name
bash tests/backward_comaptibility_tests.sh