Skip to content

Commit

Permalink
Merge pull request #97 from akkadotnet/dev
Browse files Browse the repository at this point in the history
v1.4.0-beta1 Release
  • Loading branch information
Aaronontheweb authored Oct 30, 2019
2 parents 349e9c7 + 5adbd1a commit dc881b8
Show file tree
Hide file tree
Showing 16 changed files with 219 additions and 210 deletions.
8 changes: 2 additions & 6 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
#### 1.3.14 October 04 2019 ####
You can see [the full set of changes for Akka.Persistence.MongoDb v1.3.14 here](https://github.com/akkadotnet/Akka.Persistence.MongoDB/milestone/2).

This PR fixes a number of problems stemming from implementations of Akka.Persistence.Query implementations that were incorrect.

**Note: we're working on [adding support for future versions of Akka.Persistence.MongoDB and you should read them here if you plan on continuing to use the plugin](https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/72).**
#### 1.4.0-beta1 October 30 2019 ####
Beta release of Akka.Persistence.MongoDB which implements the [new standardized Akka.Persistence serialization paradigm](https://github.com/akkadotnet/Akka.Persistence.MongoDB/issues/72) going forward. Has full backwards compatibility for reading events which were written in 1.3.[0-14] style serialization.
2 changes: 1 addition & 1 deletion build-system/windows-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ steps:
displayName: 'FAKE Build'
inputs:
filename: build.cmd
arguments: 'nuget nugetpublishurl=https://www.nuget.org/api/v2/package nugetkey=$(nugetKey)'
arguments: 'nuget nugetpublishurl=https://www.nuget.org/api/v2/package nugetkey=$(nugetKey) nugetprerelease=dev'

- task: GitHubRelease@0
displayName: 'GitHub release (create)'
Expand Down
5 changes: 3 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ let preReleaseVersionSuffix = "beta" + (if (not (buildNumber = "0")) then (build
let versionSuffix =
match (getBuildParam "nugetprerelease") with
| "dev" -> preReleaseVersionSuffix
| _ -> ""

| "" -> ""
| str -> str

let releaseNotes =
File.ReadLines "./RELEASE_NOTES.md"
|> ReleaseNotesHelper.parseReleaseNotes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<Import Project="..\common.props" />

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0</TargetFrameworks>
<!-- <TargetFrameworks>net461;netcoreapp2.0</TargetFrameworks> --> <!-- Mongo2Go fails on .NET 4.6.1 - can't find its own binaries. -->
<TargetFrameworks>netcoreapp2.1</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Akka.Persistence.MongoDb.Tests/Bug61FixSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@ class = ""Akka.Persistence.MongoDb.Query.MongoDbReadJournalProvider, Akka.Persis
return ConfigurationFactory.ParseString(specString);
}
}
}
}
32 changes: 0 additions & 32 deletions src/Akka.Persistence.MongoDb.Tests/MongoDbJournalSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,36 +41,4 @@ class = ""Akka.Persistence.MongoDb.Journal.MongoDbJournal, Akka.Persistence.Mong
return ConfigurationFactory.ParseString(specString);
}
}

[Collection("MongoDbSpec")]
public class MongoDbBinaryJournalSpec : JournalSpec, IClassFixture<DatabaseFixture>
{
protected override bool SupportsRejectingNonSerializableObjects { get; } = false;

public MongoDbBinaryJournalSpec(DatabaseFixture databaseFixture) : base(CreateSpecConfig(databaseFixture), "MongoDbJournalSpec")
{
Initialize();
}

private static Config CreateSpecConfig(DatabaseFixture databaseFixture)
{
var specString = @"
akka.test.single-expect-default = 3s
akka.persistence {
publish-plugin-commands = on
journal {
plugin = ""akka.persistence.journal.mongodb""
mongodb {
class = ""Akka.Persistence.MongoDb.Journal.MongoDbJournal, Akka.Persistence.MongoDb""
connection-string = """ + databaseFixture.ConnectionString + @"""
auto-initialize = on
collection = ""EventJournal""
stored-as = binary
}
}
}";

return ConfigurationFactory.ParseString(specString);
}
}
}
2 changes: 0 additions & 2 deletions src/Akka.Persistence.MongoDb.Tests/MongoDbSettingsSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public void Mongo_JournalSettings_must_have_default_values()
mongoPersistence.JournalSettings.AutoInitialize.Should().BeFalse();
mongoPersistence.JournalSettings.Collection.Should().Be("EventJournal");
mongoPersistence.JournalSettings.MetadataCollection.Should().Be("Metadata");
mongoPersistence.JournalSettings.StoredAs.Should().BeOfType<StoredAsType>();
}

[Fact]
Expand All @@ -33,7 +32,6 @@ public void Mongo_SnapshotStoreSettingsSettings_must_have_default_values()
mongoPersistence.SnapshotStoreSettings.ConnectionString.Should().Be(string.Empty);
mongoPersistence.SnapshotStoreSettings.AutoInitialize.Should().BeFalse();
mongoPersistence.SnapshotStoreSettings.Collection.Should().Be("SnapshotStore");
mongoPersistence.SnapshotStoreSettings.StoredAs.Should().BeOfType<StoredAsType>();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System.Collections.Generic;
using Akka.Configuration;
using Akka.Persistence.TCK.Serialization;
using Akka.Util.Internal;
using Xunit;
using Xunit.Abstractions;

namespace Akka.Persistence.MongoDb.Tests.Serialization
{
[Collection("MongoDbSpec")]
public class MongoDbJournalSerializationSpec : JournalSerializationSpec, IClassFixture<DatabaseFixture>
{
public static readonly AtomicCounter Counter = new AtomicCounter(0);
private readonly ITestOutputHelper _output;

public MongoDbJournalSerializationSpec(ITestOutputHelper output, DatabaseFixture databaseFixture)
: base(CreateSpecConfig(databaseFixture, Counter.GetAndIncrement()), nameof(MongoDbJournalSerializationSpec), output)
{
_output = output;
output.WriteLine(databaseFixture.ConnectionString + Counter.Current);
}

private static Config CreateSpecConfig(DatabaseFixture databaseFixture, int id)
{
var specString = @"
akka.test.single-expect-default = 3s
akka.persistence {
publish-plugin-commands = on
journal {
plugin = ""akka.persistence.journal.mongodb""
mongodb {
class = ""Akka.Persistence.MongoDb.Journal.MongoDbJournal, Akka.Persistence.MongoDb""
connection-string = """ + databaseFixture.ConnectionString + @"""
auto-initialize = on
collection = ""EventJournal""
stored-as = object
}
}
}";

return ConfigurationFactory.ParseString(specString);
}


[Fact(Skip = "Waiting on better error messages")]
public override void Journal_should_serialize_Persistent_with_EventAdapter_manifest()
{
base.Journal_should_serialize_Persistent_with_EventAdapter_manifest();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using Akka.Configuration;
using Akka.Persistence.TCK.Serialization;
using Akka.Util.Internal;
using Xunit;
using Xunit.Abstractions;

namespace Akka.Persistence.MongoDb.Tests.Serialization
{
[Collection("MongoDbSpec")]
public class MongoDbSnapshotStoreSerializationSpec : SnapshotStoreSerializationSpec, IClassFixture<DatabaseFixture>
{
public static readonly AtomicCounter Counter = new AtomicCounter(0);
private readonly ITestOutputHelper _output;

public MongoDbSnapshotStoreSerializationSpec(ITestOutputHelper output, DatabaseFixture databaseFixture)
: base(CreateSpecConfig(databaseFixture, Counter.GetAndIncrement()), nameof(MongoDbSnapshotStoreSerializationSpec), output)
{
_output = output;
output.WriteLine(databaseFixture.ConnectionString + Counter.Current);
}

private static Config CreateSpecConfig(DatabaseFixture databaseFixture, int id)
{
var specString = @"
akka.test.single-expect-default = 3s
akka.persistence {
publish-plugin-commands = on
snapshot-store {
plugin = ""akka.persistence.snapshot-store.mongodb""
mongodb {
class = ""Akka.Persistence.MongoDb.Snapshot.MongoDbSnapshotStore, Akka.Persistence.MongoDb""
connection-string = """ + databaseFixture.ConnectionString + id + @"""
auto-initialize = on
collection = ""SnapshotStore""
}
}
}";

return ConfigurationFactory.ParseString(specString);
}
}
}
4 changes: 2 additions & 2 deletions src/Akka.Persistence.MongoDb/Akka.Persistence.MongoDb.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<Import Project="..\common.props" />

<PropertyGroup>
<TargetFrameworks>net45;netstandard1.6</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="reference.conf" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Akka.Persistence.Query" Version="$(AkkaVersion)" />
<PackageReference Include="MongoDB.Driver" Version="2.7.0" />
<PackageReference Include="MongoDB.Driver" Version="2.9.1" />
</ItemGroup>
</Project>
Loading

0 comments on commit dc881b8

Please sign in to comment.