-
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
WIP: Add Marten Client #60
Conversation
@aaronpowell, for testing clients we should have copy of https://github.com/dotnet/aspire/blob/f2c016d81420aef66c1a9c994b670367d1a3e54c/tests/Aspire.Components.Common.Tests/ConformanceTests.cs |
Dang, I just deleted the What additional dependencies/types are needed for that base test class? |
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.
We need to have an example project that uses this integration, and I think it would make sense to use that within the integration tests rather than having to simulate a client.
|
||
namespace CommunityToolkit.Aspire.Marten.Tests; | ||
|
||
public class AspireMartenClientExtensionsTest(PostgreSQLContainerFixture containerFixture) : IClassFixture<PostgreSQLContainerFixture> |
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.
Would we be better creating an example app host that has a Postgres resource in it that is provided to the client that is using Marten, and then have the tests run that whole stack rather than trying to completely emulate just a client in the test?
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.
We have not enogh tests.
I want to add more funtional tests.
Example project is one of those.
@jeremydmiller, We are adding Marten integration to the aspire via the community toolkit. |
@@ -0,0 +1,3 @@ | |||
using System.Diagnostics.CodeAnalysis; | |||
|
|||
[assembly: Experimental("CTASPIREMARTEN001", UrlFormat = "https://aka.ms/dotnet/aspire/diagnostics#{0}")] |
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 think we'd be better putting this on the extension methods rather than at the assembly as a whole.
For the link, can you use https://aka.ms/communitytoolkit/aspire/diagnostics#{0}
as that'll take them to our docs on what the code means.
Also, to we need to document that code in the docs/diagnostics.md
file.
Minimum allowed line rate is |
Oh, guys, I'm sorry, but I'm not enthusiastic about this at all. Marten can happily work with a single connection brought in through the existing Aspire Npgsql integration, and I'd planned to leave it at that. I get that having the recipe to add health checks and Otel wired up would be nice, but I'd rather have that in a package controlled by Marten itself than over to the side where this all will likely break. I'm admittedly not very enthusiastic about Aspire in general anyway, but I really don't like how this eliminates a lot of important features for Marten and the Marten/Wolverine integration. |
Thanks for taking the time to have a look @jeremydmiller and reply. Given you don't have a desire for an Aspire integration for Marten I'll go ahead and close this PR. |
Closes #58
This pull request includes several changes to the
Aspire.CommunityToolkit.sln
solution and introduces a new project for Marten integration. The most important changes include updating project GUIDs, adding new package references, and implementing Marten client configuration and health checks.Solution File Updates:
Aspire.CommunityToolkit.sln
. [1] [2]Aspire.CommunityToolkit.Marten
project to the solution. [1] [2]Package References:
AspNetCore.HealthChecks.NpgSql
andMarten
package references inDirectory.Packages.props
. [1] [2]New Project for Marten Integration:
Aspire.CommunityToolkit.Marten.csproj
with necessary package references and file links.MartenApplicationBuilderExtensions
to configure Marten clients and health checks.MartenSettings
class to manage Marten client configuration settings.Miscellaneous:
DocsPath
inDirectory.Build.props
to point toREADME.md
. [1] [2]HealthChecksExtensions
to support conditional health check registration.PR Checklist
one thing we should consider is
NpgsqlDataSource
registration should not make conflict with otherNpgsqlDataSource
instance. (for instanceNpgsqlDataSource
registration inAspire.NpgSql
)Other information