Skip to content

Handle AppHost path config guardrails#16467

Draft
adamint wants to merge 6 commits intomicrosoft:mainfrom
adamint:dev/adamint/issue15490-apphost-path-config
Draft

Handle AppHost path config guardrails#16467
adamint wants to merge 6 commits intomicrosoft:mainfrom
adamint:dev/adamint/issue15490-apphost-path-config

Conversation

@adamint
Copy link
Copy Markdown
Member

@adamint adamint commented Apr 25, 2026

Description

Warns when global settings contain an AppHost path, rejects user attempts to set AppHost paths through aspire config set, and hides the legacy flat appHostPath setting from generated settings schemas while keeping CLI-managed aspire.config.json appHost.path valid.

Also updates the extension schema generator and config-info TypeScript types to consume the camelCase JSON emitted by aspire config info --json.

Fixes #15490

Validation:

  • dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class "*.AppHostPathConfigurationPolicyTests" --filter-class "*.ConfigCommandTests" --filter-class "*.SettingsSchemaBuilderTests" --filter-class "*.ProgramTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
  • dotnet test --project tests/Aspire.Cli.Tests/Aspire.Cli.Tests.csproj --no-launch-profile -- --filter-class "*.ConfigurationServiceTests" --filter-class "*.ConfigurationHelperTests" --filter-class "*.AspireConfigFileTests" --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"
  • dotnet build /t:UpdateXlf src/Aspire.Cli/Aspire.Cli.csproj
  • ./build.sh --build /p:SkipNativeBuild=true
  • node extension/scripts/generate-schema.js
  • npx tsc -p tsconfig.json --noEmit from extension/
  • CLI smoke checks for blocked AppHost path config keys and schema shape

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?

adamint and others added 6 commits April 25, 2026 12:47
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

🚀 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/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 16467

Or

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI should warn when apphost path is set in global settings, disallow setting it via aspire config, and remove that property from the schema

1 participant