Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmus committed Apr 24, 2018
2 parents 46a52cb + 482fc44 commit dd8457f
Show file tree
Hide file tree
Showing 48 changed files with 407 additions and 103 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
</td>
<td width="25%">
<p>
<a href="https://ci.appveyor.com/project/rasmusnu/eventflow"><img src="https://ci.appveyor.com/api/projects/status/51yvhvbd909e4o82/branch/develop?svg=true" /></a>
<a href="https://ci.appveyor.com/project/eventflow/eventflow"><img src="https://ci.appveyor.com/api/projects/status/51yvhvbd909e4o82/branch/develop?svg=true" /></a>
</p>
<p>
<a href="https://codecov.io/github/eventflow/EventFlow?branch=develop"><img src="https://codecov.io/github/eventflow/EventFlow/coverage.svg?branch=develop" /></a>
Expand Down
21 changes: 18 additions & 3 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
### New in 0.54 (not released yet)

- **Critical fix:** `SagaAggregateStore` was incorrectly putting a object reference
### New in 0.55 (not released yet)

* Fixed: Re-populating events to read models that span multiple aggregates
now has events orderd by timestamp instead of sequence numbers, i.e., events
from aggregates with higher sequences numbers isn't forced last
* New: Trigger sagas without the need of any domain events by using
`ISagaStore.UpdateAsync(...)`
* New: .NET standard 2.0 (still supports 1.6) support added to these
NuGet packages
- EventFlow
- EventFlow.Autofac
- EventFlow.Elasticsearch
- EventFlow.Hangfire
- EventFlow.Sql

### New in 0.54.3261 (released 2018-02-25)

- **Critical fix:** `SagaAggregateStore` was incorrectly putting an object reference
into its memory cache causing an object already disposed exception when working with
sagas
- New: Added [LibLog](https://github.com/damianh/LibLog), enable by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ await WriteAsync(
}
catch (ArgumentException e)
{
_log.Debug(e, $"Failed to publish serilized command '{name}' v{version} due to: {e.Message}");
_log.Debug(e, $"Failed to publish serialized command '{name}' v{version} due to: {e.Message}");
await WriteErrorAsync(e.Message, HttpStatusCode.BadRequest, context).ConfigureAwait(false);
}
catch (DomainError e)
Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.Autofac/EventFlow.Autofac.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Common.props" />
<PropertyGroup>
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
<TargetFrameworks>net451;netstandard1.6;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Common.props" />
<PropertyGroup>
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
<TargetFrameworks>net451;netstandard1.6;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ public CargoAggregate(CargoId id) : base(id)

public void Book(Route route)
{
Specs.AggregateIsNew.ThrowDomainErrorIfNotStatisfied(this);
Specs.AggregateIsNew.ThrowDomainErrorIfNotSatisfied(this);
Emit(new CargoBookedEvent(route));
}

public void SetItinerary(Itinerary itinerary)
{
Specs.AggregateIsCreated.ThrowDomainErrorIfNotStatisfied(this);
Route.Specification().ThrowDomainErrorIfNotStatisfied(itinerary);
Specs.AggregateIsCreated.ThrowDomainErrorIfNotSatisfied(this);
Route.Specification().ThrowDomainErrorIfNotSatisfied(itinerary);

Emit(new CargoItinerarySetEvent(itinerary));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected override IEnumerable<string> IsNotSatisfiedBecause(Itinerary obj)
var itineraryDepartureTime = obj.DepartureTime();
if (Route.DepartureTime.IsAfter(itineraryDepartureTime))
{
yield return $"Route origin depature '{Route.DepartureTime}' is after itinerary depature '{itineraryDepartureTime}'";
yield return $"Route origin departure '{Route.DepartureTime}' is after itinerary departure '{itineraryDepartureTime}'";
}

var itineraryArrivalLocation = obj.ArrivalLocation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public Itinerary(
var legsList = (transportLegs ?? Enumerable.Empty<TransportLeg>()).ToList();

if (!legsList.Any()) throw new ArgumentException(nameof(transportLegs));
(new TransportLegsAreConnectedSpecification()).ThrowDomainErrorIfNotStatisfied(legsList);
(new TransportLegsAreConnectedSpecification()).ThrowDomainErrorIfNotSatisfied(legsList);

TransportLegs = legsList;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ public VoyageAggregate(VoyageId id) : base(id)

public void Create(Schedule schedule)
{
Specs.AggregateIsNew.ThrowDomainErrorIfNotStatisfied(this);
Specs.AggregateIsNew.ThrowDomainErrorIfNotSatisfied(this);

Emit(new VoyageCreatedEvent(schedule));
}

public void Delay(TimeSpan delay)
{
Specs.AggregateIsCreated.ThrowDomainErrorIfNotStatisfied(this);
Specs.AggregateIsCreated.ThrowDomainErrorIfNotSatisfied(this);

if (delay == TimeSpan.Zero) return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void OneTimeSetUp()
[OneTimeTearDown]
public void OneTimeTearDown()
{
_backgroundJobServer.DisposeSafe("Hangfire backgroung job server");
_backgroundJobServer.DisposeSafe("Hangfire background job server");
_webApp.DisposeSafe("Web APP");
_msSqlDatabase.DisposeSafe("MSSQL database");
}
Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Common.props" />
<PropertyGroup>
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
<TargetFrameworks>net451;netstandard1.6;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.MsSql/Integrations/TableParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ internal class TableParameter<TRow> : SqlMapper.IDynamicParameters
private readonly SqlMapper.IDynamicParameters _otherParameters;

// ReSharper disable StaticMemberInGenericType
// The PropertyInfos and SqlMetaDatas static fields are dependant on the TRow type
// The PropertyInfos and SqlMetaDatas static fields are dependent on the TRow type
private static readonly Dictionary<SqlDbType, Action<SqlDataRecord, int, object>> SqlDataRecordSetters = new Dictionary<SqlDbType, Action<SqlDataRecord, int, object>>
{
{SqlDbType.Text, (r, i, o) => r.SetString(i, (string)o)},
Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.MsSql/ReadStores/MssqlReadModelStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public override async Task<ReadModelEnvelope<TReadModel>> GetAsync(string id, Ca

var readModelVersion = GetVersion(readModel);

Log.Verbose(() => $"Foud MSSQL read model '{readModelType.PrettyPrint()}' with ID '{readModelVersion}'");
Log.Verbose(() => $"Found MSSQL read model '{readModelType.PrettyPrint()}' with ID '{readModelVersion}'");

return readModelVersion.HasValue
? ReadModelEnvelope<TReadModel>.With(id, readModel, readModelVersion.Value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ await _msSqlConnection.ExecuteAsync(
}
catch (SqlException sqlException) when (sqlException.Number == 2601)
{
// If we have a dublicate key exception, then the snapshot has already been created
// If we have a duplicate key exception, then the snapshot has already been created
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ await WriteAsync(
}
catch (ArgumentException e)
{
_log.Debug(e, $"Failed to publish serilized command '{name}' v{version} due to: {e.Message}");
_log.Debug(e, $"Failed to publish serialized command '{name}' v{version} due to: {e.Message}");
await WriteErrorAsync(e.Message, HttpStatusCode.BadRequest, context).ConfigureAwait(false);
}
catch (DomainError e)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void SetUp()
var url = Environment.GetEnvironmentVariable("RABBITMQ_URL");
if (string.IsNullOrEmpty(url))
{
Assert.Inconclusive("The environment variabel named 'RABBITMQ_URL' isn't set. Set it to e.g. 'amqp://localhost'");
Assert.Inconclusive("The environment variable named 'RABBITMQ_URL' isn't set. Set it to e.g. 'amqp://localhost'");
}

_uri = new Uri(url);
Expand Down
2 changes: 1 addition & 1 deletion Source/EventFlow.RabbitMQ.Tests/RabbitMqConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public IReadOnlyCollection<RabbitMqMessage> GetMessages(TimeSpan timeout, int co
{
if (stopwatch.Elapsed >= timeout)
{
throw new TimeoutException($"Timedout after {stopwatch.Elapsed.TotalSeconds:0.##} seconds");
throw new TimeoutException($"Timed out after {stopwatch.Elapsed.TotalSeconds:0.##} seconds");
}

BasicDeliverEventArgs basicDeliverEventArgs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ private Task<int> PublishAsync(
IReadOnlyCollection<RabbitMqMessage> messages)
{
_log.Verbose(
"Publishing {0} domain domain events to RabbitMQ host '{1}'",
"Publishing {0} domain events to RabbitMQ host '{1}'",
messages.Count,
_configuration.Uri.Host);

Expand Down
5 changes: 3 additions & 2 deletions Source/EventFlow.Sql/EventFlow.Sql.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Common.props" />
<PropertyGroup>
<TargetFrameworks>net451;netstandard1.6</TargetFrameworks>
<TargetFrameworks>net451;netstandard1.6;netstandard2.0</TargetFrameworks>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand All @@ -27,11 +27,12 @@
<PackageReference Include="Dapper" Version="1.50.2" />
<PackageReference Condition="'$(TargetFramework)' == 'net451'" Include="dbup" Version="3.3.5" />
<PackageReference Condition="'$(TargetFramework)' == 'netstandard1.6'" Include="System.ComponentModel.Annotations" Version="4.3.0" />
<PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="System.ComponentModel.Annotations" Version="4.4.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EventFlow\EventFlow.csproj" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Condition="'$(TargetFramework)' == 'net451'" Include="System.ComponentModel.DataAnnotations" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Source/EventFlow.Sql/ReadModels/SqlReadModelStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public override async Task<ReadModelEnvelope<TReadModel>> GetAsync(string id, Ca

var readModelVersion = GetVersion(readModel);

Log.Verbose(() => $"Foud SQL read model '{readModelType.PrettyPrint()}' with ID '{readModelVersion}'");
Log.Verbose(() => $"Found SQL read model '{readModelType.PrettyPrint()}' with ID '{readModelVersion}'");

return readModelVersion.HasValue
? ReadModelEnvelope<TReadModel>.With(id, readModel, readModelVersion.Value)
Expand Down
3 changes: 3 additions & 0 deletions Source/EventFlow.Tests/EventFlow.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
<PackageReference Include="Serilog" Version="2.6.0" />
<PackageReference Include="WindowsBase" Version="4.6.1055" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
</Project>
Loading

0 comments on commit dd8457f

Please sign in to comment.