-
Notifications
You must be signed in to change notification settings - Fork 113
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
Move *EndpointInfo implementations to dotnet-monitor. #726
Move *EndpointInfo implementations to dotnet-monitor. #726
Conversation
Add dotnet-monitor unit test assembly and move *EndpointInfo tests to it. Consolidate calculating entry point assembly path into single utility method.
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.
My suggestion here would be to move all the things necessary to add net7.0
into as few files as possible. Ideally all in TargetFrameworkMoniker.cs
and the DotNetHost.cs.template
+ GenerateDotNetHost.targets
src/Microsoft.Diagnostics.Monitoring.WebApi/Microsoft.Diagnostics.Monitoring.WebApi.csproj
Show resolved
Hide resolved
src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/AssemblyHelper.cs
Outdated
Show resolved
Hide resolved
src/Tests/Microsoft.Diagnostics.Monitoring.TestCommon/Runners/DotNetRunner.cs
Outdated
Show resolved
Hide resolved
I'll see what I can do. If it requires iteration over a collection of the supported TFMs, then it might be be doable in the non-trivial case without writing a source generator. At the very least, I should be able to consolidate all TFM related logic into one manually written file. |
Specify BuiltTargetFrameworkMoniker in source instead of template.
All conversion methods have been made into extension methods in the TargetFrameworkMoniker.cs file. So if you go to add a new enum value, it's more obvious what needs to be updated. Also, I've moved the notion of the BuildTargetFrameworkMoniker directly into the DotNetHost.cs file and used preprocessing to determines it value. This will cause a build failure if a new TFM is added to the project but is forgotten to be added to the enum and updating this static property. |
* Update dependencies from https://github.com/dotnet/diagnostics build 20210810.1 (#707) [main] Update dependencies from dotnet/diagnostics * Update dependencies from https://github.com/dotnet/runtime build 20210811.2 (#708) [main] Update dependencies from dotnet/runtime * Update dependencies from https://github.com/dotnet/aspnetcore build 20210810.16 (#709) [main] Update dependencies from dotnet/aspnetcore * Update dependencies from https://github.com/dotnet/diagnostics build 20210811.1 (#711) [main] Update dependencies from dotnet/diagnostics * Update dependencies from https://github.com/dotnet/runtime build 20210811.5 (#713) [main] Update dependencies from dotnet/runtime * Update dependencies from https://github.com/dotnet/aspnetcore build 20210811.15 (#714) [main] Update dependencies from dotnet/aspnetcore * Update dependencies from https://github.com/dotnet/arcade build 20210810.8 (#712) [main] Update dependencies from dotnet/arcade * Switch to Bearer auth (#463) * Replace MonitorApiKey key/keyhash auth type with signed JWT implementation * Add MonitorGenerateKeyRunner to test the generatekey command Closes #463 Closes #589 * Update dependencies from https://github.com/dotnet/runtime build 20210813.5 (#717) [main] Update dependencies from dotnet/runtime * Update dependencies from https://github.com/dotnet/aspnetcore build 20210812.9 (#718) [main] Update dependencies from dotnet/aspnetcore * Update dependencies from https://github.com/dotnet/diagnostics build 20210812.1 (#716) [main] Update dependencies from dotnet/diagnostics * Add detailed message to output in TestSchemaBaseline (#715) * Add detailed message to output in TestSchemaBaseline. This shows context when the baseline differs from the generated schema. * Update dependencies from https://github.com/dotnet/arcade build 20210812.1 (#721) [main] Update dependencies from dotnet/arcade * Update dependencies from https://github.com/dotnet/runtime build 20210814.1 (#722) [main] Update dependencies from dotnet/runtime * Update dependencies from https://github.com/dotnet/runtime build 20210814.4 (#724) [main] Update dependencies from dotnet/runtime * Update dependencies from https://github.com/dotnet/runtime build 20210815.6 (#725) [main] Update dependencies from dotnet/runtime * Update dependencies from https://github.com/dotnet/aspnetcore build 20210813.12 (#723) [main] Update dependencies from dotnet/aspnetcore * Update dependencies from https://github.com/dotnet/diagnostics build 20210813.1 (#727) [main] Update dependencies from dotnet/diagnostics * Update dependencies from https://github.com/dotnet/arcade build 20210813.4 (#728) [main] Update dependencies from dotnet/arcade * Update dependencies from https://github.com/dotnet/runtime build 20210817.1 (#729) [main] Update dependencies from dotnet/runtime * Update dependencies from https://github.com/dotnet/aspnetcore build 20210817.1 (#730) [main] Update dependencies from dotnet/aspnetcore * Small changes to the WithCancellation extension method. (#719) * Move *EndpointInfo implementations to dotnet-monitor. (#726) Move *EndpointInfo implementations to dotnet-monitor. Add dotnet-monitor unit test assembly and move *EndpointInfo tests to it. Consolidate calculating entry point assembly path into single utility method. Co-authored-by: dotnet-maestro[bot] <42748379+dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Patrick Fenelon <[email protected]>
The collection rule system will hook directly into the ServerEndpointInfoSource (and eventually, the ClientEndpointInfoSource), so this class needs to move to the dotnet-monitor project. This means that the unit tests for these types need to move to a new unit test assembly for dotnet-monitor (this unit test assembly already exists in the feature/triggers branch, but I'm bringing it to the main branch). As part of this, I've refactored entry point assembly path calculation for the tests into a common helper since I needed to changed some of the ServerEndpointInfoSource tests into theories with each supported TFM.
Overview of changes: