Skip to content

Conversation

captainsafia
Copy link
Member

Put the DeployCommand behind a feature flag until a built-in deployer is available.

@Copilot Copilot AI review requested due to automatic review settings July 22, 2025 23:48
Copy link
Contributor

@Copilot Copilot AI left a 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 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 DeployCommandEnabled to 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

captainsafia and others added 2 commits July 22, 2025 16:50
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@captainsafia
Copy link
Member Author

@joperezr @mitchdenny Can I get reviews/help merging this in?

Copy link
Member

@mitchdenny mitchdenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mitchdenny mitchdenny merged commit e9c53d2 into release/9.4 Jul 23, 2025
255 checks passed
@mitchdenny mitchdenny deleted the safia/ff-deploy branch July 23, 2025 02:41
@mitchdenny
Copy link
Member

/backport to release/9.4

@github-actions
Copy link
Contributor

Started backporting to release/9.4: https://github.com/dotnet/aspire/actions/runs/16460221301

@github-actions
Copy link
Contributor

@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 128

Please backport manually!

@davidfowl
Copy link
Member

@mitchdenny this is in 9.4 only.

@mitchdenny
Copy link
Member

Yeah just realized. I was looking at main thinking - why isn't that PR there :)

@github-actions github-actions bot locked and limited conversation to collaborators Aug 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants