Skip to content

Conversation

@jepetty
Copy link

@jepetty jepetty commented Jan 15, 2026

This is a small change to make the error message clearer for users when they try to create a ConsumptionOnly environment but an existing WorkloadProfiles environment with the same name already exists. The previous error was "At least 1 workload profile must be specified" - very confusing

Related command

az containerapp env create --name --resource-group --enable-workload-profiles false

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

@jepetty jepetty requested a review from howang-ms as a code owner January 15, 2026 22:10
Copilot AI review requested due to automatic review settings January 15, 2026 22:10
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Jan 15, 2026

️✔️Azure CLI Extensions Breaking Change Test
️✔️Non Breaking Changes

@azure-client-tools-bot-prd
Copy link

Hi @jepetty,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

@yonzhan
Copy link
Collaborator

yonzhan commented Jan 15, 2026

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

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).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@github-actions
Copy link

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link

Hi @jepetty

Release Suggestions

Module: containerapp

  • Please log updates into to src/containerapp/HISTORY.rst
  • Update VERSION to 1.3.0b2 in src/containerapp/setup.py

Notes

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the error message shown when users attempt to create a Consumption-Only environment with a name that's already in use by an existing WorkloadProfiles environment. The previous error message was confusing ("At least 1 workload profile must be specified"), but the new message clearly states that the existing environment uses workload profiles and suggests creating a new environment.

Changes:

  • Refactored the set_up_workload_profiles method to check for existing environment before branching on the enable_workload_profiles flag
  • Added a new validation in the else branch to raise a clearer error when attempting to create a Consumption-Only environment with a name that's already used by a WorkloadProfiles environment

@Greedygre
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Greedygre
Copy link
Contributor

The CI might be failed due to the az identity api-version upgrade in azure-cli, generally they didn't update azure-cli-extension related tests.
I will create a separate pr update the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot ContainerApp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants