[release/8.0.4xx] Fix regression - single arch scenario with no rid specified #45746
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.
Context
Fixes dotnet/sdk-container-builds#610
In a single arch scenario when no
RuntimeIdentifier
is specified, the produced container cannot be run. This is a very common scenario for single arch.This is a regression that was caused by #43085 PR.
Customer impact
Without this fix, customers will not be able to run the published containers in single arch scenario when no
RuntimeIdentifier
is specified. They were able to do this before the regression.Details
The problem is that the
ContainerAppCommand
item is missingdotnet
. In the PR aboveContainerAppCommand
setting was changed to checkUseAppHost
property instead of_ContainerIsSelfContained
https://github.com/dotnet/sdk/pull/43085/files#diff-a5f4ada40b043c8a36b7a1d56148dcfd0abcfe13fa82dbfb456f7c43bebedff7L103This works for the cases when
RuntimeIdentfier
is specified, but not for the cases when it is not.The tests did not catch this because there is no test covering this specific scenario with no
RuntimeIdentifier
specified - all single arch tests specify aRuntimeIdentifier
.Changes made
Fixed by setting
ContainerAppCommand
correctly.Testing
Added a test to cover this scenario. Also tested manually.
Risks
Low - new test ensures the scenario is now covered, the existing tests ensure that other scenarios were not affected.