-
-
Notifications
You must be signed in to change notification settings - Fork 513
Upgrade to .NET 10 and Aspire 13 #2036
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
Conversation
|
|
Co-authored-by: ejsmith <[email protected]>
Co-authored-by: ejsmith <[email protected]>
Co-authored-by: ejsmith <[email protected]>
|
@copilot fix the kibana todo, remove the upgrade notes file and also look for other things to upgrade like the vscode tasks/launch might have debug paths to a net9 folder. |
Co-authored-by: niemyjski <[email protected]>
Fixed in commit a66d929:
Build verified successfully. ✅ Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
src/Exceptionless.AppHost/Extensions/ElasticsearchExtensions.cs
Outdated
Show resolved
Hide resolved
niemyjski
left a comment
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.
@copilot Please fix these comments, revert, google and make sure the implementation is correct. If you are not 1000% sure then just leave a todo and let the build fail to compile if nessesary.
src/Exceptionless.AppHost/Extensions/ElasticsearchExtensions.cs
Outdated
Show resolved
Hide resolved
src/Exceptionless.AppHost/Extensions/ElasticsearchExtensions.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: niemyjski <[email protected]>
Fixed in commit c19bb00:
Build succeeds ✅ Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Updates various package dependencies across multiple projects. This includes updates to FluentValidation, Serilog.Sinks.Console, OpenTelemetry, Swashbuckle.AspNetCore.Newtonsoft, FluentRest.NewtonsoftJson, and Microsoft.NET.Test.Sdk. Also adds System.Net.Http and System.Text.RegularExpressions to resolve vulnerability warnings related to transitive dependencies.
|
Currently blocked on unchase/Unchase.Swashbuckle.AspNetCore.Extensions#43 We may want to consider doing all the work to drop it, but was looking for a quick upgrade: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/openapi/overview?view=aspnetcore-10.0 |
Adds a test case to verify event serialization, including environment and request information, ensuring correct snake_case serialization of the JSON output. Also adds OpenAPI spec.
Updates project dependencies to the latest versions, including Aspire, FluentValidation, MaxMind.GeoIP2, Serilog, and OpenTelemetry, to leverage the newest features, improvements, and bug fixes.
src/Exceptionless.Web/Utility/RemoveProblemJsonFromSuccessResponsesFilter.cs
Dismissed
Show dismissed
Hide dismissed
src/Exceptionless.Web/Utility/RemoveProblemJsonFromSuccessResponsesFilter.cs
Dismissed
Show dismissed
Hide dismissed
| foreach (var response in operation.Responses) | ||
| { | ||
| // Only process 2xx success responses | ||
| if (response.Key.StartsWith('2') && response.Value?.Content is not null) | ||
| { | ||
| response.Value.Content.Remove(ProblemJsonContentType); | ||
| } | ||
| } |
tests/Exceptionless.Tests/Controllers/OpenApiControllerTests.cs
Dismissed
Show dismissed
Hide dismissed
Refactors UI components by adjusting sizes and widths for better display. Changes the test runner entry point to use array syntax.
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.
Pull request overview
This PR successfully upgrades the project from .NET 9 to .NET 10 and Aspire 9.5 to 13.0. The upgrade includes necessary breaking change adaptations, package updates, and improvements to OpenAPI documentation generation.
Key changes:
- Updated to .NET 10.0.100 SDK with net10.0 TFM and migrated to Aspire 13.0 breaking changes
- Replaced deprecated OpenAPI types with new Microsoft.OpenApi equivalents and added custom filters for improved API documentation
- Added comprehensive test coverage for OpenAPI schema stability and event serialization
Reviewed changes
Copilot reviewed 39 out of 40 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Exceptionless.Tests/Exceptionless.Tests.csproj | Updated package versions for .NET 10 compatibility including Aspire.Hosting.Testing 13.0.2 |
| tests/Exceptionless.Tests/Controllers/OpenApiControllerTests.cs | New test to verify OpenAPI specification baseline for contract stability |
| tests/Exceptionless.Tests/Controllers/EventControllerTests.cs | New test verifying snake_case serialization for event data |
| tests/Exceptionless.Tests/Controllers/Data/swagger.json | Baseline OpenAPI specification file (7500+ lines) for contract verification |
| tests/Exceptionless.Tests/Controllers/Data/event-serialization-*.json | Test fixtures for event serialization validation |
| tests/Exceptionless.Tests/AppWebHostFactory.cs | Fixed Program class reference to Web.Program for .NET 10 compatibility |
| src/Exceptionless.Web/Utility/XEnumNamesSchemaFilter.cs | New filter adding x-enumNames extension for better code generation |
| src/Exceptionless.Web/Utility/RequestBodyOperationFilter.cs | Migrated to new OpenAPI types from Microsoft.OpenApi namespace |
| src/Exceptionless.Web/Utility/RemoveProblemJsonFromSuccessResponsesFilter.cs | New filter removing problem+json from 2xx responses per RFC 7807 |
| src/Exceptionless.Web/Startup.cs | Updated ForwardedHeadersOptions API and OpenAPI security requirement syntax |
| src/Exceptionless.Web/Exceptionless.Web.csproj | Updated to .NET 10 packages, removed Unchase.Swashbuckle dependency |
| src/Exceptionless.Web/Controllers/*.cs | Added generic ProducesResponseType attributes for better OpenAPI schema generation |
| src/Exceptionless.Web/ClientApp/src/lib/features/stacks/components/stack-card.svelte | Standardized Tailwind CSS classes from arbitrary values to standard utility classes |
| src/Exceptionless.Web/ClientApp/src/lib/features/shared/components/ui/chart/chart-tooltip.svelte | Standardized min-width class from min-w-[9rem] to min-w-36 |
| src/Exceptionless.Web/ClientApp/src/lib/features/events/components/events-stack-chart.svelte | Standardized min-width class from min-w-[160px] to min-w-40 |
| src/Exceptionless.Web/ClientApp/package.json | Updated swagger-typescript-api command syntax to use 'generate' subcommand |
| src/Exceptionless.Job/Exceptionless.Job.csproj | Updated OpenTelemetry and Serilog packages to latest versions |
| src/Exceptionless.Core/Exceptionless.Core.csproj | Updated Microsoft.Extensions packages and FluentValidation to .NET 10 compatible versions |
| return result; | ||
| } | ||
|
|
||
| [Fact] |
Copilot
AI
Dec 5, 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.
The new test PostEvent_WithEnvironmentAndRequestInfo_ReturnsCorrectSnakeCaseSerialization lacks documentation comments explaining its purpose. Consider adding a summary comment explaining that this test verifies the snake_case serialization format for event data with environment and request information, which is important for API compatibility.
| operation.RequestBody.Content!.Add(contentType, new OpenApiMediaType | ||
| { | ||
| Schema = new OpenApiSchema { Type = "string", Example = new OpenApiString(String.Empty) } | ||
| Schema = new OpenApiSchema { Type = JsonSchemaType.String, Example = JsonValue.Create(String.Empty) } |
Copilot
AI
Dec 5, 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.
The Schema property initialization uses JsonSchemaType.String which is correct for .NET 10, but the Example property uses JsonValue.Create(String.Empty). Consider using new JsonNodeExtension(JsonValue.Create(String.Empty)) to properly wrap it as an IOpenApiExtension, as done in the XEnumNamesSchemaFilter.
| foreach (var path in swaggerDoc.Paths) | ||
| { | ||
| if (path.Value?.Operations is null) | ||
| continue; | ||
|
|
||
| foreach (var operation in path.Value.Operations.Values) | ||
| { | ||
| if (operation?.Responses is null) | ||
| continue; | ||
|
|
||
| foreach (var response in operation.Responses) | ||
| { | ||
| // Only process 2xx success responses | ||
| if (response.Key.StartsWith('2') && response.Value?.Content is not null) | ||
| { | ||
| response.Value.Content.Remove(ProblemJsonContentType); | ||
| } | ||
| } | ||
| } | ||
| } |
Copilot
AI
Dec 5, 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.
This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.
| foreach (var operation in path.Value.Operations.Values) | ||
| { | ||
| if (operation?.Responses is null) | ||
| continue; | ||
|
|
||
| foreach (var response in operation.Responses) | ||
| { | ||
| // Only process 2xx success responses | ||
| if (response.Key.StartsWith('2') && response.Value?.Content is not null) | ||
| { | ||
| response.Value.Content.Remove(ProblemJsonContentType); | ||
| } | ||
| } | ||
| } |
Copilot
AI
Dec 5, 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.
This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.
| foreach (var response in operation.Responses) | ||
| { | ||
| // Only process 2xx success responses | ||
| if (response.Key.StartsWith('2') && response.Value?.Content is not null) | ||
| { | ||
| response.Value.Content.Remove(ProblemJsonContentType); | ||
| } | ||
| } |
Copilot
AI
Dec 5, 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.
This foreach loop implicitly filters its target sequence - consider filtering the sequence explicitly using '.Where(...)'.
Adds webhook subscription and unsubscription endpoints. Enhances stack management by allowing marking stacks as fixed and adding links using JSON documents. Also includes minor fixes and improvements, such as using options objects directly in Startup.cs and correcting a parameter description in the ProjectController.
niemyjski
left a comment
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.
Self reviewed and tested
Upgrades project from .NET 9 to .NET 10 and Aspire 9.5 to 13.0.
SDK & Runtime
Aspire 13 Breaking Changes
Aspire.Hosting.NodeJs→Aspire.Hosting.JavaScriptAddNpmApp()→AddJavaScriptApp()(supports npm/yarn/pnpm auto-detection)WithEndpoint()→WithHttpEndpoint()#if FALSE) and marked with TODO for migration to Aspire 13'sIDistributedApplicationEventingSubscribereventing model.NET 10 API Changes
ForwardedHeadersOptions.KnownNetworks→KnownIPNetworksSystem.Net.Http,System.Text.RegularExpressions,System.Text.Encodings.WebMicrosoft.Extensions.Diagnostics.HealthChecks(now implicit in ASP.NET Core)Package Updates
Microsoft.Extensions.*andMicrosoft.AspNetCore.*packages: 9.0.10 → 10.0.0Test Fixes
AppWebHostFactoryto use fully qualifiedExceptionless.Web.Programclass reference for .NET 10 compatibilityKnown Issues
Example Changes
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.