-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Validate .NET Installs from dnup
#51405
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
Validate .NET Installs from dnup
#51405
Conversation
This implements validation of installs using hostfxr apis to ensure the install actually works and not just that the manifest is tracking the installs correctly in e2e tests. It also adds a test to show that we can do multiple installs in the same directory without failing. It also improves the existing test logic to not assume a hard-coded debug value for the dnup process.
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
though now it always expects an attacher
| : "libhostfxr.so"; | ||
|
|
||
| return Directory.EnumerateFiles(hostFxrDirectory, libraryName, SearchOption.AllDirectories) | ||
| .OrderByDescending(File.GetLastWriteTimeUtc) |
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.
I don't think this is the best approach at determining which hostfxr to use, though the cases where this would be called is rare. I would be ok with removing this or instead searching the latest directory
|
|
||
| Rule ID | Missing Help Link | Title | | ||
| --------|-------------------|-------| | ||
| CA1873 | <https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1873> | Avoid potentially expensive logging | |
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.
This is from main - happens automatically in build
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, big improvement to the readability / understandability of ReleaseManifest.
Something to think about for the future is I think it would be a good idea to get rid of the ParseVersionChannel logic in ReleaseManifest. Probably we can move that to the UpdateChannel class and also take advantage of logic in ReleaseVersion as possible.
src/Installer/Microsoft.Dotnet.Installation/Internal/ReleaseManifest.cs
Outdated
Show resolved
Hide resolved
src/Installer/Microsoft.Dotnet.Installation/Internal/ReleaseManifest.cs
Outdated
Show resolved
Hide resolved
Agreed. Caching and separating the archive download logic would also be ideal. |
DNUP_TEST_DEBUGor vscode workspace launch profile.