-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add EventStore Hosting and Client integrations #277
Add EventStore Hosting and Client integrations #277
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see tests for the client integration, only the hosting, I assume that they are still to come
src/CommunityToolkit.Aspire.Hosting.EventStore/EventStoreBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.EventStore/EventStoreBuilderExtensions.cs
Show resolved
Hide resolved
tests/CommunityToolkit.Aspire.Hosting.EventStore.Tests/AppHostTests.cs
Outdated
Show resolved
Hide resolved
tests/CommunityToolkit.Aspire.Hosting.EventStore.Tests/AppHostTests.cs
Outdated
Show resolved
Hide resolved
tests/CommunityToolkit.Aspire.Hosting.EventStore.Tests/AppHostTests.cs
Outdated
Show resolved
Hide resolved
tests/CommunityToolkit.Aspire.Hosting.EventStore.Tests/AppHostTests.cs
Outdated
Show resolved
Hide resolved
tests/CommunityToolkit.Aspire.Hosting.EventStore.Tests/EventStorePublicApiTests.cs
Outdated
Show resolved
Hide resolved
Addressed in this commit: 8fc728b |
c91cf2c
to
1302216
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good @fredimachado
I've kicked off a build, once it's clean we can look to merge it in.
You should also have an invite to the contributor team (which will sort out the CODEOWNERS)
src/CommunityToolkit.Aspire.EventStore/AspireEventStoreExtensions.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Aspire.Hosting.EventStore/EventStoreBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
tests/CommunityToolkit.Aspire.EventStore.Tests/ConformanceTests.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides of suggested change totally LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed tests and did not see tests around persistence and health check functionality.
Could you add these tests?
there are some examples at
https://github.com/CommunityToolkit/Aspire/blob/main/tests/CommunityToolkit.Aspire.Hosting.Meilisearch/MeilisearchFunctionalTests.cs
I thought AppHostTests would also count as persistence tests, since it uses the example API to append and then read events from EventStore. |
AppHost does not stop across tests. So it's not enough for all cases. |
All good. I added the functional tests based on the Meilisearch ones. d78ff8f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with how it's looking with the extra tests, but I'll defer to @Alirexaa for final say
d78ff8f
to
2daf3c8
Compare
@Alirexaa I removed the Log volume/mount since it's probably not going to be used often, and we can always use |
@aaronpowell I noticed the SWA example test is stuck during the build's Test step.
|
It looks like we have a test that is hanging and causing the Linux runner to time out after several hours. Assuming that these tests pass locally, this is going to be a fun one to try and resolve 🤣. Comparing the test results artifacts between Windows and Linux the only missing TRX file is the The most likely candidates for the issue is going to be the tests in the Here's the steps I'd go through to try and resolve it:
Once you know what test is the problematic one, we'll be able to help diagnose the underlying problem. |
All good, thanks for the suggestions. I'll try it. |
Unfortunately, this isn't the first time I've seen runners hang 🤣 |
Well, looks like we found where the tests are that are the problem |
It seems the we had to change permissions for the data bind mount to work on the Ubuntu build. |
That's interesting, wonder why... |
Just waiting for another review from @Alirexaa and it should be good to go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fredimachado Please take a look at my comments.
Otherwise LGTM
@@ -120,16 +131,18 @@ public async Task WithDataShouldPersistStateBetweenUsages(bool useVolume) | |||
} | |||
else | |||
{ | |||
//EventStore shutdown can be slightly delayed, so second instance might fail to start when using the same bind mount before shutdown. | |||
await Task.Delay(TimeSpan.FromSeconds(5)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could incur flakiness.
Related dotnet/aspire#4878
@@ -191,7 +204,7 @@ public async Task VerifyWaitForEventStoreBlocksDependentResources() | |||
var resource = builder.AddEventStore("resource") | |||
.WithHealthCheck("blocking_check"); | |||
|
|||
var dependentResource = builder.AddEventStore("dependentresource") | |||
var dependentResource = builder.AddContainer("nginx", "mcr.microsoft.com/cbl-mariner/base/nginx", "1.22") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a light (meaning small image size and fast startup) container image?
If it is we could use this image for dependent resources in health check tests like this test to speed up our tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, I used this specifically because it's lightweight and fast to start.
I've seen usages of this image for the same purpose in the main Aspire repo.
@aaronpowell, CodeQL is blocking me to merge PR. |
Grr, I need to find out why that happens |
Thanks @aaronpowell and @Alirexaa for your support. |
Closes #236
This pull request includes several updates to the Aspire CommunityToolkit including new projects for EventStore Hosting and Client integrations, a simple "bank account" example project, tests and updates to dependencies.
Project Additions and Updates:
Added new EventStore projects to the solution, including
Aspire.CommunityToolkit.Hosting.EventStore
,Aspire.CommunityToolkit.EventStore
, and their respective test and example projects.Dependency Updates:
Added new dependencies in
Directory.Packages.props
, includingAspNetCore.HealthChecks.EventStore.gRPC
,EventStore.Client.Extensions.OpenTelemetry
, andEventStore.Client.Grpc.Streams
. (Directory.Packages.props
) [1]Code Ownership:
Updated the CODEOWNERS file to include new EventStore projects and assigned ownership to @fredimachado. (CODEOWNERS)
New Example Project:
Added a simple "bank account" example project for EventStore service. (examples/eventstore/Aspire.CommunityToolkit.Hosting.EventStore.ApiService) [1]
PR Checklist
Other information
Docs PR: dotnet/docs-aspire#2143