Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[release/8.0.4xx] Fix regression - single arch scenario with no rid specified #45746

Merged

Conversation

surayya-MS
Copy link
Member

@surayya-MS surayya-MS commented Jan 7, 2025

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 missing dotnet. In the PR above ContainerAppCommand setting was changed to check UseAppHost property instead of _ContainerIsSelfContained https://github.com/dotnet/sdk/pull/43085/files#diff-a5f4ada40b043c8a36b7a1d56148dcfd0abcfe13fa82dbfb456f7c43bebedff7L103
This 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 a RuntimeIdentifier.

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.

@surayya-MS surayya-MS requested a review from a team as a code owner January 7, 2025 10:35
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Jan 7, 2025
@surayya-MS surayya-MS requested a review from baronfel January 7, 2025 10:46
@surayya-MS
Copy link
Member Author

Approved over the email

@surayya-MS surayya-MS merged commit e621003 into dotnet:release/8.0.4xx Jan 8, 2025
17 checks passed
@surayya-MS surayya-MS deleted the containers-regression branch January 8, 2025 09:58
@baronfel baronfel added this to the 8.0.13 milestone Feb 2, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants