Skip to content

Commit

Permalink
Target Propulsion 3.0.0-rc.2 (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink authored Jan 20, 2023
1 parent 71c0148 commit 64b9a51
Show file tree
Hide file tree
Showing 25 changed files with 45 additions and 67 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ The `Unreleased` section name is replaced by the expected version of next releas

### Added
### Changed

- Target `Propulsion` v `3.0.0-rc.2` [#129](https:/jet/dotnet-templates/pull/129)

### Removed
### Fixed

Expand Down
2 changes: 1 addition & 1 deletion equinox-shipping/Domain.Tests/Domain.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.2.0" />

<PackageReference Include="FsCheck.Xunit" Version="3.0.0-beta2" />
<PackageReference Include="Propulsion.MemoryStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.MemoryStore" Version="3.0.0-rc.2" />
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
</ItemGroup>
Expand Down
2 changes: 0 additions & 2 deletions equinox-shipping/Domain/Domain.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<TargetFramework>net6.0</TargetFramework>
<WarningLevel>5</WarningLevel>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- TODO remove-->
<DisableImplicitFSharpCoreReference>true</DisableImplicitFSharpCoreReference>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<!-- jsii Roslyn analyzers (un-comment to obtain compile-time checks for missing required props-->
<!-- <PackageReference Include="Amazon.Jsii.Analyzers" Version="*" PrivateAssets="all" />-->

<PackageReference Include="Propulsion.DynamoStore.Constructs" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.DynamoStore.Constructs" Version="3.0.0-rc.2" />
</ItemGroup>

</Project>
17 changes: 0 additions & 17 deletions equinox-shipping/Watchdog.Lambda/Args.fs

This file was deleted.

3 changes: 1 addition & 2 deletions equinox-shipping/Watchdog.Lambda/Watchdog.Lambda.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" />
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.3.0" />
<PackageReference Include="Propulsion.DynamoStore.Lambda" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.DynamoStore.Lambda" Version="3.0.0-rc.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Watchdog\Watchdog.fsproj" />
</ItemGroup>
<ItemGroup>
<Compile Include="Args.fs" />
<Compile Include="Function.fs" />
</ItemGroup>
</Project>
8 changes: 4 additions & 4 deletions equinox-shipping/Watchdog/Watchdog.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

<ItemGroup>
<PackageReference Include="Argu" Version="6.1.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.DynamoStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.EventStoreDb" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.MemoryStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.DynamoStore" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.EventStoreDb" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.MemoryStore" Version="3.0.0-rc.2" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
</ItemGroup>

Expand Down
4 changes: 2 additions & 2 deletions feed-consumer/FeedConsumer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<PackageReference Include="Equinox.CosmosStore" Version="4.0.0-rc.7" />
<PackageReference Include="Equinox.CosmosStore.Prometheus" Version="4.0.0-rc.7" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.0-rc.9" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.Feed" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.Feed" Version="3.0.0-rc.2" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
</ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion feed-source/Domain/TicketsIngester.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
/// deterministic in nature
module FeedSourceTemplate.Domain.TicketsIngester

open System.Threading
open Equinox.Core
open FSharp.UMX

Expand Down
3 changes: 0 additions & 3 deletions feed-source/FeedApi/Controllers/TicketsController.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ open Microsoft.AspNetCore.Mvc

open FeedSourceTemplate.Domain

// TODO if you want to use Options etc in your Dto types here, you need to either apply https:/jet/FsCodec/#aspnet-core-with-newtonsoftjson
// or target to STJ version >= 5 to have the default response rendering apply the correct conversions

type TicketsTranchesDto = { activeEpochs : TrancheReferenceDto[] }
and TrancheReferenceDto = { fc : FcId; epochId : TicketsEpochId }

Expand Down
4 changes: 2 additions & 2 deletions periodic-ingester/PeriodicIngester.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<PackageReference Include="Equinox.CosmosStore.Prometheus" Version="4.0.0-rc.7" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.0-rc.9" />
<PackageReference Include="prometheus-net.AspNetCore" Version="3.6.0" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.Feed" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.Feed" Version="3.0.0-rc.2" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion propulsion-archiver/Archiver.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="Argu" Version="6.1.1" />
<PackageReference Include="Equinox.CosmosStore.Prometheus" Version="4.0.0-rc.7" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.2" />
<PackageReference Include="prometheus-net.AspNetCore" Version="3.6.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
Expand Down
1 change: 1 addition & 0 deletions propulsion-archiver/Handler.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module ArchiverTemplate.Handler
type Stats(log, statsInterval, stateInterval) =
inherit Propulsion.Streams.Sync.Stats<unit>(log, statsInterval, stateInterval)

override _.HandleOk(()) = ()
override _.HandleExn(log, exn) =
log.Information(exn, "Unhandled")

Expand Down
2 changes: 1 addition & 1 deletion propulsion-consumer/Consumer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<ItemGroup>
<PackageReference Include="Argu" Version="6.1.1" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.0-rc.9" />
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.2" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion propulsion-cosmos-reactor/Reactor.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<PackageReference Include="Equinox.CosmosStore.Prometheus" Version="4.0.0-rc.7" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.0-rc.9" />
<PackageReference Include="prometheus-net.AspNetCore" Version="3.6.0" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.2" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions propulsion-dynamostore-cdk/DynamoStore.Cdk.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<!-- jsii Roslyn analyzers (un-comment to obtain compile-time checks for missing required props-->
<!-- <PackageReference Include="Amazon.Jsii.Analyzers" Version="*" PrivateAssets="all" />-->

<PackageReference Include="Propulsion.DynamoStore.Indexer" Version="3.0.0-rc.1" PrivateAssets="all" />
<PackageReference Include="Propulsion.DynamoStore.Notifier" Version="3.0.0-rc.1" PrivateAssets="all" />
<PackageReference Include="Propulsion.DynamoStore.Constructs" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.DynamoStore.Indexer" Version="3.0.0-rc.2" PrivateAssets="all" />
<PackageReference Include="Propulsion.DynamoStore.Notifier" Version="3.0.0-rc.2" PrivateAssets="all" />
<PackageReference Include="Propulsion.DynamoStore.Constructs" Version="3.0.0-rc.2" />
</ItemGroup>

<!-- The Propulsion.DynamoStore.Indexer NuGet package includes the publish folder as content under 'tools/pub' -->
Expand Down
7 changes: 4 additions & 3 deletions propulsion-projector/Handler.fs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module ProjectorTemplate.Handler

open Propulsion.Internal
//#if cosmos
#if parallelOnly
// Here we pass the items directly through to the handler without parsing them
Expand All @@ -26,8 +27,8 @@ type ProductionStats(log, statsInterval, stateInterval) =
inherit Propulsion.Streams.Sync.Stats<unit>(log, statsInterval, stateInterval)

// TODO consider whether it's warranted to log every time a message is produced given the stats will periodically emit counts
// override _.HandleOk(()) =
// log.Warning("Produced")
override _.HandleOk(()) =
log.Warning("Produced")
// TODO consider whether to log cause of every individual produce failure in full (Failure counts are emitted periodically)
override _.HandleExn(log, exn) =
log.Information(exn, "Unhandled")
Expand All @@ -38,7 +39,7 @@ type ProductionStats(log, statsInterval, stateInterval) =
/// to preserve ordering at stream (key) level for messages produced to the topic)
// TODO NOTE: The bulk of any manipulation should take place before events enter the scheduler, i.e. in program.fs
// TODO NOTE: While filtering out entire categories is appropriate, you should not filter within a given stream (i.e., by event type)
let render struct (stream : FsCodec.StreamName, span : Propulsion.Streams.Default.StreamSpan) = async {
let render (stream : FsCodec.StreamName) (span : Propulsion.Streams.Default.StreamSpan) ct = Async.startImmediateAsTask ct <| async {
let value =
span
|> Propulsion.Codec.NewtonsoftJson.RenderedSpan.ofStreamSpan stream
Expand Down
10 changes: 5 additions & 5 deletions propulsion-projector/Projector.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
<!--#endif-->
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.0-rc.9" />
<!--#if (cosmos || sss || esdb) -->
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.2" />
<!--#endif-->
<PackageReference Include="Propulsion.DynamoStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.EventStoreDb" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.DynamoStore" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.EventStoreDb" Version="3.0.0-rc.2" />
<PackageReference Include="Equinox.SqlStreamStore.MsSql" Version="4.0.0-rc.7" />
<PackageReference Include="Propulsion.SqlStreamStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.SqlStreamStore" Version="3.0.0-rc.2" />
<!--#if kafka-->
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.2" />
<!--#endif-->
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion propulsion-pruner/Pruner.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageReference Include="Argu" Version="6.1.1" />
<PackageReference Include="Equinox.CosmosStore.Prometheus" Version="4.0.0-rc.7" />
<PackageReference Include="prometheus-net.AspNetCore" Version="3.6.0" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.2" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="Serilog.Sinks.Seq" Version="4.0.0" />
Expand Down
5 changes: 1 addition & 4 deletions propulsion-reactor/Handler.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ type Stats(log, statsInterval, stateInterval, verboseStore, ?logExternalStats) =

let mutable ok, skipped, na = 0, 0, 0

#if (blank || sourceKafka)
override _.HandleOk res = res |> function
| Outcome.Ok (used, unused) -> ok <- ok + used; skipped <- skipped + unused
| Outcome.Skipped count -> skipped <- skipped + count
| Outcome.NotApplicable count -> na <- na + count
#endif
override _.Classify(exn) =
match exn with
| Equinox.DynamoStore.Exceptions.ProvisionedThroughputExceeded -> Propulsion.Streams.OutcomeKind.RateLimited
Expand All @@ -34,8 +32,7 @@ type Stats(log, statsInterval, stateInterval, verboseStore, ?logExternalStats) =
|| e.StatusCode = System.Net.HttpStatusCode.ServiceUnavailable)
&& not verboseStore -> Propulsion.Streams.OutcomeKind.RateLimited
| x -> base.Classify x
override _.HandleExn(log, exn) =
log.Information(exn, "Unhandled")
override _.HandleExn(log, exn) = log.Information(exn, "Unhandled")

override _.DumpStats() =
base.DumpStats()
Expand Down
10 changes: 5 additions & 5 deletions propulsion-reactor/Reactor.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
<ItemGroup>
<PackageReference Include="Argu" Version="6.1.1" />
<PackageReference Include="Equinox.SqlStreamStore.MsSql" Version="4.0.0-rc.5" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.DynamoStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.EventStoreDb" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.SqlStreamStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.DynamoStore" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.EventStoreDb" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.SqlStreamStore" Version="3.0.0-rc.2" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.0-rc.9" />
<!--#if (kafka || sourceKafka) -->
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.2" />
<!--#endif-->
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion propulsion-summary-consumer/SummaryConsumer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="Argu" Version="6.1.1" />
<PackageReference Include="Equinox.CosmosStore" Version="4.0.0-rc.7" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.0-rc.9" />
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.2" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions propulsion-sync/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,8 @@ module Checkpoints =
type Stats(log, statsInterval, stateInterval) =
inherit Propulsion.Streams.Sync.Stats<unit>(log, statsInterval, stateInterval)

override _.HandleExn(log, exn) =
log.Information(exn, "Unhandled")
override _.HandleOk(()) = ()
override _.HandleExn(log, exn) = log.Information(exn, "Unhandled")

open Propulsion.Internal // AwaitKeyboardInterruptAsTaskCanceledException

Expand All @@ -495,7 +495,7 @@ let build (args : Args.Arguments, log) =
match cosmos.KafkaSink with
| Some kafka ->
let broker, topic, producers = kafka.BuildTargetParams()
let render struct (stream: FsCodec.StreamName, span: Propulsion.Streams.Default.StreamSpan) = async {
let render (stream: FsCodec.StreamName) (span: Propulsion.Streams.Default.StreamSpan) ct = Async.startImmediateAsTask ct <| async {
let value =
span
|> Propulsion.Codec.NewtonsoftJson.RenderedSpan.ofStreamSpan stream
Expand Down
6 changes: 3 additions & 3 deletions propulsion-sync/Sync.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

<ItemGroup>
<PackageReference Include="Argu" Version="6.1.1" />
<PackageReference Include="Propulsion.EventStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.EventStore" Version="3.0.0-rc.2" />
<PackageReference Include="Propulsion.CosmosStore" Version="3.0.0-rc.2" />
<!--#if (kafka || marveleqx)-->
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.2" />
<!--#endif-->
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
Expand Down
2 changes: 1 addition & 1 deletion propulsion-tracking-consumer/TrackingConsumer.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="Argu" Version="6.1.1" />
<PackageReference Include="Equinox.CosmosStore" Version="4.0.0-rc.7" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.0-rc.9" />
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.1" />
<PackageReference Include="Propulsion.Kafka" Version="3.0.0-rc.2" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
</ItemGroup>

Expand Down

0 comments on commit 64b9a51

Please sign in to comment.