Repository navigation
Capture KurrentDB version during service registration - #769
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 20 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a7b127aaa4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| request.Headers.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(credentials))); | ||
| } | ||
|
|
||
| using var response = await httpClientFactory.CreateClient().SendAsync(request, timeoutSource.Token); |
There was a problem hiding this comment.
Honor disabled certificate verification in the version probe
When a TLS KurrentDB connection relies on tlsVerifyCert=false in its connection string or IgnoreCertificateErrors to accept a self-signed/internal certificate, the KurrentDB client can connect successfully, but this default HttpClient still performs normal certificate validation. The /info request therefore fails and the resolver falls back, leaving a newly registered service without an automatically captured version despite its connection being valid; configure the HTTP handler consistently with the service's certificate-verification settings.
Useful? React with 👍 / 👎.
Summary\n- Query the KurrentDB /info endpoint during registration and initialization.\n- Normalize the reported version and preserve registration when version lookup fails.\n- Make client-side registration failures non-throwing: log the failure and return null; preserve cancellation propagation.\n- Add coverage for parsing, HTTP requests, fallback behavior, initialization registration, and client failure handling.\n\n## Verification\n- dotnet test HealthMonitoring/HealthMonitoring.Tests/HealthMonitoring.Tests.csproj - 65 passed\n- dotnet build HealthMonitoring/HealthMonitoring.Client/HealthMonitoring.Client.csproj - 0 warnings, 0 errors\n\nCloses #759