Skip to content
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

Add RuntimeInformation.FrameworkDescription test to validate version #93913

Merged
merged 2 commits into from
Oct 25, 2023

Conversation

akoeplinger
Copy link
Member

We need to make sure the string contains only the stabilized version in servicing, or a non-stabilized one otherwise. This prevents issues like #45812 and what we hit in #93807.

Closes #45812

We need to make sure the string contains only the stabilized version in servicing, or a non-stabilized one otherwise.
This prevents issues like dotnet#45812 and what we hit in dotnet#93807.

Closes dotnet#45812
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 24, 2023
@ghost ghost assigned akoeplinger Oct 24, 2023
@akoeplinger akoeplinger added area-System.Runtime and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 24, 2023
@ghost
Copy link

ghost commented Oct 24, 2023

Tagging subscribers to this area: @dotnet/area-system-runtime
See info in area-owners.md if you want to be subscribed.

Issue Details

We need to make sure the string contains only the stabilized version in servicing, or a non-stabilized one otherwise. This prevents issues like #45812 and what we hit in #93807.

Closes #45812

Author: akoeplinger
Assignees: akoeplinger
Labels:

area-System.Runtime

Milestone: -

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
…n/tests/DescriptionNameTests.cs

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Comment on lines +189 to +190
if (string.IsNullOrEmpty(version))
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be an assert instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code explicitly handles the case where there is no version information so the test should too:

s_frameworkDescription = !versionString.Trim().IsEmpty ? $"{FrameworkName} {versionString}" : FrameworkName;

@akoeplinger akoeplinger merged commit 47873d8 into dotnet:main Oct 25, 2023
@akoeplinger akoeplinger deleted the add-frameworkdescription-tests branch October 25, 2023 09:38
liveans pushed a commit to liveans/dotnet-runtime that referenced this pull request Nov 9, 2023
…otnet#93913)

We need to make sure the string contains only the stabilized version in servicing, or a non-stabilized one otherwise. This prevents issues like dotnet#45812 and what we hit in dotnet#93807.

Closes dotnet#45812
@ghost ghost locked as resolved and limited conversation to collaborators Nov 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants