-
Notifications
You must be signed in to change notification settings - Fork 1.5k
{aem} Remove msrestazure dependency from aem #8842
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
️✔️Azure CLI Extensions Breaking Change Test
|
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
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.
Pull Request Overview
This pull request updates the version of the AEM extension and removes the msrestazure dependency, replacing it with azure core and azure mgmt core tools.
- Version bump from 0.3.0 to 0.3.1
- Replaced msrestazure imports and exception handling with their azure counterparts
- Updated HISTORY.rst to document the changes
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/aem/setup.py | Updated version number |
| src/aem/azext_aem/custom.py | Updated exception handling and dependency imports |
| src/aem/HISTORY.rst | Documented the new version and changes |
Comments suppressed due to low confidence (1)
src/aem/azext_aem/custom.py:268
- Ensure that the unconditional re-raising of HttpResponseError is the intended behavior after replacing CloudError. If conditional handling for principal not found errors is required, consider replicating a similar check for HttpResponseError based on its error structure.
except HttpResponseError as cex:
|
| 1.0.0 | ||
| +++++ | ||
| * Remove msrestazure dependency |
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.
Releasing it as 1.0.0 will assign a major version which has semantic versioning implications. Can we use 0.3.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.
According to https://github.com/Azure/azure-cli/blob/release/doc/extensions/versioning_guidelines.md#initialization, 0.3.1 is not allowed. 1.0.0 is required
| if ((not cex.error) or (not cex.error.error) or | ||
| (PRINCIPAL_NOT_FOUND_ERROR != cex.error.error.lower())): | ||
| if ((not cex.error) or (not cex.error.code) or | ||
| (PRINCIPAL_NOT_FOUND_ERROR != cex.error.code.lower())): |
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.
If principalType (--assignee-principal-type in az role assignment create) is provided, creating role assignment won't fail at all.
I tested with a non-existing assignee without principalType and verified the cex.error.code is indeed PrincipalNotFound:
az role assignment create --role Contributor --assignee-object-id 8ada7388-5e1f-4455-8693-909abcc039d2 --scope /subscriptions/xxx
|
The failed tests have been rerun in the PR: #8859 |
|
[Release] Update index.json for extension [ aem-1.0.0 ] : https://dev.azure.com/msazure/One/_build/results?buildId=127178233&view=results |

To support Azure/azure-cli#31066
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>locally? (pip install azdevrequired)python scripts/ci/test_index.py -qlocally? (pip install wheel==0.30.0required)For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.jsonautomatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json.