Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2b2431a

Browse files
committedSep 2, 2024·
chore(Packages): Inline Feed, Extract Prometheus
1 parent 5d7b0c5 commit 2b2431a

File tree

30 files changed

+90
-86
lines changed

30 files changed

+90
-86
lines changed
 

‎CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ The `Unreleased` section name is replaced by the expected version of next releas
5252
- `Propulsion.CosmosStore.CosmosStoreSink`+`CosmosStorePruner`: Exposed `*Stats` [#226](https://github.com/jet/propulsion/pull/226)
5353
- `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)
5454
- `Propulsion.EventStoreDb.EventStoreSource`: Changed API to match`Propulsion.SqlStreamStore` API rather than`Propulsion.EventStore` [#139](https://github.com/jet/propulsion/pull/139)
55+
- `Propulsion.Feed`: Moved implementations into main `Propulsion` library. While this adds a `FSharp.Control.TaskSeq` dependency, it makes maintenance and navigation easier
5556
- `Propulsion.Feed`,`Kafka`: Replaced `Async` with `task` for supervision [#158](https://github.com/jet/propulsion/pull/158), [#159](https://github.com/jet/propulsion/pull/159)
5657
- `Propulsion.Kafka`: Target `FsCodec.NewtonsoftJson` v `3.0.0` [#139](https://github.com/jet/propulsion/pull/139)
58+
- `Propulsion.Prometheus`: Extracted `Propulsion.Prometheus` and `Propulsion.Feed.Prometheus` in order to remove `Prometheus` dependency from core package
5759
- `Propulsion.Tool`: `project` renamed to `sync`; sources now have a `from` prefix [#252](https://github.com/jet/propulsion/pull/252)
5860

5961
### Removed

‎Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<!-- suppress false positive warning FS2003 about invalid version of AssemblyInformationalVersionAttribute -->
1818
<!-- supress NU5105 triggered by trailing dotted elements such as .43 and .2 in e.g.: pr.43-rc1.2: The package version '<X>' uses SemVer 2.0.0 or components of SemVer 1.0.0 that are not supported on legacy clients. Change the package version to a SemVer 1.0.0 string. If the version contains a release label it must start with a letter. This message can be ignored if the package is not intended for older clients. -->
1919
<NoWarn>$(NoWarn);FS2003;NU5105</NoWarn>
20+
<!-- <PinnedBaselineRootPackage Condition=" '$(Configuration)' == 'Release' ">[3.0.0-rc.14, 4.0.0)</PinnedBaselineRootPackage>-->
21+
<!-- <PinnedDynamoStoreRootPackage Condition=" '$(Configuration)' == 'Release' ">[3.0.0-rc.14, 4.0.0)</PinnedDynamoStoreRootPackage>-->
2022
</PropertyGroup>
2123
<ItemGroup>
2224
<!-- SourceLink etc -->

‎Propulsion.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Propulsion.SqlStreamStore",
3636
EndProject
3737
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Propulsion.CosmosStore", "src\Propulsion.CosmosStore\Propulsion.CosmosStore.fsproj", "{356294D8-DF59-4903-9A9C-03F0F459B2A3}"
3838
EndProject
39-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Propulsion.Feed", "src\Propulsion.Feed\Propulsion.Feed.fsproj", "{B6C1C225-940C-425C-A2F7-A728AEBFCB31}"
39+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Propulsion.Prometheus", "src\Propulsion.Prometheus\Propulsion.Prometheus.fsproj", "{B6C1C225-940C-425C-A2F7-A728AEBFCB31}"
4040
EndProject
4141
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Propulsion.CosmosStore3", "src\Propulsion.CosmosStore3\Propulsion.CosmosStore3.fsproj", "{8A2D7DDF-ED05-4871-A2B1-66D22A581C95}"
4242
EndProject

‎README.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,26 @@ If you're looking for a good discussion forum on these kinds of topics, look no
1313

1414
## Core Components
1515

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

1818
1. `StreamsSink`: High performance pipeline that handles parallelized event processing. Ingestion of events, and checkpointing of progress are handled asynchronously. Each aspect of the pipeline is decoupled such that it can be customized as desired.
1919
2. `Streams.Prometheus`: Helper that exposes per-scheduler metrics for Prometheus scraping.
2020
3. `ParallelProjector`: Scaled down variant of `StreamsSink` that does not preserve stream level ordering semantics
21+
4. `FeedSource`: Handles continual reading and checkpointing of events from a set of feeds ('tranches') of a 'source' that collectively represent a change data capture source for a given system (roughly analogous to how a CosmosDB Container presents a changefeed). A `readTranches` function is used to identify the Tranches (sub-feeds) on startup. The Feed Source then operates a logical reader thread per Tranche. Tranches represent content as an incrementally retrievable change feed consisting of batches of `FsCodec.ITimelineEvent` records. Each batch has an optional associated checkpointing callback that's triggered only when the Sink has handled all events within it.
22+
5. `Monitor.AwaitCompletion`: Enables efficient waiting for completion of reaction processing within an integration test.
23+
6. `PeriodicSource`: Handles regular crawling of an external datasource (such as a SQL database) where there is no way to save progress and then resume from that saved token (based on either the intrinsic properties of the data, or of the store itself). The source is expected to present its content as an `IAsyncEnumerable` of `FsCodec.StreamName * FsCodec.IEventData * context`. Checkpointing occurs only when all events have been deemed handled by the Sink.
24+
7. `SinglePassFeedSource`: Handles single pass loading of large datasets (such as a SQL database), completing when the full data has been ingested.
25+
8. `JsonSource`: Simple source that feeds items from a File containing JSON (such a file can be generated via `eqx query -o JSONFILE from cosmos` etc)
2126

22-
- `Propulsion.Feed` [![NuGet](https://img.shields.io/nuget/v/Propulsion.Feed.svg)](https://www.nuget.org/packages/Propulsion.Feed/) Provides helpers for checkpointed consumption of a feed of stream-based inputs. Provides for custom bindings (e.g. a third-party Feed API) or various other input configurations (e.g. periodically correlating with inputs from a non-streamed source such as a SQL Database). Provides a generic API for checkpoint storage, with diverse implementations hosted in the sibling packages associated with each concrete store (supported stores include DynamoStore, CosmosStore, SQL Server, Postgres). [Depends](https://www.fuget.org/packages/Propulsion.Feed) on `Propulsion`, a `IFeedCheckpointStore` implementation (from e.g., `Propulsion.CosmosStore|DynamoStore|MessageDb|SqlStreamStore`)
27+
NOTE `Propulsion.Feed` is a namespace within the main `Propulsion` package that provides helpers for checkpointed consumption of a feed of stream-based inputs.
28+
- Supported inputs include custom bindings (e.g. a third-party Feed API) or various other input configurations (e.g. periodically correlating with inputs from a non-streamed source such as a SQL Database).
29+
- Provides a generic API for checkpoint storage, with diverse implementations hosted in the sibling packages associated with each concrete store (supported stores include DynamoStore, CosmosStore, SQL Server, Postgres).
30+
- Using a feed normally requires a checkpoint store that inmplements `IFeedCheckpointStore` from e.g., `Propulsion.CosmosStore|DynamoStore|MessageDb|SqlStreamStore`
2331

24-
1. `FeedSource`: Handles continual reading and checkpointing of events from a set of feeds ('tranches') of a 'source' that collectively represent a change data capture source for a given system (roughly analogous to how a CosmosDB Container presents a changefeed). A `readTranches` function is used to identify the Tranches (sub-feeds) on startup. The Feed Source then operates a logical reader thread per Tranche. Tranches represent content as an incrementally retrievable change feed consisting of batches of `FsCodec.ITimelineEvent` records. Each batch has an optional associated checkpointing callback that's triggered only when the Sink has handled all events within it.
25-
2. `Monitor.AwaitCompletion`: Enables efficient waiting for completion of reaction processing within an integration test.
26-
3. `PeriodicSource`: Handles regular crawling of an external datasource (such as a SQL database) where there is no way to save progress and then resume from that saved token (based on either the intrinsic properties of the data, or of the store itself). The source is expected to present its content as an `IAsyncEnumerable` of `FsCodec.StreamName * FsCodec.IEventData * context`. Checkpointing occurs only when all events have been deemed handled by the Sink.
27-
4. `JsonSource`: Simple source that feeds items from a File containing JSON (such a file can be generated via `eqx query -o JSONFILE from cosmos` etc)
28-
5. `SinglePassFeedSource`: Handles single pass loading of large datasets (such as a SQL database), completing when the full data has been ingested.
29-
6. `Prometheus`: Exposes reading statistics to Prometheus (including metrics from `DynamoStore.DynamoStoreSource`, `EventStoreDb.EventStoreSource`, `MessageDb.MessageDbSource` and `SqlStreamStore.SqlStreamStoreSource`). (NOTE all other statistics relating to processing throughput and latency etc are exposed from the Scheduler component on the Sink side)
32+
- `Propulsion.Prometheus` [![NuGet](https://img.shields.io/nuget/v/Propulsion.Prometheus.svg)](https://www.nuget.org/packages/Propulsion.Prometheus/) Provides helpers for checkpointed consumption of a feed of stream-based inputs. Provides for custom bindings (e.g. a third-party Feed API) or various other input configurations (e.g. periodically correlating with inputs from a non-streamed source such as a SQL Database). Provides a generic API for checkpoint storage, with diverse implementations hosted in the sibling packages associated with each concrete store (supported stores include DynamoStore, CosmosStore, SQL Server, Postgres). [Depends](https://www.fuget.org/packages/Propulsion.Prometheus) on `Propulsion`, a `IFeedCheckpointStore` implementation (from e.g., `Propulsion.CosmosStore|DynamoStore|MessageDb|SqlStreamStore`)
33+
34+
1. `Propulsion.Prometheus`: Exposes processing throughput statistics to Prometheus.
35+
2. `Propulsion.Feed.Prometheus`: Exposes reading statistics to Prometheus (including metrics from `DynamoStore.DynamoStoreSource`, `EventStoreDb.EventStoreSource`, `MessageDb.MessageDbSource` and `SqlStreamStore.SqlStreamStoreSource`).
3036

3137
- `Propulsion.MemoryStore` [![NuGet](https://img.shields.io/nuget/v/Propulsion.MemoryStore.svg)](https://www.nuget.org/packages/Propulsion.MemoryStore/). Provides bindings to `Equinox.MemoryStore`. [Depends](https://www.fuget.org/packages/Propulsion.MemoryStore) on `Equinox.MemoryStore` v `4.0.0`, `FsCodec.Box`, `Propulsion`
3238

@@ -51,9 +57,8 @@ If you're looking for a good discussion forum on these kinds of topics, look no
5157
2. `DynamoStoreIndexer`: writes to `AppendsIndex`/`AppendsEpoch` (used by `Propulsion.DynamoStore.Indexer`, `Propulsion.Tool`)
5258
3. `DynamoStoreSource`: reads from `AppendsIndex`/`AppendsEpoch` (see `DynamoStoreIndexer`)
5359
4. `ReaderCheckpoint`: checkpoint storage for `Propulsion.DynamoStore`/`EventStoreDb`/`Feed`/`MessageDb`/`SqlStreamSteamStore` using `Equinox.DynamoStore` v `4.0.0`.
54-
5. `Monitor.AwaitCompletion`: See `Propulsion.Feed`
5560

56-
(Reading and position metrics are exposed via `Propulsion.Feed.Prometheus`)
61+
(Reading and position metrics are exposed via `Propulsion.Prometheus`)
5762

5863
- `Propulsion.DynamoStore.Indexer` [![NuGet](https://img.shields.io/nuget/v/Propulsion.DynamoStore.Indexer.svg)](https://www.nuget.org/packages/Propulsion.DynamoStore.Indexer/) AWS Lambda to index appends into an Index Table. [Depends](https://www.fuget.org/packages/Propulsion.DynamoStore.Indexer) on `Propulsion.DynamoStore`, `Amazon.Lambda.Core`, `Amazon.Lambda.DynamoDBEvents`, `Amazon.Lambda.Serialization.SystemTextJson`
5964

@@ -76,7 +81,7 @@ If you're looking for a good discussion forum on these kinds of topics, look no
7681
2. `DynamoStoreNotifierLambda`: CDK wiring for `Propulsion.DynamoStore.Notifier`
7782
3. `DynamoStoreReactorLambda`: CDK wiring for a Reactor that's triggered based on messages supplied by `Propulsion.DynamoStore.Notifier`
7883

79-
- `Propulsion.DynamoStore.Lambda` [![NuGet](https://img.shields.io/nuget/v/Propulsion.DynamoStore.Lambda.svg)](https://www.nuget.org/packages/Propulsion.DynamoStore.Lambda/) Helpers for implementing Lambda Reactors. [Depends](https://www.fuget.org/packages/Propulsion.DynamoStore.Lambda) on `Amazon.Lambda.SQSEvents`, `Propulsion.Feed`
84+
- `Propulsion.DynamoStore.Lambda` [![NuGet](https://img.shields.io/nuget/v/Propulsion.DynamoStore.Lambda.svg)](https://www.nuget.org/packages/Propulsion.DynamoStore.Lambda/) Helpers for implementing Lambda Reactors. [Depends](https://www.fuget.org/packages/Propulsion.DynamoStore.Lambda) on `Amazon.Lambda.SQSEvents`
8085

8186
1. `SqsNotificationBatch.parse`: parses a batch of notification events (queued by a `Notifier`) in a `Amazon.Lambda.SQSEvents.SQSEvent`
8287
2. `SqsNotificationBatch.batchResponseWithFailuresForPositionsNotReached`: Correlates the updated checkpoints with the input `SQSEvent`, generating a `SQSBatchResponse` that will requeue any notifications that have not yet been serviced.
@@ -86,23 +91,17 @@ If you're looking for a good discussion forum on these kinds of topics, look no
8691
- `Propulsion.EventStoreDb` [![NuGet](https://img.shields.io/nuget/v/Propulsion.EventStoreDb.svg)](https://www.nuget.org/packages/Propulsion.EventStoreDb/). Provides bindings to [EventStoreDB](https://www.eventstore.org), writing via `Propulsion.EventStore.EventStoreSink`. [Depends](https://www.fuget.org/packages/Propulsion.EventStoreDb) on `Equinox.EventStoreDb` v `4.0.0`
8792
1. `EventStoreSource`: reading from an EventStoreDB >= `20.10` `$all` stream using the gRPC interface into a `Propulsion.Sink`.
8893
2. `EventStoreSink`: writing to `Equinox.EventStoreDb` v `4.0.0`
89-
3. `Monitor.AwaitCompletion`: See `Propulsion.Feed`
90-
91-
(Reading and position metrics are exposed via `Propulsion.Feed.Prometheus`)
9294

9395
- `Propulsion.Kafka` [![NuGet](https://img.shields.io/nuget/v/Propulsion.Kafka.svg)](https://www.nuget.org/packages/Propulsion.Kafka/) Provides bindings for producing and consuming both streamwise and in parallel. Includes a standard codec for use with streamwise projection and consumption, `Propulsion.Kafka.Codec.NewtonsoftJson.RenderedSpan`. [Depends](https://www.fuget.org/packages/Propulsion.Kafka) on `FsKafka` v `1.7.0`-`1.9.99`
9496

95-
- `Propulsion.MessageDb` [![NuGet](https://img.shields.io/nuget/v/Propulsion.MessageDb.svg)](https://www.nuget.org/packages/Propulsion.MessageDb/). Provides bindings to [MessageDb](http://docs.eventide-project.org/user-guide/message-db/), maintaining checkpoints in a postgres table [Depends](https://www.fuget.org/packages/Propulsion.MessageDb) on `Propulsion.Feed`, `Npgsql` >= `7.0.7` [#181](https://github.com/jet/propulsion/pull/181) :pray: [@nordfjord](https://github.com/nordfjord)
97+
- `Propulsion.MessageDb` [![NuGet](https://img.shields.io/nuget/v/Propulsion.MessageDb.svg)](https://www.nuget.org/packages/Propulsion.MessageDb/). Provides bindings to [MessageDb](http://docs.eventide-project.org/user-guide/message-db/), maintaining checkpoints in a postgres table [Depends](https://www.fuget.org/packages/Propulsion.MessageDb) on `Propulsion`, `Npgsql` >= `7.0.7` [#181](https://github.com/jet/propulsion/pull/181) :pray: [@nordfjord](https://github.com/nordfjord)
9698
1. `MessageDbSource`: reading from one or more MessageDB categories into a `Propulsion.Sink`
9799
2. `CheckpointStore`: checkpoint storage for `Propulsion.Feed` using `Npgsql` (can be initialized via `propulsion initpg -c connstr -s schema`)
98100

99-
- `Propulsion.SqlStreamStore` [![NuGet](https://img.shields.io/nuget/v/Propulsion.SqlStreamStore.svg)](https://www.nuget.org/packages/Propulsion.SqlStreamStore/). Provides bindings to [SqlStreamStore](https://github.com/SQLStreamStore/SQLStreamStore), maintaining checkpoints in a SQL Server table. [Depends](https://www.fuget.org/packages/Propulsion.SqlStreamStore) on `Propulsion.Feed`, `SqlStreamStore`, `Dapper` v `2.0`, `Microsoft.Data.SqlClient` v `1.1.3`
101+
- `Propulsion.SqlStreamStore` [![NuGet](https://img.shields.io/nuget/v/Propulsion.SqlStreamStore.svg)](https://www.nuget.org/packages/Propulsion.SqlStreamStore/). Provides bindings to [SqlStreamStore](https://github.com/SQLStreamStore/SQLStreamStore), maintaining checkpoints in a SQL Server table. [Depends](https://www.fuget.org/packages/Propulsion.SqlStreamStore) on `Propulsion`, `SqlStreamStore`, `Dapper` v `2.0`, `Microsoft.Data.SqlClient` v `1.1.3`
100102

101103
1. `SqlStreamStoreSource`: reading from a SqlStreamStore `$all` stream into a `Propulsion.Sink`
102104
2. `ReaderCheckpoint`: checkpoint storage for `Propulsion.EventStoreDb`/`Feed`/`SqlStreamSteamStore` using `Dapper`, `Microsoft.Data.SqlClient`
103-
3. `Monitor.AwaitCompletion`: See `Propulsion.Feed`
104-
105-
(Reading and position metrics are exposed via `Propulsion.Feed.Prometheus`)
106105

107106
The ubiquitous `Serilog` dependency is solely on the core module, not any sinks.
108107

‎build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<Exec Command="dotnet pack src/Propulsion.DynamoStore.Lambda $(Cfg) $(PackOptions)" />
2121
<Exec Command="dotnet pack src/Propulsion.DynamoStore.Notifier $(Cfg) $(PackOptions)" />
2222
<Exec Command="dotnet pack src/Propulsion.EventStoreDb $(Cfg) $(PackOptions)" />
23-
<Exec Command="dotnet pack src/Propulsion.Feed $(Cfg) $(PackOptions)" />
23+
<Exec Command="dotnet pack src/Propulsion.Prometheus $(Cfg) $(PackOptions)" />
2424
<Exec Command="dotnet pack src/Propulsion.Kafka $(Cfg) $(PackOptions)" />
2525
<Exec Command="dotnet pack src/Propulsion.MemoryStore $(Cfg) $(PackOptions)" />
2626
<Exec Command="dotnet pack src/Propulsion.MessageDb $(Cfg) $(PackOptions)" />

‎src/Propulsion.CosmosStore/Propulsion.CosmosStore.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
</ItemGroup>
2727

2828
<ItemGroup>
29-
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
30-
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />
29+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion.Prometheus\Propulsion.Prometheus.fsproj" />
30+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion.Prometheus" Version="$(PinnedBaselineRootPackage)" />
3131
</ItemGroup>
3232

3333
</Project>

‎src/Propulsion.CosmosStore3/Propulsion.CosmosStore3.fsproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@
4545
</ItemGroup>
4646

4747
<ItemGroup>
48-
<ProjectReference Include="..\Propulsion\Propulsion.fsproj" />
49-
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />-->
50-
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />-->
48+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion.Prometheus\Propulsion.Prometheus.fsproj" />
49+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion.Prometheus" Version="$(PinnedBaselineRootPackage)" />
5150
</ItemGroup>
5251

5352
</Project>

‎src/Propulsion.DynamoStore.Constructs/Propulsion.DynamoStore.Constructs.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<PropertyGroup>
66
<TargetFramework>net6.0</TargetFramework>
7-
<PackageValidationBaselineVersion>3.0.0-rc.12</PackageValidationBaselineVersion>
7+
<!-- <PackageValidationBaselineVersion>3.0.0-rc.12</PackageValidationBaselineVersion>-->
88
</PropertyGroup>
99

1010
<ItemGroup>

‎src/Propulsion.DynamoStore.Indexer/Propulsion.DynamoStore.Indexer.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
<PackageReference Include="Amazon.Lambda.DynamoDBEvents" Version="2.1.1" />
3535
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.3.0" />
3636
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
37-
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.DynamoStore\Propulsion.DynamoStore.fsproj" />
38-
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.DynamoStore" Version="[3.0.0-rc.12, 4.0.0)" />
37+
<ProjectReference Condition=" '$(PinnedDynamoStoreRootPackage)' == '' " Include="..\Propulsion.DynamoStore\Propulsion.DynamoStore.fsproj" />
38+
<PackageReference Condition=" '$(PinnedDynamoStoreRootPackage)' != '' " Include="Propulsion.DynamoStore" Version="$(PinnedDynamoStoreRootPackage)" />
3939
</ItemGroup>
4040

4141
<!-- The Indexer dotnet new template extracts the published binaries from the tools folder using logic in https://github.com/jet/propulsion/pull/143 -->

‎src/Propulsion.DynamoStore.Lambda/Propulsion.DynamoStore.Lambda.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
18-
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.12, 4.0.0)" />
17+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
18+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

‎src/Propulsion.DynamoStore.Notifier/Propulsion.DynamoStore.Notifier.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
<PackageReference Include="Amazon.Lambda.Serialization.SystemTextJson" Version="2.3.0" />
4343
<PackageReference Include="AWSSDK.SimpleNotificationService" Version="3.7.4.10" />
4444
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
45-
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
46-
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.12, 4.0.0)" />
45+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
46+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
4747
</ItemGroup>
4848

4949
<!-- The Notifier dotnet new template extracts the published binaries from the tools folder using logic in https://github.com/jet/propulsion/pull/143 -->

‎src/Propulsion.DynamoStore/Propulsion.DynamoStore.fsproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@
3131
</ItemGroup>
3232

3333
<ItemGroup>
34-
<ProjectReference Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
35-
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />-->
36-
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.14, 4.0.0)" />-->
34+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
35+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
3736
</ItemGroup>
3837

3938
</Project>

‎src/Propulsion.EventStore/Propulsion.EventStore.fsproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
</ItemGroup>
2525

2626
<ItemGroup>
27-
<ProjectReference Include="..\Propulsion\Propulsion.fsproj" />
28-
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />-->
29-
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />-->
27+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
28+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
3029
</ItemGroup>
3130

3231
</Project>

‎src/Propulsion.EventStoreDb/Propulsion.EventStoreDb.fsproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
</ItemGroup>
2323

2424
<ItemGroup>
25-
<ProjectReference Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
26-
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />-->
27-
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.14, 4.0.0)" />-->
25+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
26+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
2827
</ItemGroup>
2928

3029
</Project>

‎src/Propulsion.Kafka/Propulsion.Kafka.fsproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
</ItemGroup>
2323

2424
<ItemGroup>
25-
<ProjectReference Include="..\Propulsion\Propulsion.fsproj" />
26-
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
27-
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />
25+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
26+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
2827
</ItemGroup>
2928

3029
</Project>

‎src/Propulsion.MemoryStore/Propulsion.MemoryStore.fsproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
</ItemGroup>
2727

2828
<ItemGroup>
29-
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
30-
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />
29+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
30+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
3131
</ItemGroup>
3232

3333
</Project>

‎src/Propulsion.MessageDb/Propulsion.MessageDb.fsproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,8 @@
2121
</ItemGroup>
2222

2323
<ItemGroup>
24-
<ProjectReference Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
25-
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />-->
26-
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.14, 4.0.0)" />-->
24+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
25+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
2726
</ItemGroup>
2827

2928
</Project>

‎src/Propulsion.Feed/Propulsion.Feed.fsproj renamed to ‎src/Propulsion.Prometheus/Propulsion.Prometheus.fsproj

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,19 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<Compile Include="FeedReader.fs" />
12-
<Compile Include="FeedSource.fs" />
13-
<Compile Include="JsonSource.fs" />
14-
<Compile Include="PeriodicSource.fs" />
11+
<Compile Include="PropulsionPrometheus.fs" />
1512
<Compile Include="FeedPrometheus.fs" />
1613
</ItemGroup>
1714

1815
<ItemGroup>
1916
<PackageReference Include="MinVer" Version="5.0.0" PrivateAssets="All" />
20-
21-
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.4.0" />
17+
18+
<PackageReference Include="prometheus-net" Version="3.6.0" />
2219
</ItemGroup>
2320

2421
<ItemGroup>
25-
<ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion\Propulsion.fsproj" />
26-
<PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion" Version="[3.0.0-rc.14, 4.0.0)" />
22+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
23+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
2724
</ItemGroup>
2825

2926
</Project>

‎src/Propulsion.SqlStreamStore/Propulsion.SqlStreamStore.fsproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
</ItemGroup>
2323

2424
<ItemGroup>
25-
<ProjectReference Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />
26-
<!-- <ProjectReference Condition=" '$(Configuration)' == 'Debug' " Include="..\Propulsion.Feed\Propulsion.Feed.fsproj" />-->
27-
<!-- <PackageReference Condition=" '$(Configuration)' == 'Release' " Include="Propulsion.Feed" Version="[3.0.0-rc.14, 4.0.0)" />-->
25+
<ProjectReference Condition=" '$(PinnedBaselineRootPackage)' == '' " Include="..\Propulsion\Propulsion.fsproj" />
26+
<PackageReference Condition=" '$(PinnedBaselineRootPackage)' != '' " Include="Propulsion" Version="$(PinnedBaselineRootPackage)" />
2827
</ItemGroup>
2928

3029
</Project>
File renamed without changes.

‎src/Propulsion.Feed/FeedSource.fs renamed to ‎src/Propulsion/FeedSource.fs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -124,21 +124,6 @@ type AllFeedSource
124124
member x.Start() =
125125
base.Start(x.Pump)
126126

127-
/// Drives reading from the Source, stopping when the Tail of each of the Tranches has been reached
128-
type SinglePassFeedSource
129-
( log: Serilog.ILogger, statsInterval: TimeSpan,
130-
sourceId,
131-
crawl: Func<TrancheId, Position, CancellationToken, IAsyncEnumerable<struct (TimeSpan * Batch<_>)>>,
132-
checkpoints: IFeedCheckpointStore, sink: Propulsion.Sinks.SinkPipeline,
133-
?renderPos, ?logReadFailure, ?readFailureSleepInterval, ?logCommitFailure) =
134-
inherit TailingFeedSource(log, statsInterval, sourceId, (*tailSleepInterval*)TimeSpan.Zero, checkpoints, (*establishOrigin*)None, sink, defaultArg renderPos string,
135-
crawl,
136-
?logReadFailure = logReadFailure, ?readFailureSleepInterval = readFailureSleepInterval, ?logCommitFailure = logCommitFailure,
137-
readersStopAtTail = true)
138-
139-
member x.Start(readTranches) =
140-
base.Start(fun ct -> x.Pump(readTranches, ct))
141-
142127
module Categories =
143128

144129
let private startsWith (prefix: string) (s: FsCodec.StreamName) = (FsCodec.StreamName.toString s).StartsWith(prefix)

‎src/Propulsion.Feed/JsonSource.fs renamed to ‎src/Propulsion/JsonSource.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ type [<Sealed; AbstractClass>] JsonSource private () =
3939
else System.Text.Json.JsonDocument.Parse line |> parseFeedDoc |> Seq.toArray
4040
struct (System.TimeSpan.Zero, ({ items = items; isTail = isEof; checkpoint = Position.parse lineNo }: Core.Batch<_>))
4141
with e -> raise <| exn($"File Parse error on L{lineNo}: '{line.Substring(0, 200)}'", e) }
42-
let source = Propulsion.Feed.Core.SinglePassFeedSource(log, statsInterval, sourceId, crawl, checkpoints, sink, string)
42+
let source = SinglePassFeedSource(log, statsInterval, sourceId, crawl, checkpoints, sink, string)
4343
source.Start(fun _ct -> task { return [| TrancheId.parse "0" |] })

‎src/Propulsion/Propulsion.fsproj

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<PropertyGroup>
66
<TargetFramework>net6.0</TargetFramework>
7-
<PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>
7+
<!-- <PackageValidationBaselineVersion>3.0.0-rc.14</PackageValidationBaselineVersion>-->
88
</PropertyGroup>
99

1010
<ItemGroup>
@@ -19,20 +19,23 @@
1919
<Compile Include="Sinks.fs" />
2020
<Compile Include="Feed.fs" />
2121
<Compile Include="FeedMonitor.fs" />
22-
<Compile Include="PropulsionPrometheus.fs" />
22+
<Compile Include="FeedReader.fs" />
23+
<Compile Include="FeedSource.fs" />
24+
<Compile Include="SinglePassFeedSource.fs" />
25+
<Compile Include="JsonSource.fs" />
26+
<Compile Include="PeriodicSource.fs" />
2327
<Compile Include="StreamFilter.fs" />
2428
</ItemGroup>
2529

2630
<ItemGroup>
2731
<PackageReference Include="MinVer" Version="5.0.0" PrivateAssets="All" />
2832

2933
<!-- Exclude FSharp.Core.xml due to temporarly malformed state -->
30-
<PackageReference Include="FSharp.Core" Version="6.0.0" ExcludeAssets="contentfiles" />
34+
<PackageReference Include="FSharp.Core" Version="6.0.1" ExcludeAssets="contentfiles" />
3135

3236
<PackageReference Include="FsCodec" Version="3.0.0" />
37+
<PackageReference Include="FSharp.Control.TaskSeq" Version="0.4.0" />
3338
<PackageReference Include="MathNet.Numerics" Version="4.15.0" />
34-
<!-- NB TEMP; needs to be shipped out-->
35-
<PackageReference Include="prometheus-net" Version="3.6.0" />
3639
<PackageReference Include="Serilog" Version="2.7.1" />
3740
</ItemGroup>
3841

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
namespace Propulsion.Feed
2+
3+
open Propulsion.Feed.Core
4+
open System
5+
open System.Collections.Generic
6+
open System.Threading
7+
8+
/// Drives reading from the Source, stopping when the Tail of each of the Tranches has been reached
9+
type SinglePassFeedSource
10+
( log: Serilog.ILogger, statsInterval: TimeSpan,
11+
sourceId,
12+
crawl: Func<TrancheId, Position, CancellationToken, IAsyncEnumerable<struct (TimeSpan * Batch<_>)>>,
13+
checkpoints: IFeedCheckpointStore, sink: Propulsion.Sinks.SinkPipeline,
14+
?renderPos, ?logReadFailure, ?readFailureSleepInterval, ?logCommitFailure) =
15+
inherit TailingFeedSource(log, statsInterval, sourceId, (*tailSleepInterval*)TimeSpan.Zero, checkpoints, (*establishOrigin*)None, sink, defaultArg renderPos string,
16+
crawl,
17+
?logReadFailure = logReadFailure, ?readFailureSleepInterval = readFailureSleepInterval, ?logCommitFailure = logCommitFailure,
18+
readersStopAtTail = true)
19+
20+
member x.Start(readTranches) =
21+
base.Start(fun ct -> x.Pump(readTranches, ct))

‎tests/Propulsion.Tests/SinkHealthTests.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ type Scenario(testOutput) =
4949

5050
[<Fact>]
5151
let run () = async {
52-
let source = Propulsion.Feed.Core.SinglePassFeedSource(log, TimeSpan.FromSeconds 5, SourceId.parse "sid", crawl, checkpoints, sink, string)
52+
let source = Propulsion.Feed.SinglePassFeedSource(log, TimeSpan.FromSeconds 5, SourceId.parse "sid", crawl, checkpoints, sink, string)
5353
let src = source.Start(fun _ct -> task { return [| TrancheId.parse "tid" |] })
5454
let! monEx = src.Monitor.AwaitCompletion(propagationDelay = TimeSpan.FromSeconds 1, awaitFullyCaughtUp = true) |> Propulsion.Internal.Async.ofTask |> Async.Catch
5555
let me = extractHealthCheckExn monEx

‎tests/Propulsion.Tests/SourceTests.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type Scenario(testOutput) =
3939
[<Theory; InlineData true; InlineData false>]
4040
let SinglePassFeedSource withWait = async {
4141
let crawl _ _ _ = TaskSeq.singleton <| struct (TimeSpan.FromSeconds 0.1, ({ items = Array.empty; isTail = true; checkpoint = Unchecked.defaultof<_> }: Core.Batch<_>))
42-
let source = Propulsion.Feed.Core.SinglePassFeedSource(log, TimeSpan.FromMinutes 1, SourceId.parse "sid", crawl, checkpoints, sink, string)
42+
let source = Propulsion.Feed.SinglePassFeedSource(log, TimeSpan.FromMinutes 1, SourceId.parse "sid", crawl, checkpoints, sink, string)
4343
use src = source.Start(fun _ct -> task { return [| TrancheId.parse "tid" |] })
4444
// SinglePassFeedSource completion includes Waiting for Completion of all Batches on all Tranches and Flushing of Checkpoints
4545
// Hence waiting with the Monitor is not actually necessary (though it provides progress logging which otherwise would be less thorough)

‎tools/Propulsion.Tool/Propulsion.Tool.fsproj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<PackAsTool>true</PackAsTool>
99
<ToolCommandName>propulsion</ToolCommandName>
10-
<!-- Allow to run on SDK >= 6-->
10+
<!-- Allow to run on SDK >= 6 -->
1111
<RollForward>Major</RollForward>
1212

1313
</PropertyGroup>
@@ -28,9 +28,11 @@
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.42.0" />
3231
<PackageReference Include="MinVer" Version="5.0.0" PrivateAssets="All" />
3332

33+
<!-- The tool should use a relatively fresh Cosmos lib; Equinox.CosmosStore has a conservative dependency-->
34+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.42.0" />
35+
3436
<PackageReference Include="Argu" Version="6.2.2" />
3537
<!-- Required or there'll be an exception at runtime re missing support DLLs when using RBAC -->
3638
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.1.177" />

0 commit comments

Comments
 (0)
Please sign in to comment.