Repository navigation
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
microsoft-github-policy-service
Bot
requested a review
from Yong Zhang (yonzhan)
October 6, 2026 08:08
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
An explicit account name still prevents the configured service endpoint from being loaded.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Updates storage client validation to honor AZURE_STORAGE_SERVICE_ENDPOINT, while retaining legacy endpoint support.
Changes:
- Adds documented endpoint lookup with legacy fallback.
- Adds validator tests for endpoint precedence and fallback behavior.
| File | Description |
|---|---|
storage/_validators.py |
Resolves configured storage service endpoints. |
storage/tests/latest/test_storage_validators.py |
Tests endpoint resolution and precedence. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+135
to
+136
| n.account_url = (get_config_value(cmd, 'storage', 'service_endpoint', None) or | ||
| get_config_value(cmd, 'storage', 'account_url', None)) |
| validate_source_url, | ||
| validate_encryption_services, as_user_validator, | ||
| get_not_none_validator, validate_upload_blob) | ||
| get_not_none_validator, validate_upload_blob, |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Fixes #34155
Related command
az storage blob list(and all storage data-plane commands usingvalidate_client_parameters)Description
The help text for
--blob-endpoint(and other--*-endpointargs) documentsAZURE_STORAGE_SERVICE_ENDPOINT, butvalidate_client_parametersreads config keystorage.account_url, which maps toAZURE_STORAGE_ACCOUNT_URL. So the documented env var was ignored and requests fell back to the public cloud endpoint.This PR reads
storage.service_endpointfirst, then falls back tostorage.account_url, so:AZURE_STORAGE_SERVICE_ENDPOINTnow works as documentedAZURE_STORAGE_ACCOUNT_URLkeeps working (no breaking change)--blob-endpointstill takes precedenceTesting Guide
$env:AZURE_STORAGE_ACCOUNT="devstoreaccount1"
$env:AZURE_STORAGE_KEY=""
$env:AZURE_STORAGE_SERVICE_ENDPOINT="http://localhost:10000/devstoreaccount1"
az storage blob list --container-name container1 --auth-mode key --debug
Before: request goes to
https://devstoreaccount1.blob.core.windows.net(403).After: request goes to
http://localhost:10000/devstoreaccount1.Unit tests added in
test_storage_validators.py(TestClientParametersValidator, 6 cases).History Notes
This checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.