Skip to content

Commit

Permalink
Made some hygenic refactors for 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lutando committed Aug 18, 2019
1 parent 3abef5e commit 0a7c4d8
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 39 deletions.
7 changes: 7 additions & 0 deletions Akkatecture.sln
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{F1C674D3
build\azure-pipelines-release-ci-cd.yaml = build\azure-pipelines-release-ci-cd.yaml
build\azure-pipelines-static-ci.yaml = build\azure-pipelines-static-ci.yaml
build\README.md = build\README.md
build\paket.dependencies = build\paket.dependencies
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akkatecture.TestFixture", "src\Akkatecture.TestFixture\Akkatecture.TestFixture.csproj", "{BED56747-BBF3-45F5-9EB6-C24808AA09EC}"
Expand All @@ -69,6 +70,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akkatecture.NodeTestRunner"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Akkatecture.Tests.MultiNode", "test\Akkatecture.Tests.MultiNode\Akkatecture.Tests.MultiNode.csproj", "{C7E74510-5D43-4D63-B3B1-13333DC1700E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{19634F28-9CC5-4B76-83B6-5AA41B3CA78E}"
ProjectSection(SolutionItems) = preProject
build\templates\fake-template.yaml = build\templates\fake-template.yaml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -155,6 +161,7 @@ Global
{081C0036-15A6-48FE-A70E-CCC1CCA3E495} = {6F5F4612-D2DD-47E9-ADA9-18450D44E903}
{216BF8B4-3A50-4EF3-BCA5-4BDA738B0B72} = {6F5F4612-D2DD-47E9-ADA9-18450D44E903}
{C7E74510-5D43-4D63-B3B1-13333DC1700E} = {86C56730-ABA0-411C-898C-5966EC483594}
{19634F28-9CC5-4B76-83B6-5AA41B3CA78E} = {F1C674D3-CC23-4708-9903-7B3CD3565899}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F5A40806-ED71-4286-A37C-BE0364FA29A6}
Expand Down
32 changes: 19 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,42 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.5.0] - 2019-08-18

### Added
- IExecute interface as an alternative way to add command handlers to the aggregate.
- JobScheduler and JobRunner actor types for scheduling jobs.
- `IExecute` interface as an alternative way to add command handlers to the aggregate.
- `JobScheduler` and `JobRunner` actor types for scheduling persistent jobs.
- receive timeouts for aggregate roots.

### Changed
- AggregateRoot and AggregateSaga logging members are using Eventsourced.Log member.
- `AggregateRoot` and `AggregateSaga` logging members are using `Eventsourced.Log` member.

## [0.4.6] - 2019-07-27

### Added
- xUnit2 TestOutputHelper logging
- Akkatecture.Clustering Multi Node Tests
- FAKE build system
- Delete Previous Snapshot
- CHANGELOG.
- CODE_OF_CONDUCT.
- xUnit2 TestOutputHelper logging.
- Akkatecture.Clustering Multi Node Tests.
- FAKE build system.
- Delete Previous Snapshot .
- CHANGELOG.md.
- CODE_OF_CONDUCT.md.
- THIRD-PARTY-NOTICES.txt.

## [0.4.5] - 2019-05-15

### Changed
- Logging to use string format + params rather than interpolation.

### Fixed
- CommittedSnapshot name from ComittedSnapshot.
- `CommittedSnapshot` name from `ComittedSnapshot`.
- AggregateRoot.EmitAll(...) to allow for more generic cases to be handled.

## [0.4.4] - 2019-05-09

### Added
- DomainEventMapper that maps from journal events to.
- AggregateTestFixture support for asserting aggregate root replies.
- `DomainEventMapper` that maps from journal events to.
- `AggregateTestFixture` support for asserting aggregate root replies.

### Changed
- Access levels for aggregate root properties to be more private.
Expand Down Expand Up @@ -163,7 +167,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- MIT License.
- Project logo.

[Unreleased]: https://github.com/Lutando/Akkatecture/compare/0.4.5...HEAD
[Unreleased]: https://github.com/Lutando/Akkatecture/compare/0.5.0...HEAD
[0.5.0]: https://github.com/Lutando/Akkatecture/compare/0.4.6...0.5.0
[0.4.6]: https://github.com/Lutando/Akkatecture/compare/0.4.5...0.4.6
[0.4.5]: https://github.com/Lutando/Akkatecture/compare/0.4.4...0.4.5
[0.4.4]: https://github.com/Lutando/Akkatecture/compare/0.4.3...0.4.4
[0.4.3]: https://github.com/Lutando/Akkatecture/compare/0.4.2...0.4.3
Expand Down
10 changes: 8 additions & 2 deletions build/azure-pipelines-development-ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ trigger:
branches:
include:
- dev
paths:
exclude:
- 'README.md'
- 'CODE_OF_CONDUCT.md'
- 'CHANGELOG.md'
- 'THIRD-PARTY-NOTICES.txt'

pr: none

variables:
branch: "dev"
majorVersion: '0'
minorVersion: '4'
patchVersion: '6'
minorVersion: '5'
patchVersion: '0'
feedVersion: 'alpha'
dayOfYear: $(DayOfYear)
revCounter: $(BuildRevision)
Expand Down
10 changes: 8 additions & 2 deletions build/azure-pipelines-master-ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ trigger:
branches:
include:
- master
paths:
exclude:
- 'README.md'
- 'CODE_OF_CONDUCT.md'
- 'CHANGELOG.md'
- 'THIRD-PARTY-NOTICES.txt'

pr: none

variables:
branch: "master"
majorVersion: '0'
minorVersion: '4'
patchVersion: '6'
minorVersion: '5'
patchVersion: '0'
feedVersion: 'prerelease'
dayOfYear: $(DayOfYear)
revCounter: $(BuildRevision)
Expand Down
4 changes: 2 additions & 2 deletions build/azure-pipelines-release-ci-cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ pr: none
variables:
branch: "master"
majorVersion: '0'
minorVersion: '4'
patchVersion: '6'
minorVersion: '5'
patchVersion: '0'
feedVersion: 'nuget'

name: ${{ format('{0}.{1}.{2}', variables.majorVersion, variables.minorVersion, variables.patchVersion) }}
Expand Down
10 changes: 8 additions & 2 deletions build/azure-pipelines-static-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ pr:
branches:
include:
- '*'
paths:
exclude:
- 'README.md'
- 'CODE_OF_CONDUCT.md'
- 'CHANGELOG.md'
- 'THIRD-PARTY-NOTICES.txt'

variables:
branch: "master"
majorVersion: '0'
minorVersion: '4'
patchVersion: '6'
minorVersion: '5'
patchVersion: '0'
feedVersion: 'pr'
dayOfYear: $(DayOfYear)
revCounter: $(BuildRevision)
Expand Down
3 changes: 2 additions & 1 deletion src/Akkatecture/Aggregates/AggregateManagerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ namespace Akkatecture.Aggregates
{
public class AggregateManagerSettings
{
private static readonly string _section = "akkatecture.aggregate-manager";
public readonly bool HandleDeadLetters;
public readonly bool AutoDispatchOnReceive;

public AggregateManagerSettings(Config config)
{
var aggregateManagerConfig = config.WithFallback(AkkatectureDefaultSettings.DefaultConfig());
aggregateManagerConfig = aggregateManagerConfig.GetConfig("akkatecture.aggregate-manager");
aggregateManagerConfig = aggregateManagerConfig.GetConfig(_section);

HandleDeadLetters = aggregateManagerConfig.GetBoolean("handle-deadletters");
AutoDispatchOnReceive = aggregateManagerConfig.GetBoolean("auto-dispatch-on-receive");
Expand Down
4 changes: 2 additions & 2 deletions src/Akkatecture/Aggregates/AggregateRootSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public class AggregateRootSettings

public AggregateRootSettings(Config config)
{
var aggregateRootConfig = config.GetConfig(_section);
aggregateRootConfig = aggregateRootConfig ?? AkkatectureDefaultSettings.DefaultConfig().GetConfig(_section);
var aggregateRootConfig = config.WithFallback(AkkatectureDefaultSettings.DefaultConfig());
aggregateRootConfig = aggregateRootConfig.GetConfig(_section);

UseDefaultEventRecover = aggregateRootConfig.GetBoolean("use-default-event-recover");
UseDefaultSnapshotRecover = aggregateRootConfig.GetBoolean("use-default-snapshot-recover");
Expand Down
1 change: 0 additions & 1 deletion src/Akkatecture/Jobs/Commands/Schedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using Akka.Actor;

namespace Akkatecture.Jobs.Commands
{
Expand Down
10 changes: 0 additions & 10 deletions src/Akkatecture/Jobs/JobSchedulerFactory.cs

This file was deleted.

3 changes: 2 additions & 1 deletion src/Akkatecture/Jobs/JobSchedulerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ namespace Akkatecture.Jobs
{
public class JobSchedulerSettings
{
private static string _section = "akkatecture.job-scheduler";
public string JournalPluginId { get; }
public string SnapshotPluginId { get; }
public TimeSpan TickInterval { get; }

public JobSchedulerSettings(Config config)
{
var schedulerConfig = config.WithFallback(AkkatectureDefaultSettings.DefaultConfig());
schedulerConfig = schedulerConfig.GetConfig(_section);

schedulerConfig = schedulerConfig.GetConfig("akkatecture.job-scheduler");
JournalPluginId = schedulerConfig.GetString("journal-plugin-id");
SnapshotPluginId = schedulerConfig.GetString("snapshot-plugin-id");
TickInterval = schedulerConfig.GetTimeSpan("tick-interval");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ namespace Akkatecture.Sagas.AggregateSaga
{
public class AggregateSagaManagerSettings
{
private static readonly string _section = "akkatecture.aggregate-saga-manager";
public readonly bool AutoSubscribe;
public readonly bool AutoSpawnOnReceive;
public AggregateSagaManagerSettings(Config config)
{
var aggregateSagaManagerConfig = config.WithFallback(AkkatectureDefaultSettings.DefaultConfig());
aggregateSagaManagerConfig = aggregateSagaManagerConfig.GetConfig("akkatecture.aggregate-saga-manager");
aggregateSagaManagerConfig = aggregateSagaManagerConfig.GetConfig(_section);

AutoSpawnOnReceive = aggregateSagaManagerConfig.GetBoolean("auto-spawn-on-receive");
AutoSubscribe = aggregateSagaManagerConfig.GetBoolean("auto-subscribe");
Expand Down
3 changes: 2 additions & 1 deletion src/Akkatecture/Sagas/AggregateSaga/AggregateSagaSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ namespace Akkatecture.Sagas.AggregateSaga
{
public class AggregateSagaSettings
{
private static string _section = "akkatecture.aggregate-saga";
public readonly bool AutoReceive;
public readonly bool UseDefaultEventRecover;
public readonly bool UseDefaultSnapshotRecover;
public AggregateSagaSettings(Config config)
{
var aggregateSagaConfig = config.WithFallback(AkkatectureDefaultSettings.DefaultConfig());
aggregateSagaConfig = aggregateSagaConfig.GetConfig("akkatecture.aggregate-saga");
aggregateSagaConfig = aggregateSagaConfig.GetConfig(_section);

AutoReceive = aggregateSagaConfig.GetBoolean("auto-receive");
UseDefaultEventRecover = aggregateSagaConfig.GetBoolean("use-default-event-recover");
Expand Down
3 changes: 2 additions & 1 deletion src/Akkatecture/Subscribers/DomainEventSubscriberSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ namespace Akkatecture.Subscribers
{
public class DomainEventSubscriberSettings
{
private static readonly string _section = "akkatecture.domain-event-subscriber";
public readonly bool AutoSubscribe;
public readonly bool AutoReceive;

public DomainEventSubscriberSettings(Config config)
{
var domainEventSubscriberConfig = config.WithFallback(AkkatectureDefaultSettings.DefaultConfig());
domainEventSubscriberConfig = domainEventSubscriberConfig.GetConfig("akkatecture.domain-event-subscriber");
domainEventSubscriberConfig = domainEventSubscriberConfig.GetConfig(_section);

AutoSubscribe = domainEventSubscriberConfig.GetBoolean("auto-subscribe");
AutoReceive = domainEventSubscriberConfig.GetBoolean("auto-receive");
Expand Down

0 comments on commit 0a7c4d8

Please sign in to comment.