Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds the ability to run Azure DevOps pipeline tests in live mode on demand by introducing a configurable AzureRecordMode parameter. The parameter threads through the pipeline template hierarchy and controls the AZURE_RECORD_MODE environment variable used by the test recording infrastructure. By default, tests continue to run in 'playback' mode, maintaining the existing behavior.
Changes:
- Added
AzureRecordModeparameter to the pipeline template hierarchy, allowing selection between playback and live test modes - Replaced hardcoded 'playback' mode with the configurable parameter value in test execution
- Made the parameter user-selectable in the release-cli.yml pipeline with a dropdown UI
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| eng/pipelines/templates/stages/build-and-test.yml | Added AzureRecordMode parameter with 'playback' default and passed it to build-cli job template |
| eng/pipelines/templates/jobs/build-cli.yml | Added AzureRecordMode parameter and replaced hardcoded AZURE_RECORD_MODE environment variable with parameter value |
| eng/pipelines/release-cli.yml | Added user-facing AzureRecordMode parameter with dropdown values (playback/live) and passed it to build-and-test stage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Daniel Jurek <djurek@microsoft.com>
wbreza
left a comment
There was a problem hiding this comment.
Overall Assessment
Well-structured PR — the parameter threading through the template hierarchy is correct, defaults are safe (playback at every level), and the blast radius is limited to the release-cli.yml pipeline chain.
Approving with a few minor suggestions inline.
✅ Positive Observations
- Safe defaults throughout the template chain (
playbackat all 3 levels) - Constrained parameter values prevent typos
- Cross-build and other pipelines unaffected
- Only
release-cli.yml→build-and-test.yml→build-cli.ymlchain is impacted
- Add comment explaining why scheduled runs force 'live' mode (nightly
validation against real Azure resources)
- Remove trailing whitespace after ${{ else }}:
- Add inline comment on AZURE_RECORD_MODE explaining default behavior
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Manual and scheduled pipeline runs now default to 'live' mode for validation against real Azure resources. CI triggers (push/PR) are forced to 'playback' mode regardless of the parameter value. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Summary
Makes the
AZURE_RECORD_MODEfor CLI tests configurable in the release pipeline, instead of being hardcoded toplayback.A new
AzureRecordModepipeline parameter is threaded throughrelease-cli.yml→build-and-test.yml→build-cli.ymlto control the test record mode.Behavior
livelive(default)AzureRecordModeparameterplaybackChanges
release-cli.yml: AddedAzureRecordModeparameter (default:live). CI triggers (IndividualCI,BatchedCI,PullRequest) are forced toplayback; all other triggers (scheduled, manual) use the parameter value.build-and-test.yml: Accepts and passes throughAzureRecordModeto build jobs.build-cli.yml: Uses the parameter for theAZURE_RECORD_MODEenv var (previously hardcoded toplayback).