[Containers] Fix parsing and error reporting of ports that lack port type metadata#43551
Merged
baronfel merged 3 commits intodotnet:release/9.0.1xxfrom Oct 6, 2024
Merged
Conversation
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
MiYanni
approved these changes
Sep 23, 2024
JanKrivanek
approved these changes
Sep 25, 2024
Member
Author
|
Sanity check - @marcpopMSFT this was targeting 9.0.100 because it's a bug in validation and is hard for users to understand. Guessing we need Tactics approval at this point? |
MichalPavlik
approved these changes
Sep 27, 2024
Member
Author
|
Closing as @surayya-MS got this merged in already in teh 8.0.4xx prerequisite PR she got merged! |
Member
Author
|
wrong PR - this one got approved by servicing. |
Member
Author
|
/backport to main |
Member
Author
|
/backport to release/8.0.4xx |
Contributor
|
Started backporting to main: https://github.com/dotnet/sdk/actions/runs/11205328409 |
Contributor
|
Started backporting to release/8.0.4xx: https://github.com/dotnet/sdk/actions/runs/11205329248 |
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.
Description
Users that attempted to use the SDK to declare open ports in their containers had a very difficult time using the documented pathways due to bugs in the validation and error reporting. The reported error didn't match the user's actual data problem, and the suggested fix wouldn't resolve the users' problem.
Customer Impact
Customers could workaround the issue by fully-specifying the Port to declare, but this was hard to discover and the docs, errors, and user expectations for MSBuild didn't guide users to success.
Regression
No, this has been a problem since the first version of the feature
Risk
Low - we have very broad test coverage, and in fact had codified bad behavior in the tests. Making the tests reflect the actual desired user experience verified the error and the fix very easily.
Technical details
Fixes dotnet/sdk-container-builds#596
There were two problems:
Enum.HasFlagwill always return true for the zero value. this is documented and understandable behavior (since HasFlag is shorthand for(value & target) == target, and anything AND-ed with 0 will be 0.