Repository navigation
{Batch} Pre-announce that az batch pool reset will print the pool in the same format as az batch pool show - #34471
Conversation
|
Thank you for your contribution Keyan Song (@mskeyansong)! We will review the pull request and get back to you soon. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the change aligning pool reset output with pool show.
No open issues 🎉
What changed in this PR
Restores consistent output between az batch pool reset and az batch pool show, addressing formatting differences introduced after the Batch Track 2 SDK migration.
Changes:
- Applies the existing Batch output transform to
pool reset, aligning key names, hidden fields, and value formatting. - Updates the regression test to compare reset and show output directly and assert expected formatting.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/batch/tests/latest/test_batch_output.py |
Verifies reset output matches show output and preserves expected formatting. |
src/azure-cli/azure/cli/command_modules/batch/commands.py |
Registers the shared Batch output transform for pool reset. |
Review effort: Balanced
|
Hi Keyan Song (@mskeyansong), |
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
This format mismatch has been live since 2.69.0 (almost 2 years). Customers have likely built automation against the current shape by now, so restoring the old format is a breaking change for them and needs pre-announcement, not a direct fix. |
The CLI linter asks for at least one example on commands that a PR changes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
test_batch_preannouncements expects the new entry with its exact warning, and test_batch_pool_reset_output checks that the command prints it. The output itself stays as it is on dev. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n the same format as `az batch pool show` Since 2.69.0, `az batch pool reset` prints the pool in a different format from `az batch pool show`. Customers may rely on that format, so changing it is a breaking change: this pre-announces it for 2.100.0 (June 2027) with register_output_breaking_change. The output doesn't change now. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
484455e to
93b24e4
Compare
az batch pool reset: Print the pool in the same format as az batch pool showaz batch pool reset will print the pool in the same format as az batch pool show
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
|
Good point, thanks. I changed this PR to a pre-announcement only: |
…W_ERRORS is set test_batch_pool_reset_output checks the pre-announcement warning on stderr, which the CLI leaves out when only errors are shown. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Its start task runs /bin/sh, which a Windows pool doesn't have. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🤖 PR Validation —⚠️ Review suggested
Related command
az batch pool resetDescription
az batch pool resetprints the pool it reads back in a different format fromaz batch pool show: other key names (diskSizeGBinstead ofdiskSizeGb), the three keyspool showhides (targetNodeCommunicationMode,currentNodeCommunicationMode,resourceTags), durations as0:15:00instead ofPT15M, timestamps with+00:00, and unset properties asnull. The two formats have differed since 2.69.0, so customers may have built automation against the current one, and printing the pool likeaz batch pool showis a breaking change.This PR pre-announces that change for 2.100.0 (June 2027) in the module's
_breaking_change.py, withregister_output_breaking_changeand the module'sTARGET_VERSION, as described in How to introduce breaking changes. The output doesn't change now; the PR with the change will follow in the breaking change window. The PR also adds an example to theaz batch pool resethelp (a new start task on a Linux pool).ADO: https://msazure.visualstudio.com/AzureBatch/_workitems/edit/40810359
Testing Guide
az batch pool resetandaz batch pool reset -hshow:The output will be changed in 2.100.0. 'az batch pool reset' will print the pool in the same format as 'az batch pool show'. Update scripts that read this output before 2.100.0 (June 2027); 'az batch pool show' already prints that format.az batch pool -hlistsreset [Breaking Change].test_batch_preannouncementschecks the new entry, its version and its full message.test_batch_pool_reset_outputstill checks selected fields of today's output, as ondev, and now also the start of the warning on stderr.az batch poolcommand lines send the same requests and print the same output as ondev; onlypool resetadds the warning.azdev generate-breaking-change-report batchlists the new entry.azdev test batch,azdev style batch, andazdev linterwith CI's options (changes againstdev).History Notes
None (
{Batch}title): the pre-announcement only adds a warning. The PR that changes the output in 2.100.0 will have the 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.