-
Notifications
You must be signed in to change notification settings - Fork 1.5k
{Storage-Blob-Preview} Remove DATA_STORAGE and DATA_COSMOS_TABLE references, remove unused code #8930
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
{Storage-Blob-Preview} Remove DATA_STORAGE and DATA_COSMOS_TABLE references, remove unused code #8930
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>
|
|
83112d9 to
3f1a091
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.
Pull Request Overview
This PR removes obsolete storage utility code, introduces versioned SAS helper functions, bumps the extension version, and updates tests and recordings to align with the new API behavior.
- Bumped the package version from 1.0.0b1 to 1.0.0b2 in setup.py
- Pruned unused functions in util.py and added
create_short_lived_blob_sas_v2andcreate_short_lived_file_sas_v2 - Updated scenario tests and recordings with the new service API version, timestamps, and expected outputs
Reviewed Changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/storage-blob-preview/setup.py | Version increment to 1.0.0b2 |
| src/storage-blob-preview/azext_storage_blob_preview/util.py | Removed legacy code, imported CUSTOM_DATA_STORAGE_BLOB, and added new v2 SAS functions |
| src/storage-blob-preview/azext_storage_blob_preview/tests/latest/test_storage_blob_scenarios.py | Adjusted expected hourMetrics.enabled in service-properties test |
| src/storage-blob-preview/azext_storage_blob_preview/tests/latest/recordings/test_storage_blob_versioning.yaml | Updated API version, user-agent, dates, and headers in versioning recording |
| src/storage-blob-preview/azext_storage_blob_preview/tests/latest/recordings/test_storage_blob_update_service_properties.yaml | Aligned XML payload and content-length for updated service-properties recording |
| src/storage-blob-preview/azext_storage_blob_preview/tests/latest/recordings/test_storage_blob_soft_delete.yaml | Refined recording timestamps, etags, and trimmed placeholder request bodies |
Comments suppressed due to low confidence (3)
src/storage-blob-preview/azext_storage_blob_preview/util.py:11
- Consider adding a docstring to explain the parameters and behavior of this new helper function for maintainability.
def create_short_lived_blob_sas_v2(cmd, account_name, container, blob, account_key=None, user_delegation_key=None):
src/storage-blob-preview/azext_storage_blob_preview/util.py:28
- There are no existing tests for this new v2 function; consider adding unit or scenario tests to ensure its correct behavior.
def create_short_lived_file_sas_v2(cmd, account_name, account_key, share, directory_name, file_name):
src/storage-blob-preview/azext_storage_blob_preview/util.py:11
- [nitpick] The parameter ordering differs from the original
create_short_lived_blob_sas— consider documenting or aligning the signature to prevent confusion for callers.
def create_short_lived_blob_sas_v2(cmd, account_name, container, blob, account_key=None, user_delegation_key=None):
| elif user_delegation_key: | ||
| sas = t_sas(account_name, user_delegation_key=user_delegation_key) | ||
| else: | ||
| raise ValueError("Either account key or user delegation key need to be provided.") |
Copilot
AI
Jul 3, 2025
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.
The error message has a grammar issue; consider rephrasing to "Either an account key or a user delegation key must be provided."
| raise ValueError("Either account key or user delegation key need to be provided.") | |
| raise ValueError("Either an account key or a user delegation key must be provided.") |
|
[Release] Update index.json for extension [ storage-blob-preview-1.0.0b2 ] : https://dev.azure.com/msazure/One/_build/results?buildId=129218228&view=results |
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.