-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Packaging] Bump bundled python to 3.8.9 and remove more network SDK APIs for MSI
#17816
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
Conversation
|
Looks like not all Network related extensions are using vendored_sdk, although there is vendored_sdk folder, but some places still use Network defined in CLI core. I remember some extensions are broken when Network SDK version is bumped in CLI core. |
In azure-cli-extensions repo:
So no sign of extensions using a hard-coded API version from azure-cli installed network SDK. |
Juliehzl
left a comment
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.
Have you test the new build with all test scenarios?
Yes. Tested locally with |
| # use the version in a profile as much as possible. | ||
| AD_HOC_API_VERSIONS = { | ||
| ResourceType.MGMT_NETWORK: { | ||
| 'vm_default_target_network': '2018-01-01', |
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.
Define a const variable? VM_DEFAULT_TARGET_NETWORK = 'vm_default_target_network'
| version = get_api_version(cli_ctx, ResourceType.MGMT_NETWORK) | ||
| if cli_ctx.cloud.profile == 'latest': | ||
| version = '2018-01-01' | ||
| version = AD_HOC_API_VERSIONS[ResourceType.MGMT_NETWORK]['vm_default_target_network'] |
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.
Define a const variable? VM_DEFAULT_TARGET_NETWORK = 'vm_default_target_network'
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 suggestion, but as this is temp work, eventually this will be removed, I'll check in as it is now to catch the release. Using hardcoded api version should not be allowed or we should support more dimensions in profile definition so it's possible to use different api versions in different modules. Leave this work to profile owner.
Description
The bundled Python in MSI is bumped to
3.8.9. The source code of python is moved from ·site-packages· topython38.zip(which is the original format in the embeddable python). lib2to3 is removed from it as it's not needed.This PR removes more network SDK API versions with a script to check all used versions in profile and hard-coded ones plus the default versions in
models.py, and only keep them in MSI. All hard-coded network APIs used inazure-cliis refactored into one place in_shared.py. Note that all network related extensions are using vendored SDK, so removing a version that is higher than current used versions should not affect thisazure-cliversion working with future extensions that may use the higher version network SDK.Testing Guide
History Notes
[Packaging] Bump bundled python to
3.8.9in MSI.This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.