Skip to content

Commit

Permalink
feat: add integration projections GAWR-4534
Browse files Browse the repository at this point in the history
  • Loading branch information
pgallik authored Jan 16, 2024
1 parent 4db6789 commit 0fcfc06
Show file tree
Hide file tree
Showing 73 changed files with 4,954 additions and 73 deletions.
7 changes: 7 additions & 0 deletions StreetNameRegistry.sln
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StreetNameRegistry.Snapshot
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StreetNameRegistry.Consumer.Read.Postal", "src\StreetNameRegistry.Consumer.Read.Postal\StreetNameRegistry.Consumer.Read.Postal.csproj", "{83C7D129-ACEA-4FC6-A55C-748D8D31135A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StreetNameRegistry.Projections.Integration", "src\StreetNameRegistry.Projections.Integration\StreetNameRegistry.Projections.Integration.csproj", "{E69043F1-E6C9-484C-A961-C28C33013C91}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -185,6 +187,10 @@ Global
{83C7D129-ACEA-4FC6-A55C-748D8D31135A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83C7D129-ACEA-4FC6-A55C-748D8D31135A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83C7D129-ACEA-4FC6-A55C-748D8D31135A}.Release|Any CPU.Build.0 = Release|Any CPU
{E69043F1-E6C9-484C-A961-C28C33013C91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E69043F1-E6C9-484C-A961-C28C33013C91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E69043F1-E6C9-484C-A961-C28C33013C91}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E69043F1-E6C9-484C-A961-C28C33013C91}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -215,6 +221,7 @@ Global
{EFDF165C-DCFE-4577-A00F-04691197FB1B} = {81641B0B-BEFB-476D-8519-3774313E944B}
{06F8F677-2696-4996-B4AE-B8E3B747A696} = {65EA04DE-5928-430F-92CA-24C11B6E5A00}
{83C7D129-ACEA-4FC6-A55C-748D8D31135A} = {65EA04DE-5928-430F-92CA-24C11B6E5A00}
{E69043F1-E6C9-484C-A961-C28C33013C91} = {65EA04DE-5928-430F-92CA-24C11B6E5A00}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3B44FE80-30FE-47B7-A0DE-8610218FFF63}
Expand Down
26 changes: 17 additions & 9 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ nuget Microsoft.Extensions.Http.Polly 6.0.3

// For more healtchecks, look at https://github.com/Xabaril/AspNetCore.Diagnostics.HealthChecks
nuget AspNetCore.HealthChecks.SqlServer 6.0.2
nuget AspNetCore.HealthChecks.NpgSql 6.0.2

nuget MediatR 12.0.1
nuget MediatR.Contracts 2.0.1
Expand All @@ -31,6 +32,10 @@ nuget Destructurama.JsonNet 2.0.0

nuget Microsoft.EntityFrameworkCore.Design 6.0.3

nuget Npgsql 6.0.3
nuget Npgsql.EntityFrameworkCore.PostgreSQL 6.0.3
nuget Npgsql.EntityFrameworkCore.PostgreSQL.Design 2.0.0-preview1

// VBR STUFF
nuget Be.Vlaanderen.Basisregisters.Build.Pipeline 6.0.5
nuget Be.Vlaanderen.Basisregisters.Testing.Infrastructure.Events 3.0.0 content: true, copy_content_to_output_dir: always, copy_local: true
Expand Down Expand Up @@ -59,16 +64,19 @@ nuget Be.Vlaanderen.Basisregisters.SnapshotVerifier 8.2.0
nuget Be.Vlaanderen.Basisregisters.EventHandling 4.2.3
nuget Be.Vlaanderen.Basisregisters.EventHandling.Autofac 4.2.3

nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList 11.0.7
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore 11.0.7
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Autofac 11.0.7
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner 11.0.7
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.Microsoft 11.0.7
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Connector.Testing 11.0.7
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Testing.Xunit 11.0.7
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Syndication 11.0.7
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.LastChangedList 12.0.1
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore 12.0.1
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Autofac 12.0.1
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner 12.0.1
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer 12.0.1
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.Npgsql 12.0.1
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Connector 12.0.1
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Connector.Testing 12.0.1
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Testing.Xunit 12.0.1
nuget Be.Vlaanderen.Basisregisters.ProjectionHandling.Syndication 12.0.1

nuget Be.Vlaanderen.Basisregisters.Projector 13.1.0

nuget Be.Vlaanderen.Basisregisters.Projector 13.0.10

nuget Be.Vlaanderen.Basisregisters.DataDog.Tracing.Autofac 5.0.3
nuget Be.Vlaanderen.Basisregisters.DataDog.Tracing.AspNetCore 5.0.3
Expand Down
106 changes: 77 additions & 29 deletions paket.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/EF.MigrationsHelper/EF.MigrationsHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<ProjectReference Include="..\StreetNameRegistry.Consumer.Read.Postal\StreetNameRegistry.Consumer.Read.Postal.csproj" />
<ProjectReference Include="..\StreetNameRegistry.Producer.Snapshot.Oslo\StreetNameRegistry.Producer.Snapshot.Oslo.csproj" />
<ProjectReference Include="..\StreetNameRegistry.Projections.BackOffice\StreetNameRegistry.Projections.BackOffice.csproj" />
<ProjectReference Include="..\StreetNameRegistry.Projections.Integration\StreetNameRegistry.Projections.Integration.csproj" />
</ItemGroup>

<Import Project="..\..\.paket\Paket.Restore.targets" />
Expand Down
3 changes: 2 additions & 1 deletion src/EF.MigrationsHelper/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"LastChangedListAdmin": "x",
"BackOffice": "x",
"ProducerProjectionsAdmin": "x",
"ConsumerPostalAdmin": "x"
"ConsumerPostalAdmin": "x",
"IntegrationProjectionsAdmin": "x"
},

"Serilog": {
Expand Down
3 changes: 3 additions & 0 deletions src/EF.MigrationsHelper/paket.references
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
Microsoft.EntityFrameworkCore.Design

Npgsql.EntityFrameworkCore.PostgreSQL
Npgsql.EntityFrameworkCore.PostgreSQL.Design
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace StreetNameRegistry.Consumer.Read.Postal
using System.Threading.Tasks;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.MigrationExtensions;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer.MigrationExtensions;
using StreetNameRegistry.Infrastructure;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Be.Vlaanderen.Basisregisters.GrAr.Contracts
Be.Vlaanderen.Basisregisters.MessageHandling.Kafka.Consumer

Be.Vlaanderen.Basisregisters.ProjectionHandling.Connector
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer

Destructurama.JsonNet

Expand Down
3 changes: 2 additions & 1 deletion src/StreetNameRegistry.Consumer/ConsumerContext.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace StreetNameRegistry.Consumer
{
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer;
using Microsoft.EntityFrameworkCore;
using Municipality;
using StreetNameRegistry.Infrastructure;
Expand All @@ -21,7 +22,7 @@ public ConsumerContext(DbContextOptions<ConsumerContext> options)
public override string ProjectionStateSchema => Schema.ConsumerProjections;
}

public class ConsumerContextFactory : RunnerDbContextMigrationFactory<ConsumerContext>
public class ConsumerContextFactory : SqlServerRunnerDbContextMigrationFactory<ConsumerContext>
{
public ConsumerContextFactory()
: this("ConsumerAdmin")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.IO;
using Be.Vlaanderen.Basisregisters.MessageHandling.Kafka.Consumer.SqlServer;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.MigrationExtensions;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer.MigrationExtensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
Expand Down
2 changes: 1 addition & 1 deletion src/StreetNameRegistry.Consumer/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Be.Vlaanderen.Basisregisters.EventHandling.Autofac
Be.Vlaanderen.Basisregisters.GrAr.Contracts
Be.Vlaanderen.Basisregisters.MessageHandling.Kafka.Simple
Be.Vlaanderen.Basisregisters.ProjectionHandling.Connector
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.Microsoft
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer
Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Autofac
Be.Vlaanderen.Basisregisters.Projector

Expand Down
2 changes: 2 additions & 0 deletions src/StreetNameRegistry.Infrastructure/Schema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public static class Schema
public const string BackOfficeProjections = "StreetNameRegistryBackOfficeProjections";
public const string Producer = "StreetNameRegistryProducer";
public const string ProducerSnapshotOslo = "StreetNameRegistryProducerSnapshotOslo";
public const string Integration = "integration_streetname";
}

public static class MigrationTables
Expand All @@ -36,5 +37,6 @@ public static class MigrationTables
public const string BackOfficeProjections = "__EFMigrationsHistoryBackOfficeProjections";
public const string Producer = "__EFMigrationsHistoryProducer";
public const string ProducerSnapshotOslo = "__EFMigrationsHistoryProducerSnapshotOslo";
public const string Integration = "__EFMigrationsHistory";
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
namespace StreetNameRegistry.Producer.Snapshot.Oslo
{
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer;
using Microsoft.EntityFrameworkCore;
using StreetNameRegistry.Infrastructure;

public class ProducerContextMigrationFactory : RunnerDbContextMigrationFactory<ProducerContext>
public class ProducerContextMigrationFactory : SqlServerRunnerDbContextMigrationFactory<ProducerContext>
{
public ProducerContextMigrationFactory()
: base("ProducerProjectionsAdmin", HistoryConfiguration) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace StreetNameRegistry.Producer.Snapshot.Oslo
using Autofac;
using Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql.EntityFrameworkCore;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.MigrationExtensions;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer.MigrationExtensions;
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql
Be.Vlaanderen.Basisregisters.GrAr.Legacy
Be.Vlaanderen.Basisregisters.GrAr.Oslo
Be.Vlaanderen.BasisRegisters.MessageHandling.Kafka.Producer
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer
Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Autofac
Be.Vlaanderen.Basisregisters.Projector

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
namespace StreetNameRegistry.Producer
{
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer;
using Microsoft.EntityFrameworkCore;
using StreetNameRegistry.Infrastructure;

public class ProducerContextMigrationFactory : RunnerDbContextMigrationFactory<ProducerContext>
public class ProducerContextMigrationFactory : SqlServerRunnerDbContextMigrationFactory<ProducerContext>
{
public ProducerContextMigrationFactory()
: base("ProducerProjectionsAdmin", HistoryConfiguration) { }
Expand Down
1 change: 1 addition & 0 deletions src/StreetNameRegistry.Producer/ProducerModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace StreetNameRegistry.Producer
using Autofac;
using Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql.EntityFrameworkCore;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.MigrationExtensions;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer.MigrationExtensions;
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
Expand Down
1 change: 1 addition & 0 deletions src/StreetNameRegistry.Producer/paket.references
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Be.Vlaanderen.Basisregisters.EventHandling.Autofac
Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql
Be.Vlaanderen.Basisregisters.GrAr.Contracts
Be.Vlaanderen.BasisRegisters.MessageHandling.Kafka.Producer
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer
Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Autofac
Be.Vlaanderen.Basisregisters.Projector

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
namespace StreetNameRegistry.Projections.BackOffice
{
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer;
using Microsoft.EntityFrameworkCore;
using StreetNameRegistry.Infrastructure;

Expand All @@ -16,7 +17,7 @@ public BackOfficeProjectionsContext(DbContextOptions<BackOfficeProjectionsContex
: base(options) { }
}

public sealed class BackOfficeProjectionsContextMigrationFactory : RunnerDbContextMigrationFactory<BackOfficeProjectionsContext>
public sealed class BackOfficeProjectionsContextMigrationFactory : SqlServerRunnerDbContextMigrationFactory<BackOfficeProjectionsContext>
{
public BackOfficeProjectionsContextMigrationFactory()
: base("BackOfficeProjectionsAdmin", HistoryConfiguration) { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace StreetNameRegistry.Projections.BackOffice.Infrastructure
using System;
using Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql.EntityFrameworkCore;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.MigrationExtensions;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer.MigrationExtensions;
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Be.Vlaanderen.Basisregisters.EventHandling.Autofac
Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer
Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Autofac
Be.Vlaanderen.Basisregisters.Projector

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
namespace StreetNameRegistry.Projections.Extract
{
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer;
using Infrastructure;
using Microsoft.EntityFrameworkCore;

public sealed class ExtractContextMigrationFactory : RunnerDbContextMigrationFactory<ExtractContext>
public sealed class ExtractContextMigrationFactory : SqlServerRunnerDbContextMigrationFactory<ExtractContext>
{
public ExtractContextMigrationFactory() :
base("ExtractProjectionsAdmin", HistoryConfiguration)
Expand Down
6 changes: 3 additions & 3 deletions src/StreetNameRegistry.Projections.Extract/ExtractModule.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
namespace StreetNameRegistry.Projections.Extract
{
using System;
using Microsoft.Data.SqlClient;
using Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql.EntityFrameworkCore;
using Autofac;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.MigrationExtensions;
using Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql.EntityFrameworkCore;
using Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer.MigrationExtensions;
using Infrastructure;
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Be.Vlaanderen.Basisregisters.EventHandling.Autofac
Be.Vlaanderen.Basisregisters.DataDog.Tracing.Sql
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner
Be.Vlaanderen.Basisregisters.ProjectionHandling.Runner.SqlServer
Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore
Be.Vlaanderen.Basisregisters.Shaperon

Expand Down
Loading

0 comments on commit 0fcfc06

Please sign in to comment.