-
Notifications
You must be signed in to change notification settings - Fork 694
WaitFor: Add health checks for Qdrant #5767
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
Conversation
ConnectionString = connectionString | ||
}; | ||
|
||
if (connectionBuilder.ContainsKey("Endpoint") && Uri.TryCreate(connectionBuilder["Endpoint"].ToString(), UriKind.Absolute, out var serviceUri)) |
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 know this hasn't been done anywhere else but maybe we could start using TryGetValue
to save a lookup. Aspire will be so much faster after that ;)
if (connectionBuilder.ContainsKey("Endpoint") && Uri.TryCreate(connectionBuilder["Endpoint"].ToString(), UriKind.Absolute, out var serviceUri)) | |
if (connectionBuilder.TryGetValue("Endpoint", out var endpoint) && Uri.TryCreate(endpoint.ToString(), UriKind.Absolute, out var serviceUri)) |
var factory = sp.GetRequiredService<IHttpClientFactory>(); | ||
var client = factory.CreateClient(); | ||
client.BaseAddress = endpoint; | ||
if (key is not null) |
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 it technically possible that this client has any default headers coming from other configuration?
if (key is not null) | |
if (key is not null && !client.DefaultRequestHeaders.Contains("Api-Key")) |
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 used named clients, so we don't need this.
Digging a little more into the builder.Services.AddHttpClient(
"qdrant-healthchecks",
client =>
{
// Set the base address of the named client.
client.BaseAddress = ...;
client.DefaultRequestHeaders.Add("Api-Key", ...)
}); |
We haven't base address before application start, so we can't use |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
@Alirexaa we are looking to snap a branch for .NET Aspire 9.0 at the end of this week? Did you have a chance to look at @davidfowl's feedback on http factory? |
} | ||
|
||
var factory = sp.GetRequiredService<IHttpClientFactory>(); | ||
var client = factory.CreateClient("qdrant-healthchecks"); |
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.
Please make sure that this works with multiple Qdrant instances.
I will look. |
Replacing with #6044 with a few minor tweaks. I couldn't push to your branch for some reason. |
Description
Adds
WaitFor
support for QdrantRelated: #5645
Checklist
<remarks />
and<code />
elements on your triple slash comments?Microsoft Reviewers: Open in CodeFlow