Skip to content

Remove mature feature flags that no longer need toggles#15075

Merged
mitchdenny merged 3 commits intorelease/13.2from
remove-feature-flags
Mar 9, 2026
Merged

Remove mature feature flags that no longer need toggles#15075
mitchdenny merged 3 commits intorelease/13.2from
remove-feature-flags

Conversation

@mitchdenny
Copy link
Member

Description

Audits CLI feature flags per #14966 and removes four mature flags that no longer need user-facing toggles. All four were default-true and served only as emergency escape hatches for stable functionality:

  • minimumSdkCheckEnabled — SDK version check now always runs (stable 7+ months)
  • orphanDetectionWithTimestampEnabled — Process timestamp always set for orphan detection (zero-cost robustness)
  • runningInstanceDetectionEnabled — Running instance detection always active (stable since Dec 2025)
  • packageSearchDiskCachingEnabled — Disk caching for package search always used (purely beneficial)

The gated behaviors are now unconditional. IFeatures parameters were removed from DotNetSdkInstaller, DotNetCliExecutionFactory, and AppHostLauncher where they were only used for the removed flags.

The remaining 10 feature flags are kept as they still serve active purposes (user preferences, unreleased features, experimental polyglot languages).

Follows the precedent of dotnetSdkInstallationEnabled removal in #14811.

Fixes #14966

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

Remove four feature flags that have been stable and always-on (default: true)
for months, making their escape-hatch toggle unnecessary:

- minimumSdkCheckEnabled: SDK version check always runs (stable 7+ months)
- orphanDetectionWithTimestampEnabled: timestamp always set (zero-cost robustness)
- runningInstanceDetectionEnabled: instance detection always active (stable since Dec 2025)
- packageSearchDiskCachingEnabled: disk caching always used (purely beneficial)

The gated behaviors are now unconditional. IFeatures parameters removed from
DotNetSdkInstaller, DotNetCliExecutionFactory, and AppHostLauncher where they
were only used for the removed flags.

Fixes #14966

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 9, 2026 19:27
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15075

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15075"

@mitchdenny
Copy link
Member Author

/deployment-test

@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

🚀 Deployment tests starting on PR #15075...

This will deploy to real Azure infrastructure. Results will be posted here when complete.

View workflow run

@mitchdenny mitchdenny requested a review from eerhardt March 9, 2026 19:27
@mitchdenny mitchdenny added this to the 13.2 milestone Mar 9, 2026
Copy link
Contributor

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

Removes four mature, default-on CLI feature flags (minimum SDK check, timestamp-based orphan detection, running-instance detection, and package-search disk caching) by making their behaviors unconditional and pruning related plumbing across the CLI, VS Code schemas, and tests.

Changes:

  • Removed the four flags from KnownFeatures metadata and the VS Code settings schemas.
  • Simplified several CLI components by removing IFeatures gating and making the previously-flagged behaviors always-on.
  • Updated CLI unit tests to reflect the removed flags and new constructor signatures.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/Aspire.Cli.Tests/DotNetSdkInstallerTests.cs Updates tests for DotNetSdkInstaller ctor change and removes tests covering the deleted minimum SDK check flag behavior.
tests/Aspire.Cli.Tests/Commands/RunCommandTests.cs Removes a test that asserted behavior tied to the deleted running-instance detection flag.
src/Aspire.Cli/KnownFeatures.cs Deletes the four feature flag definitions and their metadata entries.
src/Aspire.Cli/DotNet/DotNetSdkInstaller.cs Removes IFeatures gating; SDK minimum check is now always performed.
src/Aspire.Cli/DotNet/DotNetCliRunner.cs Removes flag gating so package-search disk caching follows useCache only.
src/Aspire.Cli/DotNet/DotNetCliExecutionFactory.cs Always sets CliProcessStarted env var for orphan detection and removes IFeatures dependency.
src/Aspire.Cli/Commands/RunCommand.cs Always performs running-instance detection/stop logic (previously gated).
src/Aspire.Cli/Commands/AppHostLauncher.cs Always stops existing instances in detached launch mode; removes IFeatures dependency.
src/Aspire.Cli/Commands/AddCommand.cs Always stops running instances before modifying project files (previously gated).
extension/schemas/aspire-settings.schema.json Removes the four settings from the workspace settings schema.
extension/schemas/aspire-global-settings.schema.json Removes the four settings from the global settings schema.

@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot had a problem deploying to deployment-testing March 9, 2026 19:33 Failure
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions github-actions bot temporarily deployed to deployment-testing March 9, 2026 19:33 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

🎬 CLI E2E Test Recordings

The following terminal recordings are available for commit 01a8953:

Test Recording
AddPackageInteractiveWhileAppHostRunningDetached ▶️ View Recording
AddPackageWhileAppHostRunningDetached ▶️ View Recording
AgentCommands_AllHelpOutputs_AreCorrect ▶️ View Recording
AgentInitCommand_DefaultSelection_InstallsSkillOnly ▶️ View Recording
AgentInitCommand_MigratesDeprecatedConfig ▶️ View Recording
AspireAddPackageVersionToDirectoryPackagesProps ▶️ View Recording
AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps ▶️ View Recording
Banner_DisplayedOnFirstRun ▶️ View Recording
Banner_DisplayedWithExplicitFlag ▶️ View Recording
CreateAndDeployToDockerCompose ▶️ View Recording
CreateAndDeployToDockerComposeInteractive ▶️ View Recording
CreateAndPublishToKubernetes ▶️ View Recording
CreateAndRunAspireStarterProject ▶️ View Recording
CreateAndRunAspireStarterProjectWithBundle ▶️ View Recording
CreateAndRunJsReactProject ▶️ View Recording
CreateAndRunPythonReactProject ▶️ View Recording
CreateAndRunTypeScriptStarterProject ▶️ View Recording
CreateEmptyAppHostProject ▶️ View Recording
CreateStartAndStopAspireProject ▶️ View Recording
CreateStartWaitAndStopAspireProject ▶️ View Recording
CreateTypeScriptAppHostWithViteApp ▶️ View Recording
DescribeCommandResolvesReplicaNames ▶️ View Recording
DescribeCommandShowsRunningResources ▶️ View Recording
DetachFormatJsonProducesValidJson ▶️ View Recording
DoctorCommand_DetectsDeprecatedAgentConfig ▶️ View Recording
DoctorCommand_WithSslCertDir_ShowsTrusted ▶️ View Recording
DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted ▶️ View Recording
LogsCommandShowsResourceLogs ▶️ View Recording
PsCommandListsRunningAppHost ▶️ View Recording
PsFormatJsonOutputsOnlyJsonToStdout ▶️ View Recording
RestoreGeneratesSdkFiles ▶️ View Recording
SecretCrudOnDotNetAppHost ▶️ View Recording
SecretCrudOnTypeScriptAppHost ▶️ View Recording
StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels ▶️ View Recording
StopAllAppHostsFromAppHostDirectory ▶️ View Recording
StopAllAppHostsFromUnrelatedDirectory ▶️ View Recording
StopNonInteractiveMultipleAppHostsShowsError ❌ Upload failed
StopNonInteractiveSingleAppHost ▶️ View Recording
StopWithNoRunningAppHostExitsSuccessfully ❌ Upload failed
TypeScriptAppHostWithProjectReferenceIntegration ▶️ View Recording

📹 Recordings uploaded automatically from CI run #22877378575

var runningInstanceDetectionEnabled = _features.IsFeatureEnabled(KnownFeatures.RunningInstanceDetectionEnabled, defaultValue: true);
// Force option kept for backward compatibility but no longer used since prompt was removed
// var force = runningInstanceDetectionEnabled && parseResult.GetValue<bool>("--force");
// var force = parseResult.GetValue<bool>("--force");
Copy link
Member

Choose a reason for hiding this comment

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

Can this whole line be removed?

Comment on lines 922 to 923
bool cacheEnabled = useCache;
if (cacheEnabled)
Copy link
Member

Choose a reason for hiding this comment

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

(nit)

Suggested change
bool cacheEnabled = useCache;
if (cacheEnabled)
if (useCache)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mitchdenny mitchdenny enabled auto-merge (squash) March 9, 2026 22:05
The 30-second timeout must cover both dotnet new project creation and the
agent-init prompt appearing. In CI under load (e.g., KinD cluster running),
dotnet new alone can exceed 30 seconds, causing a WaitUntilTimeoutException.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mitchdenny mitchdenny requested a review from radical as a code owner March 9, 2026 22:18
@mitchdenny mitchdenny merged commit e40adf7 into release/13.2 Mar 9, 2026
378 of 379 checks passed
@mitchdenny mitchdenny deleted the remove-feature-flags branch March 9, 2026 22:51
@dotnet-policy-service dotnet-policy-service bot modified the milestone: 13.2 Mar 9, 2026
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
* Remove mature feature flags that no longer need toggles

Remove four feature flags that have been stable and always-on (default: true)
for months, making their escape-hatch toggle unnecessary:

- minimumSdkCheckEnabled: SDK version check always runs (stable 7+ months)
- orphanDetectionWithTimestampEnabled: timestamp always set (zero-cost robustness)
- runningInstanceDetectionEnabled: instance detection always active (stable since Dec 2025)
- packageSearchDiskCachingEnabled: disk caching always used (purely beneficial)

The gated behaviors are now unconditional. IFeatures parameters removed from
DotNetSdkInstaller, DotNetCliExecutionFactory, and AppHostLauncher where they
were only used for the removed flags.

Fixes #14966

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review feedback: remove dead comment, simplify cache check

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Mitch Denny <mitch@mitchdeny.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants