Skip to content

Commit

Permalink
net6.0 update stragglers
Browse files Browse the repository at this point in the history
  • Loading branch information
bartelink committed Jul 28, 2022
1 parent 96f2dac commit 3560a28
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 48 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The `Unreleased` section name is replaced by the expected version of next releas

### Changed

- Targeted `net6.0` with `6.0.300` SDK
- Targeted `net6.0` with `6.0.300` SDK, `FSharp.Control.AsyncSeq` v `3.2.1`, `MathNet.Numerics` v `4.15.0`
- `Propulsion.CosmosStore`: Changed to target `Equinox.CosmosStore` v `4.0.0` [#139](https://github.com/jet/propulsion/pull/139)
- `Propulsion.CosmosStore.CosmosSource`: Changed parsing to use `System.Text.Json` [#139](https://github.com/jet/propulsion/pull/139)
- `Propulsion.EventStore`: Pinned to target `Equinox.EventStore` v `[3.0.7`-`3.99.0]` **Deprecated; Please migrate to `Propulsion.EventStoreDb`** [#139](https://github.com/jet/propulsion/pull/139)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ If you're looking for a good discussion forum on these kinds of topics, look no

## Components

The components within this repository are delivered as a multi-targeted Nuget package targeting `netstandard2.0`/`1` (internally it targets FSharp.Core >= 4.5.4, which works with SDKs back to F# 4.5+)
The components within this repository are delivered as a multi-targeted Nuget package targeting `net6.0`

- `Propulsion` [![NuGet](https://img.shields.io/nuget/v/Propulsion.svg)](https://www.nuget.org/packages/Propulsion/) Implements core functionality in a channel-independent fashion including `ParallelProjector`, `StreamsProjector`. [Depends](https://www.fuget.org/packages/Propulsion) on `MathNet.Numerics`, `Serilog`

Expand Down
4 changes: 1 addition & 3 deletions src/Propulsion.Cosmos/Propulsion.Cosmos.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<DefineConstants>COSMOSV2</DefineConstants>
</PropertyGroup>

Expand Down Expand Up @@ -30,8 +30,6 @@
<ItemGroup>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="4.5.4" />

<PackageReference Include="Equinox.Cosmos" Version="[2.6.0, 2.99.0]" />
<PackageReference Include="Microsoft.Azure.DocumentDB.ChangeFeedProcessor" Version="2.4.0" />
</ItemGroup>
Expand Down
34 changes: 17 additions & 17 deletions src/Propulsion.CosmosStore/ChangeFeedProcessor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -61,37 +61,37 @@ type ChangeFeedProcessor =

static member Start
( log : ILogger, monitored : Container,
/// The non-partitioned (i.e., PartitionKey is "id") Container holding the partition leases.
// The non-partitioned (i.e., PartitionKey is "id") Container holding the partition leases.
// Should always read from the write region to keep the number of write conflicts to a minimum when the sdk
// updates the leases. Since the non-write region(s) might lag behind due to us using non-strong consistency, during
// failover we are likely to reprocess some messages, but that's okay since processing has to be idempotent in any case
leases : Container,
/// Identifier to disambiguate multiple independent feed processor positions (akin to a 'consumer group')
// Identifier to disambiguate multiple independent feed processor positions (akin to a 'consumer group')
processorName : string,
/// Observers to forward documents to (Disposal is tied to stopping of the Source)
// Observers to forward documents to (Disposal is tied to stopping of the Source)
observer : IChangeFeedObserver,
?leaseOwnerId : string,
/// (NB Only applies if this is the first time this leasePrefix is presented)
/// Specify `true` to request starting of projection from the present write position.
/// Default: false (projecting all events from start beforehand)
// (NB Only applies if this is the first time this leasePrefix is presented)
// Specify `true` to request starting of projection from the present write position.
// Default: false (projecting all events from start beforehand)
?startFromTail : bool,
/// Frequency to check for partitions without a processor. Default 1s
// Frequency to check for partitions without a processor. Default 1s
?leaseAcquireInterval : TimeSpan,
/// Frequency to renew leases held by processors under our control. Default 3s
// Frequency to renew leases held by processors under our control. Default 3s
?leaseRenewInterval : TimeSpan,
/// Duration to take lease when acquired/renewed. Default 10s
// Duration to take lease when acquired/renewed. Default 10s
?leaseTtl : TimeSpan,
/// Delay before re-polling a partition after backlog has been drained
// Delay before re-polling a partition after backlog has been drained
?feedPollDelay : TimeSpan,
/// Limit on items to take in a batch when querying for changes (in addition to 4MB response size limit). Default Unlimited.
/// Max Items is not emphasized as a control mechanism as it can only be used meaningfully when events are highly regular in size.
// Limit on items to take in a batch when querying for changes (in addition to 4MB response size limit). Default Unlimited.
// Max Items is not emphasized as a control mechanism as it can only be used meaningfully when events are highly regular in size.
?maxItems : int,
/// Continuously fed per-partition lag information until parent Async completes
/// callback should Async.Sleep until next update is desired
// Continuously fed per-partition lag information until parent Async completes
// callback should Async.Sleep until next update is desired
?reportLagAndAwaitNextEstimation,
/// Enables reporting or other processing of Exception conditions as per <c>WithErrorNotification</c>
// Enables reporting or other processing of Exception conditions as per <c>WithErrorNotification</c>
?notifyError : int -> exn -> unit,
/// Admits customizations in the ChangeFeedProcessorBuilder chain
// Admits customizations in the ChangeFeedProcessorBuilder chain
?customize) =
let leaseOwnerId = defaultArg leaseOwnerId (ChangeFeedProcessor.mkLeaseOwnerIdForProcess())
let feedPollDelay = defaultArg feedPollDelay (TimeSpan.FromSeconds 1.)
Expand Down Expand Up @@ -154,7 +154,7 @@ type ChangeFeedProcessor =
let rec emitLagMetrics () = async {
let feedIteratorMap (map : 't -> 'u) (query : FeedIterator<'t>) : AsyncSeq<'u> =
let rec loop () : AsyncSeq<'u> = asyncSeq {
if not query.HasMoreResults then return None else
if not query.HasMoreResults then () else
let! ct = Async.CancellationToken
let! (res : FeedResponse<'t>) = query.ReadNextAsync(ct) |> Async.AwaitTaskCorrect
for x in res do yield map x
Expand Down
1 change: 0 additions & 1 deletion src/Propulsion.CosmosStore/CosmosStoreSource.fs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ open Microsoft.Azure.Cosmos
#endif

open Equinox.Core // Stopwatch.Time
open Propulsion.Infrastructure // AwaitTaskCorrect
open Serilog
open System
open System.Collections.Generic
Expand Down
4 changes: 1 addition & 3 deletions src/Propulsion.CosmosStore/Propulsion.CosmosStore.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -21,8 +21,6 @@
<ItemGroup>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="4.5.4" />

<PackageReference Include="Equinox.CosmosStore" Version="4.0.0-beta.10.3" />
<PackageReference Include="FsCodec.SystemTextJson" Version="3.0.0-rc.4" />
</ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/Propulsion.CosmosStore3/Propulsion.CosmosStore3.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<DefineConstants>COSMOSV3</DefineConstants>
</PropertyGroup>

Expand Down Expand Up @@ -38,7 +38,6 @@
<ItemGroup>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="4.3.4" />
<PackageReference Include="Equinox.CosmosStore" Version="[3.0.7, 3.99.0]" />
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.27.0" />
</ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/Propulsion.DynamoStore/DynamoDbExport.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module Propulsion.DynamoStore.DynamoDbExport

open FSharp.Control
open System.Collections.Generic
open System.IO
open System.Text.Json
Expand All @@ -25,7 +24,7 @@ module DynamoDbJsonParser =
yield item.p.S, { i = index; c = eventTypes }
more <- not r.EndOfStream }

/// Manages import of DynamoDB JSON files (extracted from data/*.json.gz in a DyanmoDB S3 export)
/// Manages import of DynamoDB JSON files (extracted from data/*.json.gz in a DynamoDB S3 export)
type Importer(buffer : DynamoStoreIndex.Buffer, emit, dump) =

let pending = Dictionary<string, DynamoStoreIndex.EventSpan>()
Expand Down
4 changes: 1 addition & 3 deletions src/Propulsion.EventStore/Propulsion.EventStore.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<DefineConstants>EVENTSTORE_LEGACY</DefineConstants>
</PropertyGroup>

Expand All @@ -19,8 +19,6 @@
<ItemGroup>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="4.5.4" />

<PackageReference Include="Equinox.EventStore" Version="[3.0.7, 3.99.0]" />
<PackageReference Include="TypeShape" Version="8.0.1" />
</ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Propulsion.EventStore/StripedIngester.fs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace Propulsion.EventStore

open Propulsion.Infrastructure // AwaitTaskCorrect
open Propulsion.Internal
open Propulsion.Streams
open Serilog
Expand Down
2 changes: 0 additions & 2 deletions src/Propulsion.EventStoreDb/Propulsion.EventStoreDb.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
<ItemGroup>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="4.5.4" />

<PackageReference Include="Equinox.EventStoreDb" Version="4.0.0-beta.10.3" />
</ItemGroup>

Expand Down
6 changes: 2 additions & 4 deletions src/Propulsion.Feed/Propulsion.Feed.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,9 +17,7 @@
<ItemGroup>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="4.3.4" />

<PackageReference Include="FSharp.Control.AsyncSeq" Version="2.0.23" />
<PackageReference Include="FSharp.Control.AsyncSeq" Version="3.2.1" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 1 addition & 3 deletions src/Propulsion.Kafka/Propulsion.Kafka.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -17,8 +17,6 @@
<ItemGroup>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="4.5.4" />

<PackageReference Include="FsCodec.NewtonsoftJson" Version="3.0.0-rc.2.2" />
<PackageReference Include="FsKafka" Version="[1.7.0, 1.9.99)" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
<ItemGroup>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="4.7.2" />

<PackageReference Include="Dapper" Version="2.0.30" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.3" />
<PackageReference Include="SqlStreamStore" Version="1.2.0-beta.8" />
Expand Down
7 changes: 4 additions & 3 deletions src/Propulsion/Propulsion.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -18,14 +18,15 @@
<ItemGroup>
<PackageReference Include="MinVer" Version="4.0.0" PrivateAssets="All" />

<PackageReference Include="FSharp.Core" Version="4.3.4" />
<PackageReference Include="FSharp.Core" Version="6.0.0" />

<!-- We only depend on the ITimelineEvent contracts, so going to v3 is not useful/necessary -->
<PackageReference Include="FsCodec" Version="2.0.0" />
<PackageReference Include="MathNet.Numerics" Version="4.7.0" />
<PackageReference Include="MathNet.Numerics" Version="4.15.0" />
<!-- NB TEMP; needs to be shipped out-->
<PackageReference Include="prometheus-net" Version="3.6.0" />
<PackageReference Include="Serilog" Version="2.7.1" />
<PackageReference Include="System.Threading.Channels" Version="6.0.0" />
</ItemGroup>

</Project>

0 comments on commit 3560a28

Please sign in to comment.