-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[release/8.0.4xx] Fix defaulting of which Runtime(s) to containerize that led to always publishing multiple containers #46067
Open
baronfel
wants to merge
5
commits into
dotnet:release/8.0.4xx
Choose a base branch
from
baronfel:fix-multi-rid-container-publishing-typo
base: release/8.0.4xx
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+125
−16
Conversation
This file contains 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
…vertend multi-arch publishing
dotnet-issue-labeler
bot
added
Area-Infrastructure
untriaged
Request triage from a team member
labels
Jan 16, 2025
baronfel
added
Area-Containers
Related to dotnet SDK containers functionality
Servicing-consider
and removed
Area-Infrastructure
untriaged
Request triage from a team member
labels
Jan 16, 2025
baronfel
changed the title
Fix typo in condition check for container publishing that led to inadvertent multi-arch publishing
[release/8.0.4xx] Fix typo in condition check for container publishing that led to inadvertent multi-arch publishing
Jan 16, 2025
* using Container-specific properties to target a single RID * using normal RID properties to target a single RID
I've added two tests for user-facing scenarios that should work but currently done. Need to send more code changes to get them green. |
…ngle/multi rid checking
…fter we've checked all possible user-provided values
The build failure is the known-failing build that the IL folks say isn't a real thing. |
surayya-MS
approved these changes
Jan 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
baronfel
changed the title
[release/8.0.4xx] Fix typo in condition check for container publishing that led to inadvertent multi-arch publishing
[release/8.0.4xx] Fix defaulting of which Runtime(s) to containerize that led to always publishing multiple containers
Jan 17, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Fixes #46053 and part of #46015.
Description and impact
There were two bugs in the multi-architecture container publishing that led to some projects always publishing for all container architectures:
win-x64
from the set of RIDs to containerizeThe net effect of these changes is to make most multi-RID projects publish for all RIDs regardless of the
-r
CLI parameter, and to also make the documented workarounds ineffective - using the container-specific RID properties.These scenarios were hit almost immediately after the release, with customers logging issues, tagging on social media, and via Discord.
Regression
Yes - the multi-arch containers work introduced this.
Risk
Low/Medium - the changes are targeted and in all cases more safe than before - they defer to user inputs in a safer way, they make complex boolean conditionals more simple to understand and more easily visible in the binlog, and we have added significant additional test coverage.
Testing
New automated test cases have been added that verify
Manual testing on sample projects confirms this. Providing the same targets changes to customers (cc @wasabii) has validated that pre-January-release behaviors are back.
Technical Details
Here's a simple app that demonstrates the various problems:
In January's releases of 8.0.4xx and 9.0.1xx, running
dotnet publish -t:PublishContainer -r linux-64
for this project will cause bothContainerRuntimeIdentifiers
RIDs to be built. If a user tries to workaround this by runningdotnet publish -t:PublishContainer -p ContainerRuntimeIdentifier=linux-x64
, the workaround will not take effect and both RIDs will also be built.After these changes, the following scenarios all now work: