Extract EventLogExpert.ProviderDatabase library with IProviderDetailsLookup abstraction#536
Merged
Merged
Conversation
…r from ProviderDbContext
…e and update project references
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extracts the EF Core/SQLite-backed provider database implementation from EventLogExpert.Eventing into a new EventLogExpert.ProviderDatabase library, and introduces an IProviderDetailsLookup/IProviderDetailsLookupFactory abstraction so EventResolver can query provider databases without depending on EF Core.
Changes:
- Introduces
EventLogExpert.ProviderDatabaseproject containing the EF CoreProviderDbContextand related serialization/merge utilities, and wires it into solution/project references. - Adds
IProviderDetailsLookup+IProviderDetailsLookupFactoryinEventingand updatesEventResolverto use these abstractions. - Adds characterization/unit tests for schema state/messages/upgrade exception and provider details lookup behaviors; adds shared
*.TestUtilsscaffolding projects.
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/EventLogExpert.Eventing.Tests/Providers/ProviderDetailsTests.cs | Adds coverage for provider details cached lookups (events/messages) and cache invalidation. |
| tests/Unit/EventLogExpert.Eventing.Tests/ProviderDatabase/SchemaStateMessagesTests.cs | Adds formatting tests for shared schema-state user messages. |
| tests/Unit/EventLogExpert.Eventing.Tests/ProviderDatabase/ProviderJsonContextTests.cs | Updates namespace import for moved JSON context. |
| tests/Unit/EventLogExpert.Eventing.Tests/ProviderDatabase/ProviderDetailsMergerTests.cs | Updates imports to reference moved merger implementation. |
| tests/Unit/EventLogExpert.Eventing.Tests/ProviderDatabase/ProviderDatabaseSchemaStateTests.cs | Adds boundary tests for NeedsUpgrade across versions. |
| tests/Unit/EventLogExpert.Eventing.Tests/ProviderDatabase/DatabaseUpgradeExceptionTests.cs | Adds tests for DatabaseUpgradeException message/properties. |
| tests/Unit/EventLogExpert.Eventing.Tests/ProviderDatabase/CompressedJsonValueConverterTests.cs | Updates namespace import for moved converter. |
| tests/Unit/EventLogExpert.Eventing.Tests/EventLogExpert.Eventing.Tests.csproj | Adds project reference to EventLogExpert.ProviderDatabase. |
| tests/Shared/EventLogExpert.UI.TestUtils/EventLogExpert.UI.TestUtils.csproj | Adds new shared UI test utils project referencing UI. |
| tests/Shared/EventLogExpert.Runtime.TestUtils/EventLogExpert.Runtime.TestUtils.csproj | Adds new shared runtime test utils project referencing Runtime. |
| tests/Shared/EventLogExpert.ProviderDatabase.TestUtils/EventLogExpert.ProviderDatabase.TestUtils.csproj | Adds new shared provider-db test utils project referencing ProviderDatabase + Eventing.TestUtils. |
| tests/Shared/EventLogExpert.Eventing.TestUtils/EventLogExpert.Eventing.TestUtils.csproj | Adds project reference to EventLogExpert.ProviderDatabase. |
| tests/Integration/EventLogExpert.Runtime.IntegrationTests/TestUtils/DatabaseSeedUtils.cs | Updates namespace import for moved provider DB types. |
| tests/Integration/EventLogExpert.Eventing.IntegrationTests/Resolvers/VersatileEventResolverTests.cs | Updates namespace import for moved provider DB types. |
| tests/Integration/EventLogExpert.Eventing.IntegrationTests/Resolvers/EventProviderDatabaseEventResolverTests.cs | Updates namespace import for moved provider DB types. |
| tests/Integration/EventLogExpert.Eventing.IntegrationTests/ProviderDatabase/ProviderDbContextTests.cs | Updates imports to include moved provider DB implementation. |
| tests/Integration/EventLogExpert.Eventing.IntegrationTests/EventLogExpert.Eventing.IntegrationTests.csproj | Adds project reference to EventLogExpert.ProviderDatabase. |
| tests/Integration/EventLogExpert.EventDbTool.IntegrationTests/UpgradeDatabaseCommandTests.cs | Updates imports to include moved provider DB implementation. |
| tests/Integration/EventLogExpert.EventDbTool.IntegrationTests/TestUtils/DatabaseTestUtils.cs | Updates namespace import for moved provider DB types. |
| tests/Integration/EventLogExpert.EventDbTool.IntegrationTests/DiffDatabaseCommandTests.cs | Updates namespace import for moved provider DB types. |
| tests/Integration/EventLogExpert.EventDbTool.IntegrationTests/CreateDatabaseCommandTests.cs | Updates namespace import for moved provider DB types. |
| src/EventLogExpert/MauiProgram.cs | Registers IProviderDetailsLookupFactory and updates usings. |
| src/EventLogExpert.Runtime/EventLogExpert.Runtime.csproj | Adds project reference to EventLogExpert.ProviderDatabase. |
| src/EventLogExpert.Runtime/Database/DatabaseService.cs | Updates imports to include moved provider DB implementation. |
| src/EventLogExpert.ProviderDatabase/ProviderJsonSerializerOptions.cs | Moves namespace to EventLogExpert.ProviderDatabase. |
| src/EventLogExpert.ProviderDatabase/ProviderJsonContext.cs | Moves namespace to EventLogExpert.ProviderDatabase. |
| src/EventLogExpert.ProviderDatabase/ProviderDetailsMerger.cs | Moves namespace and references schema/exception types retained in Eventing. |
| src/EventLogExpert.ProviderDatabase/ProviderDbContextFactory.cs | Adds concrete factory implementing IProviderDetailsLookupFactory. |
| src/EventLogExpert.ProviderDatabase/ProviderDbContext.cs | Moves namespace; implements IProviderDetailsLookup; sets no-tracking for read-only. |
| src/EventLogExpert.ProviderDatabase/EventLogExpert.ProviderDatabase.csproj | New project for extracted EF Core provider database implementation. |
| src/EventLogExpert.ProviderDatabase/CompressedJsonValueConverter.cs | Moves namespace to EventLogExpert.ProviderDatabase. |
| src/EventLogExpert.Eventing/Resolvers/EventResolver.cs | Switches database access from ProviderDbContext to IProviderDetailsLookup + factory. |
| src/EventLogExpert.Eventing/ProviderDatabase/IProviderDetailsLookupFactory.cs | Adds factory abstraction for creating provider DB lookup instances. |
| src/EventLogExpert.Eventing/ProviderDatabase/IProviderDetailsLookup.cs | Adds lookup abstraction used by EventResolver. |
| src/EventLogExpert.Eventing/EventLogExpert.Eventing.csproj | Removes EF Core dependency; adds logging abstractions package. |
| src/EventLogExpert.EventDbTool/UpgradeDatabaseCommand.cs | Updates imports and adds reference to ProviderDatabase project types. |
| src/EventLogExpert.EventDbTool/ProviderSource.cs | Updates imports and adds reference to ProviderDatabase project types. |
| src/EventLogExpert.EventDbTool/MergeDatabaseCommand.cs | Updates imports and adds reference to ProviderDatabase project types. |
| src/EventLogExpert.EventDbTool/EventLogExpert.EventDbTool.csproj | Adds project reference to EventLogExpert.ProviderDatabase. |
| src/EventLogExpert.EventDbTool/DiffDatabaseCommand.cs | Updates namespace import for moved provider DB types. |
| src/EventLogExpert.EventDbTool/CreateDatabaseCommand.cs | Updates imports for moved provider DB types. |
| EventLogExpert.slnx | Adds ProviderDatabase and new shared test utils projects to solution. |
| Directory.Packages.props | Adds Microsoft.Extensions.Logging.Abstractions package version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…hat supply database paths
…nu database entry
…cts, and DatabaseCoordinationEffects
…t, Recovery, and FileOperations
…xception mid-loop
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 140 out of 148 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
src/EventLogExpert.Filtering/Evaluation/ResolvedEventExtensions.cs:8
using EventLogExpert.Filtering.Evaluation;is redundant here since the file is already in theEventLogExpert.Filtering.Evaluationnamespace, and it can introduce unnecessary-using warnings. Removing it keeps the file cleaner and avoids analyzer noise.
src/EventLogExpert.Filtering/Evaluation/FilterExtensions.cs:6using EventLogExpert.Filtering.Evaluation;is unnecessary in a file that already declaresnamespace EventLogExpert.Filtering.Evaluation;. Dropping it avoids redundant-usings warnings and keeps the header minimal.
bill-long
previously approved these changes
May 22, 2026
…ove tests to dedicated projects
…harden smoke tests
…adapters, align Filtering test mirrors and Common/<Domain>/
bill-long
approved these changes
May 22, 2026
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.
Extracts the provider-database EF Core types from EventLogExpert.Eventing into a new EventLogExpert.ProviderDatabase library, breaking the dependency cycle via an IProviderDetailsLookup abstraction.
Changes
TestUtils scaffolding
Characterization tests (+18 tests)
ProviderDatabase library extraction
Test results
2,193 tests passing (baseline 2,175 + 18 new characterization tests), 0 failures