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

Update Akka to 1.4.4 #42

Merged
merged 21 commits into from
Apr 10, 2020
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
33 changes: 19 additions & 14 deletions Akka.Persistence.Redis.sln
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.6
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Persistence.Redis", "src\Akka.Persistence.Redis\Akka.Persistence.Redis.csproj", "{516115B9-891F-4D5D-AE08-0F128C2FD1C0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akka.Persistence.Redis.Tests", "src\Akka.Persistence.Redis.Tests\Akka.Persistence.Redis.Tests.csproj", "{754408BF-773C-46C9-9BC6-8820D77E95CA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution items", "Solution items", "{EB67BFB9-7589-469F-B0E0-6DDFC0032E67}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
build.cmd = build.cmd
build.fsx = build.fsx
build.ps1 = build.ps1
build.sh = build.sh
src\common.props = src\common.props
README.md = README.md
RELEASE_NOTES.md = RELEASE_NOTES.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "examples", "examples", "{1F453772-CA5E-4F41-A50E-75F3F59F72D6}"
Expand All @@ -23,20 +21,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomSerialization.MsgPack
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CustomSerialization.Protobuf", "src\examples\CustomSerialization.Protobuf\CustomSerialization.Protobuf.csproj", "{90084FC1-C04B-46BF-AA37-2ACD71E1AD4F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Persistence.Redis", "src\Akka.Persistence.Redis\Akka.Persistence.Redis.csproj", "{32493D11-8BE0-4F62-9707-1B48BC427667}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Akka.Persistence.Redis.Tests", "src\Akka.Persistence.Redis.Tests\Akka.Persistence.Redis.Tests.csproj", "{59871C63-8D5D-4221-B504-203BB3500DBF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{516115B9-891F-4D5D-AE08-0F128C2FD1C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{516115B9-891F-4D5D-AE08-0F128C2FD1C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{516115B9-891F-4D5D-AE08-0F128C2FD1C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{516115B9-891F-4D5D-AE08-0F128C2FD1C0}.Release|Any CPU.Build.0 = Release|Any CPU
{754408BF-773C-46C9-9BC6-8820D77E95CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{754408BF-773C-46C9-9BC6-8820D77E95CA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{754408BF-773C-46C9-9BC6-8820D77E95CA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{754408BF-773C-46C9-9BC6-8820D77E95CA}.Release|Any CPU.Build.0 = Release|Any CPU
{6EEB8234-FAB9-4645-86EF-297240B3798A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6EEB8234-FAB9-4645-86EF-297240B3798A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6EEB8234-FAB9-4645-86EF-297240B3798A}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -45,6 +39,14 @@ Global
{90084FC1-C04B-46BF-AA37-2ACD71E1AD4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90084FC1-C04B-46BF-AA37-2ACD71E1AD4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90084FC1-C04B-46BF-AA37-2ACD71E1AD4F}.Release|Any CPU.Build.0 = Release|Any CPU
{32493D11-8BE0-4F62-9707-1B48BC427667}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32493D11-8BE0-4F62-9707-1B48BC427667}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32493D11-8BE0-4F62-9707-1B48BC427667}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32493D11-8BE0-4F62-9707-1B48BC427667}.Release|Any CPU.Build.0 = Release|Any CPU
{59871C63-8D5D-4221-B504-203BB3500DBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59871C63-8D5D-4221-B504-203BB3500DBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59871C63-8D5D-4221-B504-203BB3500DBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59871C63-8D5D-4221-B504-203BB3500DBF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -53,4 +55,7 @@ Global
{6EEB8234-FAB9-4645-86EF-297240B3798A} = {1F453772-CA5E-4F41-A50E-75F3F59F72D6}
{90084FC1-C04B-46BF-AA37-2ACD71E1AD4F} = {1F453772-CA5E-4F41-A50E-75F3F59F72D6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6ADAF1F3-8019-4D3E-A8B0-2BF7CF7B439B}
EndGlobalSection
EndGlobal
9 changes: 9 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can get rid of this - don't need it anymore.

<add key="akka-nightly" value="https://www.myget.org/F/akkadotnet/api/v3/index.json" />
<add key="netcorenightly" value="https://www.myget.org/F/akkadotnet/api/v3/index.json" />
</packageSources>
</configuration>
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#### 1.0.0-beta2 March 2nd 2020 ####
- Update Akka to version 1.4.1-RC1
- Update build system

#### 1.0.0-beta1 Sep 10 2017 ####
- Support for .NET Standard 1.6
- Support for Persistence Query
Expand Down
2 changes: 0 additions & 2 deletions build-system/azure-pipeline.template.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
parameters:
name: ''
displayName: ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roll back these changes - the current build files are fine and are in-use.

vmImage: ''
scriptFileName: ''
scriptArgs: 'all'
timeoutInMinutes: 120

jobs:
- job: ${{ parameters.name }}
displayName: ${{ parameters.displayName }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}
pool:
vmImage: ${{ parameters.vmImage }}
Expand Down
22 changes: 22 additions & 0 deletions build-system/linux-pr-validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Pull request validation for Linux against the `dev` and `master` branches
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roll back these changes - the current build files are fine and are in-use.

# See https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema for reference
trigger:
branches:
include:
- dev
- master

name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

pr:
autoCancel: true # indicates whether additional pushes to a PR should cancel in-progress runs for the same PR. Defaults to true
branches:
include: [ dev, master ] # branch names which will trigger a build

jobs:
- template: azure-pipeline.template.yaml
parameters:
name: Ubuntu
vmImage: 'ubuntu-16.04'
scriptFileName: ./build.sh
scriptArgs: all
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,9 @@ pr:
name: $(Year:yyyy).$(Month).$(DayOfMonth)$(Rev:.r)

jobs:
- template: azure-pipeline.template.yaml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roll back these changes - the current build files are fine and are in-use.

parameters:
name: 'windows_pr'
displayName: 'Windows PR Validation'
vmImage: 'vs2017-win2016'
scriptFileName: build.cmd
scriptArgs: all
- template: azure-pipeline.template.yaml
parameters:
name: 'linux_pr'
displayName: 'Linux PR Validation'
vmImage: 'ubuntu-16.04'
scriptFileName: ./build.sh
scriptArgs: RunTests
- template: azure-pipeline.template.yaml
parameters:
name: Windows
vmImage: 'vs2017-win2016'
scriptFileName: build.cmd
scriptArgs: all
11 changes: 6 additions & 5 deletions build-system/windows-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@ trigger:
include:
- refs/tags/*

pr: none

variables:
- group: signingSecrets #create this group with SECRET variables `signingUsername` and `signingPassword`
- group: nugetKeys #create this group with SECRET variables `nugetKey`
- name: githubConnectionName
value: yourConnection #replace this
value: AkkaDotNet_Releases
- name: projectName
value: yourProjectName #replace this
value: Akka.Persistence.SqlServer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to change this to Akka.Persistence.Redis

- name: githubRepositoryName
value: yourOrganization/yourRepo #replace this

value: akkadotnet/Akka.Persistence.SqlServer
steps:
- task: BatchScript@1
displayName: 'FAKE Build'
inputs:
filename: build.cmd
arguments: 'All SignClientUser=$(signingUsername) SignClientSecret=$(signingPassword) nugetpublishurl=https://www.nuget.org/api/v2/package nugetkey=$(nugetKey)'
arguments: 'nuget nugetpublishurl=https://www.nuget.org/api/v2/package nugetkey=$(nugetKey)'

- task: GitHubRelease@0
displayName: 'GitHub release (create)'
Expand Down
8 changes: 4 additions & 4 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ open Fake.DotNetCli
open Fake.DocFxHelper

// Information about the project for Nuget and Assembly info files
let product = "Akka.Persistence.MongoDB"
let product = "Akka.Persistence.Redis"
let configuration = "Release"

// Metadata used when signing packages and DLLs
let signingName = "Akka.Persistence.MongoDB"
let signingDescription = "Akka.Persistence support for SQL Server"
let signingUrl = "https://github.com/akkadotnet/Akka.Persistence.MongoDB"
let signingName = "Akka.Persistence.Redis"
let signingDescription = "Akka.Persistence support for Redis"
let signingUrl = "https://github.com/akkadotnet/Akka.Persistence.Redis"

// Read release notes and version
let solutionFile = FindFirstMatchingFile "*.sln" __SOURCE_DIRECTORY__ // dynamically look up the solution
Expand Down
13 changes: 13 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ $NugetVersion = "4.1.0";
$NugetUrl = "https://dist.nuget.org/win-x86-commandline/v$NugetVersion/nuget.exe"
$ProtobufVersion = "3.4.0"
$DocfxVersion = "2.49.0"
$RedisVersion = "3.0.503"

# Make sure tools folder exists
$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent
Expand Down Expand Up @@ -115,6 +116,18 @@ if (!(Test-Path $FakeExePath)) {
}
}

###########################################################################
# INSTALL REDIS
###########################################################################
$RedisExePath = Join-Path $ToolPath "redis-64/tools/redis-server.exe"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't need this if we're using Docker.NET

if (!(Test-Path $RedisExePath)) {
Write-Host "Installing Redis-64..."
Invoke-Expression "&`"$NugetPath`" install redis-64 -ExcludeVersion -Version $RedisVersion -OutputDirectory `"$ToolPath`"" | Out-Null;
if ($LASTEXITCODE -ne 0) {
Throw "An error occured while restoring Redis-64 from NuGet."
}
}

###########################################################################
# Docfx
###########################################################################
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\common.props" />

<PropertyGroup>
<AssemblyTitle>Akka.Persistence.Redis.Tests</AssemblyTitle>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(OS)' == 'Windows_NT'">
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
</PropertyGroup>
<TargetFrameworks>$(NetFrameworkTestVersion);$(NetCoreTestVersion)</TargetFrameworks>
</PropertyGroup>

<!-- disable .NET Framework (Mono) on Linux-->
<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>$(NetCoreTestVersion)</TargetFrameworks>
</PropertyGroup>
<!-- disable .NET Framework (Mono) on Linux-->
<PropertyGroup Condition="'$(OS)' != 'Windows_NT'">
<TargetFrameworks>$(NetCoreTestVersion)</TargetFrameworks>
</PropertyGroup>


<ItemGroup>
<ProjectReference Include="..\Akka.Persistence.Redis\Akka.Persistence.Redis.csproj" />
</ItemGroup>


<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(TestSdkVersion)" />
<!-- Needed by Redis to run -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.7.0" />
<PackageReference Include="Docker.DotNet" Version="$(DockerVersion)" />
<PackageReference Include="xunit" Version="$(XunitVersion)" />
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitVersion)" />
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="4.19.4" />
<PackageReference Include="Akka.TestKit" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Persistence.TCK" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.TestKit.Xunit2" Version="$(AkkaVersion)" />
<PackageReference Include="Akka.Streams.TestKit" Version="$(AkkaVersion)" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
</Project>
9 changes: 8 additions & 1 deletion src/Akka.Persistence.Redis.Tests/DbUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@ namespace Akka.Persistence.Redis.Tests
{
public static class DbUtils
{
public static string ConnectionString { get; private set; }

public static void Initialize(RedisFixture fixture)
{
ConnectionString = fixture.ConnectionString;
}

public static void Clean(int database)
{
var connectionString = "localhost,allowAdmin=true";
var connectionString = $"{ConnectionString},allowAdmin=true";

var redisConnection = ConnectionMultiplexer.Connect(connectionString);
var server = redisConnection.GetServer(redisConnection.GetEndPoints().First());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,25 @@ public class RedisCurrentEventsByPersistenceIdSpec : CurrentEventsByPersistenceI
{
public const int Database = 1;

public static Config Config(int id) => ConfigurationFactory.ParseString($@"
public static Config Config(RedisFixture fixture, int id)
{
DbUtils.Initialize(fixture);

return ConfigurationFactory.ParseString($@"
akka.loglevel = INFO
akka.persistence.journal.plugin = ""akka.persistence.journal.redis""
akka.persistence.journal.redis {{
class = ""Akka.Persistence.Redis.Journal.RedisJournal, Akka.Persistence.Redis""
plugin-dispatcher = ""akka.actor.default-dispatcher""
configuration-string = ""127.0.0.1:6379""
configuration-string = ""{fixture.ConnectionString}""
database = {id}
}}
akka.test.single-expect-default = 3s")
.WithFallback(RedisReadJournal.DefaultConfiguration());
.WithFallback(RedisPersistence.DefaultConfig());
}

public RedisCurrentEventsByPersistenceIdSpec(ITestOutputHelper output)
: base(Config(Database), nameof(RedisCurrentEventsByPersistenceIdSpec), output)
public RedisCurrentEventsByPersistenceIdSpec(ITestOutputHelper output, RedisFixture fixture)
: base(Config(fixture, Database), nameof(RedisCurrentEventsByPersistenceIdSpec), output)
{
ReadJournal = Sys.ReadJournalFor<RedisReadJournal>(RedisReadJournal.Identifier);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ public sealed class RedisCurrentEventsByTagSpec : CurrentEventsByTagSpec
{
public const int Database = 1;

public static Config Config(int id) => ConfigurationFactory.ParseString($@"
public static Config Config(RedisFixture fixture, int id)
{
DbUtils.Initialize(fixture);

return ConfigurationFactory.ParseString($@"
akka.loglevel = INFO
akka.persistence.journal.plugin = ""akka.persistence.journal.redis""
akka.persistence.journal.redis {{
Expand All @@ -30,14 +34,15 @@ public static Config Config(int id) => ConfigurationFactory.ParseString($@"
}}
class = ""Akka.Persistence.Redis.Journal.RedisJournal, Akka.Persistence.Redis""
plugin-dispatcher = ""akka.actor.default-dispatcher""
configuration-string = ""127.0.0.1:6379""
configuration-string = ""{fixture.ConnectionString}""
database = {id}
key-prefix = ""sbtech:""
}}
akka.test.single-expect-default = 3s")
.WithFallback(RedisReadJournal.DefaultConfiguration());
.WithFallback(RedisPersistence.DefaultConfig());
}

public RedisCurrentEventsByTagSpec(ITestOutputHelper output) : base(Config(Database), nameof(RedisCurrentEventsByTagSpec), output)
public RedisCurrentEventsByTagSpec(ITestOutputHelper output, RedisFixture fixture) : base(Config(fixture, Database), nameof(RedisCurrentEventsByTagSpec), output)
{
ReadJournal = Sys.ReadJournalFor<RedisReadJournal>(RedisReadJournal.Identifier);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,24 @@ public sealed class RedisCurrentPersistenceIdsSpec : CurrentPersistenceIdsSpec
{
public const int Database = 1;

public static Config Config(int id) => ConfigurationFactory.ParseString($@"
public static Config Config(RedisFixture fixture, int id)
{
DbUtils.Initialize(fixture);

return ConfigurationFactory.ParseString($@"
akka.loglevel = INFO
akka.persistence.journal.plugin = ""akka.persistence.journal.redis""
akka.persistence.journal.redis {{
class = ""Akka.Persistence.Redis.Journal.RedisJournal, Akka.Persistence.Redis""
plugin-dispatcher = ""akka.actor.default-dispatcher""
configuration-string = ""127.0.0.1:6379""
configuration-string = ""{fixture.ConnectionString}""
database = {id}
}}
akka.test.single-expect-default = 3s")
.WithFallback(RedisReadJournal.DefaultConfiguration());
.WithFallback(RedisPersistence.DefaultConfig());
}

public RedisCurrentPersistenceIdsSpec(ITestOutputHelper output) : base(Config(Database), nameof(RedisCurrentPersistenceIdsSpec), output)
public RedisCurrentPersistenceIdsSpec(ITestOutputHelper output, RedisFixture fixture) : base(Config(fixture, Database), nameof(RedisCurrentPersistenceIdsSpec), output)
{
ReadJournal = Sys.ReadJournalFor<RedisReadJournal>(RedisReadJournal.Identifier);
}
Expand Down
Loading