-
Notifications
You must be signed in to change notification settings - Fork 658
fix: aspire exec
fail fast improvements
#10606
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
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.
Pull Request Overview
This PR modifies the aspire exec
command to validate required arguments (specifically the --resource
parameter) before attempting to locate the AppHost project, ensuring faster failure when user input is invalid.
Key changes:
- Moves argument validation logic earlier in the execution flow to fail fast on invalid input
- Adds a test to verify the new fail-fast behavior with a timeout assertion
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/Aspire.Cli/Commands/ExecCommand.cs | Moves target resource and command token validation to occur before project location and build operations |
tests/Aspire.Cli.Tests/Commands/ExecCommandTests.cs | Adds test case to verify fast failure when --resource is not specified |
aspire exec
should fail fast if --resource not specifiedaspire exec
fail fast improvements
Description
Instead of searching for apphost project,
aspire exec
should firstly validate all arguments to fail fast if something is wrong with the user input.Also if no command is passed, aspire exec should report that
Fixes #10591
Fixes #10592