microsoft / microsoft/aspire

ExternalServiceResource should implement IResourceWithEndpoints

Open
#11,428 4 comments 2 reactions 0 assignees View on GitHub
area-app-model
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Is your feature request related to a problem? Please describe the problem.

#2311 added external endpoint resources to Aspire 9.4.
However `ExternalServiceResource` only implements `IResourceWithoutLifetime`, not `IResourceWithEndpoints`.
Because of this, it needs its own implementation of `WithHttpHealthCheck(...)` and cannot rely on the extension method defined in `ExternalServiceBuilderExtensions`.

### Describe the solution you'd like

`ExternalServiceResource` should implement `IResourceWithEndpoints`.

### Additional context

I created a small extension which works on adding health checks using the one defined in `ExternalServiceBuilderExtensions` (https://github.com/dotnet/aspire/issues/5420#issuecomment-3145289323).
However this does not work for `ExternalServiceResource`, because it does not implement the interface.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.