-
Notifications
You must be signed in to change notification settings - Fork 703
Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
Currently, required executable validation is implemented specifically in RequiredCommandValidator, which is closely tied to certain resources that launch processes. However, there are scenarios where a resource (not just an executable resource) may need to declare that certain software is installed and available on the local machine PATH before it can start. There is no generic way for resources to express such requirements, and for the orchestrator to enforce them before starting the resource.
Describe the solution you'd like
Generalize the required command validation logic so that any resource can declare, via annotations, the executables or software it requires to be installed and available on the PATH. The orchestrator should process these annotations in BeforeResourceStart, resolving and checking that the required software is installed before starting the resource. This would involve:
- Defining a standard annotation format for declaring required commands/software on resources.
- Refactoring the logic in
RequiredCommandValidatorto a reusable, generic component. - Integrating this validation into the orchestrator's lifecycle, so checks happen before resource start.
- Ensuring that this is not limited to just executable resources, but can be used by any resource type that needs local software preconditions.
This would make resource requirements more declarative and improve startup reliability for applications with external dependencies.
Additional context
This is a common pattern for executable resources but can apply more broadly. The feature would make Aspire applications more robust and easier to configure, especially for advanced scenarios or custom resources.