Repository navigation
[ContainerApp] az containerapp env: Add --environment-mode - #34486
Open
Chris Ross (Tratcher) wants to merge 2 commits into
Open
Chris Ross (Tratcher) wants to merge 2 commits into
Chris Ross (Tratcher) wants to merge 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Contributor
|
Hi Chris Ross (@Tratcher), |
az containerapp env: Add --environment-modeaz containerapp env: Add --environment-mode
Member
Author
|
Title fixed |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The environment-mode update test uses the existing mode, so it cannot detect an ignored PATCH, and no test verifies a supported mode transition through both the update response and a subsequent show.
1 open issue
What changed in this PR
Adds --environment-mode to Azure CLI’s Container Apps environment commands, allowing users to select a mode during creation or request a mode change.
Changes:
- Exposes the new option on
containerapp env createandcontainerapp env update. - Adds mode-aware payload construction and compatibility checks for legacy workload-profile flags.
- Adds help text, examples, unit tests, and a live scenario.
| File | Description |
|---|---|
src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerapp_env_environment_mode.py |
Adds unit coverage for validation, payloads, and REST requests. |
src/azure-cli/azure/cli/command_modules/containerapp/tests/latest/test_containerapp_env_commands.py |
Adds a live environment-mode scenario. |
src/azure-cli/azure/cli/command_modules/containerapp/custom.py |
Accepts the mode in create and update handlers. |
src/azure-cli/azure/cli/command_modules/containerapp/containerapp_env_decorator.py |
Builds mode-aware payloads and handles workload-profile compatibility. |
src/azure-cli/azure/cli/command_modules/containerapp/_utils.py |
Validates conflicts between mode and legacy flags. |
src/azure-cli/azure/cli/command_modules/containerapp/_params.py |
Registers --environment-mode for both commands. |
src/azure-cli/azure/cli/command_modules/containerapp/_help.py |
Documents mode selection and update behavior. |
Review effort: Balanced
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
|
/azp run |
|
Azure Pipelines: Successfully started running 3 pipeline(s). |
Member
Author
|
Fixed history notes. That CI error need work... |
Vini Soto (vinisoto)
approved these changes
Nov 24, 2026
Jessica Petty (jepetty)
approved these changes
Nov 24, 2026
Contributor
|
Chris Ross (@Tratcher) Could you please fix the CI failure first? |
Member
Author
|
I already fixed them, it needs to re-run. |
Collaborator
|
/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.

🤖 PR Validation —⚠️ Review suggested
Related command
az containerapp env create --environment-modeaz containerapp env update --environment-modeDescription
Exposing this new property for selecting and changing modes
Testing Guide
az containerapp env create -n MyContainerappEnvironment -g express-cli-rg --location eastus2 --environment-mode Express --logs-destination Noneaz containerapp env update -n MyContainerappEnvironment -g express-cli-rg --environment-mode ArchivedHistory Notes
[ContainerApp]
az containerapp env: Add--environment-modeThis 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.