AspNetCore.Diagnostics.HealthChecks
AspNetCore.Diagnostics.HealthChecks copied to clipboard
Event Store V2021 Package Support
Hello, have you discussed plans to support an upgrade from Event Store V5 to V2021 (previously called V6)? Sadly, the health checks don't work when connecting to an ES2021 server (at least not in my tests on a Windows dev machine, or in a Docker-Linux setup).
I'd be happy to try and contribute, but I'm not sure if this has been discussed, or what the implications would be (potentially a separate library would be needed, one per version)?
Cheers
HealthChecks.EventStore
package references EventStore.Client
v21.2.2 . This is the last release version of that package on Nuget: https://www.nuget.org/packages/EventStore.Client/21.2.2
What is Event Store V5 to V2021 ?
Hi @sungam3r thanks for getting back to me. You're right that the NuGet package is on the latest version, but the default authentication strategy for Event Store changed with their v2021 versioning, with it enabled by default. The current connection approach in EventStoreHealthCheck.cs
works for the older versions only if they do not have advanced authentication enabled (e.g. SSL).
For the latest API version there are two builder methods required for a connection attempt to work for the default scenario where basic authentication is enabled (though it obviously depends how the server is configured):
-
connectionSettings.SetCompatibilityMode("auto");
- this is documented here. -
connectionSettings.DisableTls();
- this is documented here but is a replacement for older methods for using SSL (now the default option).
I've managed to get my connection working by adding these two methods to the connectionSettings
builder in EventStoreHealthCheck.cs
, and I'm happy to submit a PR if you're open to that? The DisableTls()
option is potentially trickier, as I suspect you'd want this passed into the constructor of EventStoreHealthCheck
as an optional argument, in case people don't want to invoke that?
What do you reckon?
I'm OK to review PR if you have a plan. If you want to incorporate new options/behavior then I would suggest to add new ctor with new class like EventStoreOptions
+ add new extension method with Action<EventStoreOptions>
like for many other checks, for example, ConsulHealthCheckBuilderExtensions
. Also note that Event Store has no configured CI/CD - #938 .
ping @jimmyheaddon
@jimmyheaddon I expect issue was fixed in #988.