Skip to content
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

fix: bump grar.contracts #774

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@ nuget Be.Vlaanderen.Basisregisters.Projector 15.0.0

nuget Be.Vlaanderen.Basisregisters.Crab 4.0.0

nuget Be.Vlaanderen.Basisregisters.GrAr.Common 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Notifications 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Contracts 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Edit 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Import 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Legacy 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Provenance 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Provenance.AcmIdm 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Extracts 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Oslo 21.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Common 21.7.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Notifications 21.7.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Contracts 21.7.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Edit 21.7.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Import 21.7.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Legacy 21.7.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Provenance 21.7.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Provenance.AcmIdm 21.7.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Extracts 21.7.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Oslo 21.7.0

nuget Be.Vlaanderen.Basisregisters.MessageHandling.AwsSqs.Simple 5.0.1
nuget Be.Vlaanderen.Basisregisters.MessageHandling.Kafka.Simple 5.0.1
Expand Down
30 changes: 15 additions & 15 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,18 @@ NUGET
Autofac.Extensions.DependencyInjection (>= 9.0)
Be.Vlaanderen.Basisregisters.EventHandling (5.0)
Be.Vlaanderen.Basisregisters.Generators.Guid.Deterministic (4.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.7)
Be.Vlaanderen.Basisregisters.AggregateSource (>= 9.0.1)
Be.Vlaanderen.Basisregisters.CommandHandling (>= 9.0.1)
NetTopologySuite (>= 2.5)
NodaTime (>= 3.1.11)
Be.Vlaanderen.Basisregisters.GrAr.Contracts (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Edit (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Contracts (21.7)
Be.Vlaanderen.Basisregisters.GrAr.Edit (21.7)
NetTopologySuite (>= 2.5)
Be.Vlaanderen.Basisregisters.GrAr.Extracts (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Extracts (21.7)
Be.Vlaanderen.Basisregisters.Api (>= 21.0)
Be.Vlaanderen.Basisregisters.Shaperon (>= 10.0.2)
Be.Vlaanderen.Basisregisters.GrAr.Import (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Import (21.7)
Autofac (>= 8.0)
Be.Vlaanderen.Basisregisters.AggregateSource.SqlStreamStore (>= 9.0.1)
Be.Vlaanderen.Basisregisters.CommandHandling (>= 9.0.1)
Expand All @@ -279,31 +279,31 @@ NUGET
Serilog (>= 3.1.1)
Serilog.Extensions.Logging (>= 8.0)
System.Threading.Tasks.Dataflow (>= 8.0)
Be.Vlaanderen.Basisregisters.GrAr.Legacy (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Legacy (21.7)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.7)
Be.Vlaanderen.Basisregisters.Utilities.Rfc3339DateTimeOffset (>= 4.0)
Newtonsoft.Json (>= 13.0.3)
Be.Vlaanderen.Basisregisters.GrAr.Notifications (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Notifications (21.7)
AWSSDK.SimpleNotificationService (>= 3.7.301.3)
System.Text.Json (>= 8.0.3)
Be.Vlaanderen.Basisregisters.GrAr.Oslo (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Oslo (21.7)
Be.Vlaanderen.Basisregisters.AspNetCore.Mvc.Formatters.Json (>= 5.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.7)
Be.Vlaanderen.Basisregisters.Utilities.Rfc3339DateTimeOffset (>= 4.0)
Microsoft.Extensions.Configuration (>= 8.0)
Microsoft.Extensions.Http.Polly (>= 8.0.3)
Newtonsoft.Json (>= 13.0.3)
Be.Vlaanderen.Basisregisters.GrAr.Provenance (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Provenance (21.7)
Be.Vlaanderen.Basisregisters.CommandHandling (>= 9.0.1)
Be.Vlaanderen.Basisregisters.Crab (>= 4.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.7)
Microsoft.CSharp (>= 4.7)
Be.Vlaanderen.Basisregisters.GrAr.Provenance.AcmIdm (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Provenance.AcmIdm (21.7)
Be.Vlaanderen.Basisregisters.Auth.AcmIdm (>= 2.0)
Be.Vlaanderen.Basisregisters.CommandHandling (>= 9.0.1)
Be.Vlaanderen.Basisregisters.Crab (>= 4.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Provenance (21.6)
Be.Vlaanderen.Basisregisters.GrAr.Common (21.7)
Be.Vlaanderen.Basisregisters.GrAr.Provenance (21.7)
Microsoft.CSharp (>= 4.7)
Be.Vlaanderen.Basisregisters.MessageHandling.AwsSqs.Simple (5.0.1)
AWSSDK.Core (>= 3.7.302.15)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ await DetachBecauseRemoved(
}
}

await backOfficeContext.Database.BeginTransactionAsync();
await backOfficeContext.Database.BeginTransactionAsync(ct);

foreach (var parcelId in commandByParcels.Select(x => x.ParcelId))
{
var parcel = await parcels.GetAsync(new ParcelStreamId(parcelId), ct);
Expand All @@ -237,7 +237,7 @@ await DetachBecauseRemoved(
}
}

await backOfficeContext.Database.CommitTransactionAsync();
await backOfficeContext.Database.CommitTransactionAsync(ct);
});

When<AddressWasRejectedBecauseOfReaddress>(async (commandHandler, message, ct) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public static Contracts.ParcelAddressesWereReaddressed ToContract(this ParcelAgg
message.AttachedAddressPersistentLocalIds,
message.DetachedAddressPersistentLocalIds,
message.AddressRegistryReaddresses.Select(x =>
new Contracts.AddressRegistryReaddress(x.SourceAddressPersistentLocalId, x.SourceAddressPersistentLocalId)),
new Be.Vlaanderen.Basisregisters.GrAr.Contracts.Common.AddressRegistryReaddress(
x.SourceAddressPersistentLocalId,
x.SourceAddressPersistentLocalId)),
message.Provenance.ToContract());

public static Contracts.ParcelWasMigrated ToContract(this ParcelAggregate.ParcelWasMigrated message) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ await backOfficeContext.RemoveIdempotentParcelAddressRelation(

if (previousAddress is not null && previousAddress.Count == 1)
{
await backOfficeContext.RemoveIdempotentParcelAddressRelation(
new ParcelId(message.Message.ParcelId),
new AddressPersistentLocalId(message.Message.PreviousAddressPersistentLocalId),
cancellationToken);
backOfficeContext.ParcelAddressRelations.Remove(previousAddress);
}
else if (previousAddress is not null)
{
Expand All @@ -97,22 +94,19 @@ await backOfficeContext.RemoveIdempotentParcelAddressRelation(

if (newAddress is null)
{
await backOfficeContext.AddIdempotentParcelAddressRelation(
new ParcelId(message.Message.ParcelId),
new AddressPersistentLocalId(message.Message.NewAddressPersistentLocalId),
await backOfficeContext.ParcelAddressRelations.AddAsync(
new ParcelAddressRelation(message.Message.ParcelId, message.Message.NewAddressPersistentLocalId),
cancellationToken);
}
else
{
newAddress.Count += 1;
}
});

When<Envelope<ParcelAddressesWereReaddressed>>((_, message, cancellationToken) =>
{
// Do nothing
return Task.CompletedTask;
await backOfficeContext.SaveChangesAsync(cancellationToken);
});

When<Envelope<ParcelAddressesWereReaddressed>>((_, _, _) => Task.CompletedTask);
}
}
}
Loading