-
Notifications
You must be signed in to change notification settings - Fork 30
Replace FluentMigrator.Runner meta-package with FluentMigrator.Runner.Core #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
base: main
Are you sure you want to change the base?
Conversation
- Changed Elsa.Persistence.Dapper to depend on FluentMigrator.Runner.Core instead of FluentMigrator.Runner (meta-package) - This prevents pulling in all database provider packages (Db2, Oracle, Postgres, SqlServer, Snowflake, etc.) - Removed UseSqlite() and UseSqlServer() convenience methods from DapperMigrationsFeature - Updated consuming applications to add specific runner packages and configure directly - Fixed pre-existing bug: replaced System.Data.SqlClient with Microsoft.Data.SqlClient package reference Co-authored-by: sfmskywalker <[email protected]>
Co-authored-by: sfmskywalker <[email protected]>
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 addresses issue #112 by replacing the FluentMigrator.Runner meta-package with FluentMigrator.Runner.Core in the Elsa.Persistence.Dapper library to avoid pulling in all database provider dependencies (~75+ MB of unused native dependencies). This is a breaking change that requires consuming applications to explicitly declare which database providers they need.
Changes:
- Replaced
FluentMigrator.RunnerwithFluentMigrator.Runner.Coredependency in core library - Removed
UseSqlite()andUseSqlServer()convenience methods fromDapperMigrationsFeature - Updated consuming application to explicitly configure database providers via
ConfigureRunner
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Packages.props | Added FluentMigrator.Runner.Core, FluentMigrator.Runner.SqlServer, and FluentMigrator.Runner.SQLite package versions (7.2.0) |
| src/modules/persistence/Elsa.Persistence.Dapper/Elsa.Persistence.Dapper.csproj | Replaced FluentMigrator.Runner with FluentMigrator.Runner.Core; replaced System.Data.SqlClient with Microsoft.Data.SqlClient |
| src/modules/persistence/Elsa.Persistence.Dapper/Features/DapperMigrationsFeature.cs | Removed UseSqlite() and UseSqlServer() convenience methods |
| src/workbench/Elsa.Server.Web/Elsa.Server.Web.csproj | Added explicit FluentMigrator.Runner.SqlServer and FluentMigrator.Runner.SQLite package references |
| src/workbench/Elsa.Server.Web/Program.cs | Updated migration configuration to use ConfigureRunner with explicit database provider calls |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/modules/persistence/Elsa.Persistence.Dapper/Features/DapperMigrationsFeature.cs
Outdated
Show resolved
Hide resolved
|
@copilot apply changes based on the comments in this thread and make sure everything builds and tests pass. |
- Remove return statement from lambda in Program.cs (Action<T> should not return) - Add comprehensive XML documentation to ConfigureRunner property explaining breaking change and migration path Co-authored-by: sfmskywalker <[email protected]>
Summary
This PR successfully addresses the issue where
Elsa.Persistence.Dapperdepends onFluentMigrator.Runnermeta-package, which transitively pulls in all database provider packages (Db2, Oracle, PostgreSQL, SQL Server, Snowflake, etc.), significantly increasing application size and publish time.Changes Made:
1. Core Library Changes (
Elsa.Persistence.Dapper)FluentMigrator.RunnerwithFluentMigrator.Runner.Corein project fileUseSqlite()andUseSqlServer()fromDapperMigrationsFeatureSystem.Data.SqlClientwithMicrosoft.Data.SqlClientConfigureRunnerproperty2. Package Management (
Directory.Packages.props)FluentMigrator.Runner.Core(7.2.0)FluentMigrator.Runner.SqlServer(7.2.0)FluentMigrator.Runner.SQLite(7.2.0)3. Consuming Application Updates (
Elsa.Server.Web)Benefits:
Breaking Change Notice:
DapperMigrationsFeature.UseSqlite()orUseSqlServer()methods.Migration Guide for Consumers:
Before:
After:
Testing:
Elsa.Persistence.DapperprojectFluentMigrator.Runner.Coreis now includedElsa.Server.WebworkbenchSecurity Summary:
No security vulnerabilities were introduced by these changes. The changes are purely dependency management and do not affect runtime behavior or data handling.
Addresses issue #112 raised by the community regarding FluentMigrator.Runner meta-package pulling all providers unnecessarily.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.