-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add compatible logic for the track 2 migration of resource #3355
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
a23819a to
3d4319c
Compare
|
Since part of the
|
src/service_name.json
Outdated
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.
follow alphabetical order
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 catch! OK
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.
It seems that there is no test run in live mode?
6adfea2 to
3ef11a4
Compare
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.
We are also using the resourceClient here:
| providerDetails = resourceClient.providers.get('Microsoft.Kubernetes') |
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 your reminder~ In fact, I know it. However, there is no breaking change for this operation (code link), so no additional compatibility logic is required.
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.
There is another place where we use ResourceType.MGMT_RESOURCE_RESOURCES.
| groups = cf_resource_groups(ctx, subscription_id=subscription_id) |
imported from:
| return get_mgmt_service_client(cli_ctx, ResourceType.MGMT_RESOURCE_RESOURCES, |
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.
Yes, I know it. However, there is no breaking change in this logic, so no additional compatibility logic is required.
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.
For the breaking changes in the new azure-mgmt-resource SDK, please refer to the description of PR Azure/azure-cli#17783
Yes, because most of the modified modules are not owned by us. Some live tests will fail due to non resource SDK reasons (such as some fixed resources cannot be found or do not have resource permissions), and some of the cases are not covered. |
3ef11a4 to
805f5c3
Compare
src/k8s-extension/setup.py
Outdated
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.
We have another version coming out 0.4.0 so depending on when this goes in, this version might need to be changed
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.
OK, may I ask what is your expected version here?
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.
This should now be 0.4.1
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.
Yes, it has been updated
jonathan-innis
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.
Small comment on versioning
JunSun17
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.
For the aks -preview part, looks good to me.
jonathan-innis
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.
Please hold this as a call is failing
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.
This call in begin_create_or_update is failing. It is coming with ERROR: 'DeploymentsOperations' object has no attribute 'begin_create_or_update'
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.
As the upgrade of azure-mgmt-resource in CLI main repo has not been released, it can only be tested through the dev environment. So may I ask if you are using CLI in dev environment and pulled the latest code from remote dev branch?
The expected version of azure-mgmt-resource is 16.1.0, please execute pip list to confirm whether the version is correct~
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.
@jonathan-innis May I ask can you pass the test now?
d90cf7e to
7e8783c
Compare
7e8783c to
26ed2d2
Compare
|
As I have communicated with @jeffj6123, module |
Because Python SDK used by resource module needs to be migrated to track 2 recently, there are a lot of breaking changes in track 2, while the Python SDK of
azure-mgmt-resourceused byazure-cli-extensionis the same asazure-cli. Therefore, the modules that use Python SDK ofazure-mgmt-resourceinazure-cli-extensionshould be added with the compatible logic of track 2.Please refer to the PR description Azure/azure-cli#17783 for specific compatibility logic to be added
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update
src/index.jsonautomatically.The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify
src/index.json.