[release/13.3] Skip compute env validation in run mode (#16940)#16952
Merged
Conversation
The validate-azure-container-apps and validate-azure-app-service pipeline steps run in 'before-start', which fires for both 'aspire run' and publish. In run mode, AddAzureContainerAppEnvironment/AddAzureAppServiceEnvironment do not add their environment resources to the model. Any compute resource that ends up with a PublishAs* customization annotation (for example via WithAnnotation) therefore trips the 'no environment resources' branch at 'aspire run' time, even though the user did add an environment. PublishAs* annotations only affect publish/deploy output, so skip the validation entirely when ExecutionContext.IsPublishMode is false. Fixes #16940. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16952Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 16952" |
Contributor
|
🎬 CLI E2E Test Recordings — 67 recordings uploaded (commit View all recordings
📹 Recordings uploaded automatically from CI run #25691227251 |
eerhardt
approved these changes
May 11, 2026
joperezr
approved these changes
May 11, 2026
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.
Backport of #16945 to release/13.3
/cc @eerhardt
Customer Impact
Customers can get errors in some situations when they
aspire run:Fixing to only run the check in PublishMode.
Testing
New automated tests
Risk
Low - adding the same check as what was checked before 13.3.
Regression?
Yes