Conversation
…has file path as content
️✔️AzureCLI-FullTest
|
️✔️AzureCLI-BreakingChangeTest
|
|
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>
|
az functionapp deployment source config-zip: Fix uploaded blob not containing contentaz functionapp deployment source config-zip: Fix uploaded blob not containing content
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where the az functionapp deployment source config-zip command was uploading blobs without content. The fix changes the blob upload mechanism to explicitly read the ZIP file content before uploading instead of passing the file path directly.
- Replaced direct file path upload with explicit file content reading
- Added proper file handling with binary mode reading and path resolution
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| blob_client = container_client.upload_blob(blob_name, src, validate_content=True, progress_hook=progress_callback) | ||
| blob_client = None | ||
| import os |
There was a problem hiding this comment.
The import os statement should be moved to the top of the file with other imports rather than being placed within the function. This follows Python best practices for import organization.
| blob_client = None | ||
| import os | ||
| with open(os.path.realpath(os.path.expanduser(src)), 'rb') as fs: | ||
| zip_content = fs.read() | ||
| blob_client = container_client.upload_blob(blob_name, zip_content, validate_content=True, | ||
| progress_hook=progress_callback) |
There was a problem hiding this comment.
The variable blob_client = None initialization on line 1669 is unnecessary since blob_client is immediately assigned a value within the with statement context.
Related command
Description
Fix #32044
az functionapp deployment source config-zip: Fix uploaded blob not containing contentTesting Guide
History Notes
[AppService] Fix #32044:
az functionapp deployment source config-zip: Fix uploaded blob not containing contentThis 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.