{aem} Remove DATA_COSMOS_TABLE and DATA_STORAGE references#9108
{aem} Remove DATA_COSMOS_TABLE and DATA_STORAGE references#9108calvinhzy merged 3 commits intoAzure:mainfrom
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>
|
|
…h to Standard_D2s_v3, rerun all tests
There was a problem hiding this comment.
Pull Request Overview
This PR removes deprecated Track 1 SDK references by updating to Track 2 SDK equivalents for Azure Storage and Table services. The changes are part of modernizing the Azure CLI AEM extension after the Track 1 SDK was deprecated and removed from the main CLI repository.
- Replace deprecated DATA_COSMOS_TABLE and DATA_STORAGE resource types with Track 2 equivalents
- Update storage and table client initialization to use new SDK patterns
- Add VM size specifications to test commands for consistency
Reviewed Changes
Copilot reviewed 4 out of 18 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/aem/setup.py | Increments version from 1.0.0 to 1.0.1 |
| src/aem/azext_aem/tests/latest/test_aem_commands.py | Adds VM size parameter and changes test location for consistency |
| src/aem/azext_aem/custom.py | Updates storage and table service clients from Track 1 to Track 2 SDK |
| src/aem/HISTORY.rst | Documents the SDK migration in release notes |
| blob_client = blob_service_client.get_blob_client(container, blob) | ||
| # convert to GB | ||
| return int(storage_client.get_blob_properties(container, blob).properties.content_length / (1 << 30)) | ||
| return int(blob_client.properties.size / (1 << 30)) |
There was a problem hiding this comment.
This code assumes blob_client.properties exists without first calling get_blob_properties(). The properties may not be populated until explicitly retrieved. Consider calling blob_properties = blob_client.get_blob_properties() and then accessing blob_properties.size.
| return int(blob_client.properties.size / (1 << 30)) | |
| blob_properties = blob_client.get_blob_properties() | |
| return int(blob_properties.size / (1 << 30)) |
|
[Release] Update index.json for extension [ aem-1.0.1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=135644639&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
Remove DATA_COSMOS_TABLE and DATA_STORAGE references as track 1 sdk has been deprecated and removed from main CLI repo.
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.