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

SDK maintenance release #245

Merged
merged 7 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions Benchmarks/Harness/Harness.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
<PackageReference Include="Docker.DotNet" Version="3.125.5" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="Docker.DotNet" Version="3.125.15" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Benchmarks/SDK/SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" />
</ItemGroup>

Expand Down
8 changes: 8 additions & 0 deletions DotNET.SDK.sln
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Events", "Tests\Events\Even
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ASP.NET.Tests", "Samples\ASP.NET.Tests\ASP.NET.Tests.csproj", "{BF5E5AC9-C082-41E3-B2CF-2C49D2E8AE04}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Environments", "Environments", "{15B891E5-2688-4370-B994-972AAA08897C}"
ProjectSection(SolutionItems) = preProject
Samples\Environment\docker-compose.yml = Samples\Environment\docker-compose.yml
Samples\Environment\appsettings.json = Samples\Environment\appsettings.json
Samples\Environment\runtime.yml = Samples\Environment\runtime.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -924,5 +931,6 @@ Global
{D4DBB1C0-6BBB-429B-BCB7-9962F5E8C7D6} = {E1103442-E3E5-43AE-B5B5-9F1965309E24}
{56E57E45-CFFB-42F2-A378-E155D9534CE8} = {E1103442-E3E5-43AE-B5B5-9F1965309E24}
{BF5E5AC9-C082-41E3-B2CF-2C49D2E8AE04} = {22418224-6C53-4187-A7FE-BDB8C1763764}
{15B891E5-2688-4370-B994-972AAA08897C} = {22418224-6C53-4187-A7FE-BDB8C1763764}
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,9 @@ class and_there_are_enough_ingredients : given.a_kitchen_with_no_prepared_dishes
};

Because of = async () => await OnKitchen().Perform(_ => _.PrepareDish(chef, dish));

It should_after_last_operation_only_prepare_one_dish = () => KitchenAfterLastOperation().ShouldHaveEvent<DishPrepared>()
.CountOf(1)
.AtEnd().AndThat(
_ => _.Chef.ShouldEqual(chef),
_ => _.Dish.ShouldEqual(dish));

It should_only_prepare_one_dish = () => KitchenWithAllEvents().ShouldHaveEvent<DishPrepared>()
.CountOf(1)
.AtEnd().AndThat(
.AndThat(
_ => _.Chef.ShouldEqual(chef),
_ => _.Dish.ShouldEqual(dish));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class and_there_are_not_enough_ingredients : given.a_kitchen_with_no_prepared_di

It should_after_last_operation_not_have_done_anything = () => KitchenAfterLastOperation().ShouldHaveNoEvents();

It should_only_have_prepared_two_dishes_before = () => KitchenWithAllEvents().ShouldHaveEvent<DishPrepared>().CountOf(2);
It should_only_have_prepared_two_dishes_before = () => KitchenWithAllEvents().ShouldHaveEvents<DishPrepared>().CountOf(2);

It should_have_done_nothing_else = () => KitchenWithAllEvents().ShouldHaveNumberOfEvents(2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ class and_there_are_enough_ingredients : given.a_kitchen_with_no_prepared_dishes
_.PrepareDish(chef, dish);
});

It should_after_last_operation_only_prepare_one_dish = () => KitchenAfterLastOperation().ShouldHaveEvent<DishPrepared>()
It should_after_last_operation_only_prepare_one_dish = () => KitchenAfterLastOperation().ShouldHaveEvents<DishPrepared>()
.CountOf(2)
.WhereAll(
_ => _.Chef.ShouldEqual(chef),
_ => _.Dish.ShouldEqual(dish));

It should_only_prepare_one_dish = () => KitchenWithAllEvents().ShouldHaveEvent<DishPrepared>()
It should_only_prepare_one_dish = () => KitchenWithAllEvents().ShouldHaveEvents<DishPrepared>()
.CountOf(2)
.AtEnd().AndThat(
_ => _.Chef.ShouldEqual(chef),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ class when_a_dish_has_been_prepared : given.the_handler
It should_get_the_correct_customer = () => customers.TryGetAggregate(customer_name, out _).ShouldBeTrue();

It the_customer_should_have_eaten_the_dish_once = () => customers.AssertThat(customer_name).ShouldHaveEvent<DishEaten>()
.CountOf(1)
.First().AndThat(_ => _.Dish.ShouldEqual(@event.Dish));
.AndThat(_ => _.Dish.ShouldEqual(@event.Dish));

It the_customer_should_have_only_eaten_one_dish = () => customers.AssertThat(customer_name).ShouldHaveNumberOfEvents(1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@ class when_two_dishes_have_been_prepared : given.the_handler
It should_get_the_correct_customer = () => customers.TryGetAggregate(customer_name, out _).ShouldBeTrue();

It the_customer_should_have_only_eaten_second_dish_after_last_operation = () => customers.AfterLastOperationOn(customer_name).ShouldHaveEvent<DishEaten>()
.CountOf(1)
.First().AndThat(_ => _.Dish.ShouldEqual(second_dish.Dish));
.AndThat(_ => _.Dish.ShouldEqual(second_dish.Dish));

It the_customer_should_have_only_eaten_one_dish_after_last_operation = () => customers.AfterLastOperationOn(customer_name).ShouldHaveNumberOfEvents(1);

It the_customer_should_have_eaten_first_dish_first = () => customers.AssertThat(customer_name).ShouldHaveEvent<DishEaten>()
It the_customer_should_have_eaten_first_dish_first = () => customers.AssertThat(customer_name).ShouldHaveEvents<DishEaten>()
.AtBeginning()
.AndThat(_ => _.Dish.ShouldEqual(first_dish.Dish));

It the_customer_should_have_eaten_second_dish_last = () => customers.AssertThat(customer_name).ShouldHaveEvent<DishEaten>()
It the_customer_should_have_eaten_second_dish_last = () => customers.AssertThat(customer_name).ShouldHaveEvents<DishEaten>()
.AtEnd()
.AndThat(_ => _.Dish.ShouldEqual(second_dish.Dish));

Expand Down
8 changes: 4 additions & 4 deletions Samples/ASP.NET.Tests/ASP.NET.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0"/>
<PackageReference Include="xunit" Version="2.8.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0"/>
<PackageReference Include="xunit" Version="2.9.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion Samples/ASP.NET/ASP.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 5 additions & 5 deletions Samples/DependencyInjection/DependencyInjection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@


<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Lamar" Version="13.0.3" />
<PackageReference Include="Lamar.Microsoft.DependencyInjection" Version="13.0.3" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="Lamar" Version="13.0.4" />
<PackageReference Include="Lamar.Microsoft.DependencyInjection" Version="13.0.4" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="8.0.2" />
</ItemGroup>

<ItemGroup>
Expand Down
28 changes: 4 additions & 24 deletions Samples/Environment/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.1'
services:
mongo:
image: dolittle/mongodb
Expand All @@ -8,31 +7,12 @@ services:
ports:
- 27017:27017

runtime-basic:
image: dolittle/runtime:8.7.2
environment:
DOLITTLE__RUNTIME__EVENTSTORE__BACKWARDSCOMPATIBILITY__VERSION: "V7"
runtime:
image: dolittle/runtime:9.6.1
volumes:
- ./resources-basic.json:/app/.dolittle/resources.json
- ./tenants.json:/app/.dolittle/tenants.json
- ./microservices.json:/app/.dolittle/microservices.json
- ./event-horizon-consents.json:/app/.dolittle/event-horizon-consents.json
- ./runtime.yml:/app/.dolittle/runtime.yml
- ./appsettings.json:/app/appsettings.json
ports:
- 9700:9700
- 50052:50052
- 50053:50053

runtime-eventhorizon:
image: dolittle/runtime:8.7.2
environment:
DOLITTLE__RUNTIME__EVENTSTORE__BACKWARDSCOMPATIBILITY__VERSION: "V7"
volumes:
- ./resources-eventhorizon.json:/app/.dolittle/resources.json
- ./tenants.json:/app/.dolittle/tenants.json
- ./microservices.json:/app/.dolittle/microservices.json
- ./appsettings.json:/app/appsettings.json
ports:
- 9701:9700
- 50054:50052
- 50055:50053
- 50053:50053
11 changes: 0 additions & 11 deletions Samples/Environment/event-horizon-consents.json

This file was deleted.

10 changes: 0 additions & 10 deletions Samples/Environment/microservices.json

This file was deleted.

10 changes: 0 additions & 10 deletions Samples/Environment/resources-basic.json

This file was deleted.

10 changes: 0 additions & 10 deletions Samples/Environment/resources-eventhorizon.json

This file was deleted.

11 changes: 11 additions & 0 deletions Samples/Environment/runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
tenants:
900893e7-c4cc-4873-8032-884e965e4b97:
resources:
eventStore:
connectionString: mongodb://mongo:27017
database: "event_store"
useSSL: false
readModels:
connectionString: mongodb://localhost:27017
database: "readmodels"
useSSL: false
3 changes: 0 additions & 3 deletions Samples/Environment/tenants.json

This file was deleted.

2 changes: 1 addition & 1 deletion Samples/Tutorials/EventHorizon/Consumer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.FromProducerMicroservice("f39b1f61-d360-4675-b859-53c05c87c0e6")
.FromProducerTenant(TenantId.Development)
.FromProducerStream("2c087657-b318-40b1-ae92-a400de44e507")
.FromProducerPartition("Dolittle Tacos")
.FromProducerPartition(Guid.Empty)
.ToScope("808ddde4-c937-4f5c-9dc2-140580f6919e"))
)
.WithEventHandlers(_ => _
Expand Down
10 changes: 0 additions & 10 deletions Samples/Tutorials/EventHorizon/Environment/consumer-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ tenants:
servers:
- mongo
database: "consumer_event_store"
projections:
servers:
- mongo
database: "consumer_projections"
maxConnectionPoolSize: 1000
embeddings:
servers:
- mongo
database: "consumer_embeddings"
maxConnectionPoolSize: 1000
readModels:
host: "mongodb://localhost:27017"
database: "consumer_readmodels"
Expand Down
8 changes: 2 additions & 6 deletions Samples/Tutorials/EventHorizon/Environment/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,15 @@ services:
driver: none

consumer-runtime:
image: dolittle/runtime:8.9.1
environment:
- "DOLITTLE__RUNTIME__EVENTSTORE__BACKWARDSCOMPATIBILITY__VERSION=V7"
image: dolittle/runtime:9.6.1
volumes:
- ./consumer-runtime.yml:/app/.dolittle/runtime.yml
ports:
- 50054:50052
- 50055:50053

producer-runtime:
image: dolittle/runtime:8.9.1
environment:
- "DOLITTLE__RUNTIME__EVENTSTORE__BACKWARDSCOMPATIBILITY__VERSION=V7"
image: dolittle/runtime:9.6.1
volumes:
- ./producer-runtime.yml:/app/.dolittle/runtime.yml
ports:
Expand Down
10 changes: 0 additions & 10 deletions Samples/Tutorials/EventHorizon/Environment/producer-runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ tenants:
servers:
- mongo
database: "producer_event_store"
projections:
servers:
- mongo
database: "producer_projections"
maxConnectionPoolSize: 1000
embeddings:
servers:
- mongo
database: "producer_embeddings"
maxConnectionPoolSize: 1000
readModels:
host: "mongodb://localhost:27017"
database: "producer_readmodels"
Expand Down
10 changes: 5 additions & 5 deletions Samples/Tutorials/EventHorizon/Producer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
.Handle((@event, eventContext) =>
{
Console.WriteLine($"Filtering event {@event} to public streams");
return Task.FromResult(new PartitionedFilterResult(true, eventContext.EventSourceId.Value));
return Task.FromResult(new PartitionedFilterResult(true, Guid.Empty));
})))
.Build();

await host.StartAsync();

var client = await host.GetDolittleClient();
var preparedTaco = new DishPrepared("Bean Blaster Taco", "Mr. Taco");
await client.EventStore
.ForTenant(TenantId.Development)
.CommitPublicEvent(preparedTaco, "Dolittle Tacos");
var preparedTaco = new DishPrepared("Bean Blaster Taco", "Mr. Taco");
await client.EventStore
.ForTenant(TenantId.Development)
.CommitPublicEvent(preparedTaco, "Dolittle Tacos");

await host.WaitForShutdownAsync();
2 changes: 1 addition & 1 deletion Source/Aggregates/Aggregates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftAbstractionsVersion)" />
<PackageReference Include="Proto.Cluster" Version="$(ProtoActorVersion)" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion Source/Artifacts/Artifacts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftAbstractionsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Source/Common/Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftExtensionsVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="$(MicrosoftAbstractionsVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading
Loading