Enhancement: Elsa 2 - EFCore persistence, better support for net10 (excludes MySql - Pomelo)#7716
Open
terry-delph wants to merge 4 commits into
Conversation
Upgraded `System.Text.Encodings.Web` to `10.0.8` and other key dependencies (`Newtonsoft.Json`, `Microsoft.Extensions.Hosting`, etc.) across multiple projects for compatibility, security, and performance improvements. Upgraded `Jint`: - Updated `Jint` to `4.9.2` from beta version - Enhanced `ByteArrayConverter` to handle byte arrays as `ArrayBuffer` in JavaScript - Added new tests for validation Upgrade Rebus dependencies across core projects: - Upgraded Rebus to version 8.9.2 in Elsa.Abstractions.csproj. - Upgraded Rebus.ServiceProvider to version 10.7.2 in Elsa.Core.csproj. - Upgraded Rebus.Microsoft.Extensions.Logging to version 5.2.0 in Elsa.Core.csproj. These upgrades ensure compatibility with the latest features, bug fixes, and improved integration with .NET 8/9/10 targets. Duplicate Swashbuckle packages references: - Removed duplicate Swashbuckle (Swagger) package references from Elsa.Server.Api.csproj for consistent multi-targeting. - Ensured only one version per framework is referenced.
…NET 8/9/10) (Issue: elsa-workflows#7429) - Conditionally upgrade Swashbuckle.AspNetCore.SwaggerGen to 10.2.1 for .NET 10 (keep 6.3.0 for .NET 8/9 for compatibility) - Add conditional compilation for swaggerDoc.Tags initialization - Use HashSet<OpenApiTag> for .NET 10+ - Use List<OpenApiTag> for .NET 8/9 - Add conditional compilation for operation.Tags - Use OpenApiTagReference for .NET 10+ - Use OpenApiTag for .NET 8/9 - Fix RequestBody.Content null reference by explicit initialization - Improve JsonSchema validation to check for null or whitespace - tailwind.css seems to have not been updated in a previous commit, the rebuild has identified some changes Resolves ReflectionTypeLoadException: "Method 'Apply' in type 'HttpEndpointDocumentFilter' does not have an implementation" caused by OpenAPI model breaking changes in .NET 10.
…flows#7502) - Added `[Tags("Secrets")]` to group secrets api endpoints in Swagger UI. - Introduced `RemoveEmptyControllerTagsFilter` to remove unused tags from OpenAPI documents. - Registered the filter in Swagger configuration with .NET 10 compatibility adjustments.
…tions) - Add net10.0 target to Elsa.Persistence.EntityFramework.Core with EF Core 10.0.8 - Restrict MySQL provider to net8.0/net9.0 (Pomelo blocks EF Core 10.x) - Multi-target sample projects for testing (ElsaDashboard.Samples, EF samples) - Update docker-compose: mysql:8 image, Azurite with all service ports - Update sample connection strings to match docker-compose
Contributor
|
PR author is not in the allowed authors list. |
Contributor
Author
|
This PR is based off #7518 but will be rebased onto 2.x upon the other branch merging depending on how it is merged. |
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.
Purpose
Add .NET 10 multi-targeting support to Entity Framework Core projects while maintaining compatibility with providers that do not yet support EF Core 10.
Scope
Select one primary concern:
Description
Problem
Entity Framework Core projects needed .NET 10 support for testing and compatibility. However,
Pomelo.EntityFrameworkCore.MySqldoes not yet support EF Core 10.x, which blocks full .NET 10 adoption across all database providers.Solution
Introduce .NET 10 multi-targeting for EF Core projects while applying conditional support for providers.
Entity Framework Core .NET 10 Support
Core Projects
net10.0to TargetFrameworks inElsa.Persistence.EntityFramework.Core.csprojnetstandard2.1;net8.0;net9.0;net10.0Microsoft.EntityFrameworkCore10.0.8Microsoft.EntityFrameworkCore.Relational10.0.8MySQL Provider Limitation
.NET 8and.NET 9:Elsa.Persistence.EntityFramework.MySql.csproj.NET 10target and related dependenciesRoot Cause
Impact
net9.0build automaticallyWorkaround
Future
Sample Projects - Multi-Targeting for Testing
Update
ElsaDashboard.Samples.AspNetCore.Monolith.csprojUpdate
Elsa.Samples.Persistence.EntityFramework.csprojAdd:
Enables:
Connection Updates
Update SQL Server connection as they were not matching docker:
"Server=localhost,1433;Database=Elsa;User Id=SA;Password=:8jNZdK7cK;TrustServerCertificate=True"Disable MySQL in .NET 10 samples:
// ef.UseMySql(...); // Currently not supported until Pomelo supports net10Docker Infrastructure Updates
docker-compose.yaml
mysql-armwithmysql:8Azurite Update
mcr.microsoft.com/azure-storage/azuriteDependency Version Summary
Breaking Changes
Elsa.Persistence.EntityFramework.MySqlprovider cannot upgrade to .Net10 as it will fail to buildNotes
Verification
Steps:
net9.0, andnet10.0ElsaDashboard.Samples.AspNetCore.Monolith.csprojElsa.Samples.Persistence.EntityFramework.csprojExpected outcome:
Screenshots / Recordings (if applicable)
N/A
Checklist
``