skypilot icon indicating copy to clipboard operation
skypilot copied to clipboard

Replace deprecated azure.common usages

Open Programmerino opened this issue 1 year ago • 1 comments

azure.common is deprecated and throws the following error on newer version:

The public API of azure-cli-core has been deprecated starting 2.21.0, and this method can no longer return a valid credential. If you need to still use this method, you need to install 'azure-cli-core<2.21.0'. You may corrupt data if you use current CLI and old azure-cli-core.

This PR replaces the relevant code (very few places), using new APIs and CLI parsing instead (unfortunately the recommended route)

I'm not able to run smoke tests on my machine, so if someone wants to make sure the changes to the skylet code are OK, that would be good.

Tested (run the relevant ones):

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

Programmerino avatar Apr 23 '24 07:04 Programmerino

@cblmemo Thank you for the comments, I think this should fix the issues you mentioned. The only dubious part I see is I'm not sure if it's OK to be importing from the adapter in the skylet code, or if I should move that code somewhere else.

Programmerino avatar Apr 25 '24 21:04 Programmerino

This issue seems not happening with the latest azure-cli-2.62.0. Could you share which version of azure-cli are you using that causes the issue?

Michaelvll avatar Jul 15 '24 19:07 Michaelvll