Skip to content

Conversation

@calvinhzy
Copy link
Member


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

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.json automatically.
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.

@calvinhzy calvinhzy self-assigned this Jul 3, 2025
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jul 3, 2025

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@yonzhan
Copy link
Collaborator

yonzhan commented Jul 3, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Jul 3, 2025

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link

github-actions bot commented Jul 3, 2025

@calvinhzy calvinhzy force-pushed the storage-blob-preview-drop-track1-sdk branch from 83112d9 to 3f1a091 Compare July 3, 2025 06:47
@calvinhzy calvinhzy marked this pull request as ready for review July 3, 2025 07:08
Copilot AI review requested due to automatic review settings July 3, 2025 07:08
@calvinhzy calvinhzy requested a review from evelyn-ys as a code owner July 3, 2025 07:08
Copy link
Contributor

Copilot AI left a 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_v2 and create_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.")
Copy link

Copilot AI Jul 3, 2025

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."

Suggested change
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.")

Copilot uses AI. Check for mistakes.
@calvinhzy calvinhzy merged commit 7fa3a66 into Azure:main Jul 3, 2025
24 checks passed
@azclibot
Copy link
Collaborator

azclibot commented Jul 3, 2025

[Release] Update index.json for extension [ storage-blob-preview-1.0.0b2 ] : https://dev.azure.com/msazure/One/_build/results?buildId=129218228&view=results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants