Put DeployCommand behind a feature flag#10613
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements feature flag gating for the DeployCommand in the Aspire CLI. The deploy command is now hidden behind a feature flag (deployCommandEnabled) that defaults to false, preventing users from accessing the command until a built-in deployer is available.
- Added a new feature flag
DeployCommandEnabledto control deploy command visibility - Updated RootCommand to conditionally add the deploy command based on the feature flag
- Modified all existing deploy command tests to enable the feature flag
- Added new tests to verify the feature flag behavior
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Aspire.Cli/KnownFeatures.cs | Added DeployCommandEnabled feature flag constant |
| src/Aspire.Cli/Commands/RootCommand.cs | Added conditional logic to only register deploy command when feature flag is enabled |
| tests/Aspire.Cli.Tests/Commands/DeployCommandTests.cs | Updated all test methods to enable the feature flag and added tests for feature flag behavior |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@joperezr @mitchdenny Can I get reviews/help merging this in? |
|
/backport to release/9.4 |
|
Started backporting to release/9.4: https://github.com/dotnet/aspire/actions/runs/16460221301 |
|
@mitchdenny backporting to "release/9.4" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Put DeployCommand behind a feature flag
Using index info to reconstruct a base tree...
M src/Aspire.Cli/Commands/RootCommand.cs
M src/Aspire.Cli/KnownFeatures.cs
M tests/Aspire.Cli.Tests/Commands/DeployCommandTests.cs
Falling back to patching base and 3-way merge...
Auto-merging tests/Aspire.Cli.Tests/Commands/DeployCommandTests.cs
CONFLICT (content): Merge conflict in tests/Aspire.Cli.Tests/Commands/DeployCommandTests.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Put DeployCommand behind a feature flag
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@mitchdenny this is in 9.4 only. |
|
Yeah just realized. I was looking at main thinking - why isn't that PR there :) |
Put the DeployCommand behind a feature flag until a built-in deployer is available.