Repository navigation
[Batch] Fix #32086, #32090: az batch application package create: Fix blob not being uploaded - #32106
Conversation
…have the correct 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 batch application package create: Fix the blob not being uploadedaz batch application package create: Fix the blob not being uploaded
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a bug in the az batch application package create command where the blob content was not being properly uploaded to storage. The fix addresses the issue by ensuring the file is opened in binary mode and properly read before uploading to the blob storage.
- Updates the blob upload mechanism to properly read and upload file content
- Adds comprehensive test coverage to verify blob content upload and overwrite functionality
- Includes a generated test recording file for storage batch copy operations
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/azure-cli/azure/cli/command_modules/batch/custom.py | Fixes the blob upload logic by reading file content properly and enabling overwrite |
| src/azure-cli/azure/cli/command_modules/batch/tests/latest/test_batch_mgmt_commands.py | Adds test coverage to verify blob content is correctly uploaded and can be overwritten |
| src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_blob_batch_copy.yaml | Generated test recording file for storage operations |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
az batch application package create: Fix the blob not being uploadedaz batch application package create: Fix the blob not being uploaded
az batch application package create: Fix the blob not being uploadedaz batch application package create: Fix blob not being uploaded
|
Issue is still persisting in our azure devops pipeline with azure-cli 2.77.0 version Starting: Upload Pump application package to Batch Account (windows_build_container)Task : Azure CLI
|
Related command
Description
Fix #32086 Fix #32090
Testing Guide
History Notes
[Batch] Fix #32086, #32090:
az batch application package create: Fix blob not being uploadedThis 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.