Repository navigation
[release/17.0] Fix Visual Studio debugging for Azure Functions projects - #22401
Jose Perez Rodriguez (joperezr) merged 7 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 22401Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22401" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
An out-of-scope extensionEndpoint prevents test-project compilation, while incorrect launch-type assertions and a resolver regression that drops launch-profile arguments also remain.
5 open issues
Undefined extensionEndpoint prevents the test project from compiling · New Preserve profile arguments for custom project types · New Mark the test as an extension session and use its endpoint parameter · New Azure Functions expectation mismatches the MAUI launch type · New Expect the declared MAUI annotation, not project · New
What changed in this PR
Backports #22346 to release/17.0 to restore Visual Studio debugging for Azure Functions projects through Aspire’s native project launcher.
Changes:
- Centralizes IDE launch decisions while preserving extension-advertised capabilities.
- Preserves Azure Functions launch-profile arguments during compatibility launches.
- Updates launch metadata handling, documentation, and regression tests.
| File | Description |
|---|---|
tests/Aspire.Hosting.Tests/DebugSupportExtensionsTests.cs |
Tests effective launch types and compatibility restrictions. |
tests/Aspire.Hosting.Tests/Dcp/ResourceSnapshotBuilderTests.cs |
Tests IDE metadata and sensitive argument handling. |
tests/Aspire.Hosting.Tests/Dcp/ExecutableLaunchPlanTests.cs |
Checks launch-tool argument retention during compatibility launches. |
tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs |
Adds launch-routing and Azure Functions argument scenarios. |
tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj |
References the Azure Functions integration for testing. |
src/Aspire.Hosting/SupportsDebuggingAnnotation.cs |
Marks synthesized compatibility annotations and documents their behavior. |
src/Aspire.Hosting/ResourceBuilderExtensions.cs |
Clarifies launch-tool argument ownership in documentation. |
src/Aspire.Hosting/Dcp/ResourceSnapshotBuilder.cs |
Restricts native project metadata to suitable IDE launches. |
src/Aspire.Hosting/Dcp/ExecutableLaunchPolicy.cs |
Uses the shared effective debug-support decision. |
src/Aspire.Hosting/ApplicationModel/ExecutableLaunchRecipe.cs |
Preserves profile arguments for Azure Functions compatibility launches. |
src/Aspire.Hosting/ApplicationModel/DebugSupportExtensions.cs |
Implements shared launch selection and compatibility rules. |
Review effort: Max
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🔵 Needs a closer look
The release backport changes core IDE launch routing and public SupportsDebugging semantics, requiring human servicing review given missing VS/VS Code runtime validation and empty shiproom impact, testing, and risk sections.
1 open issue
4 resolved since last review
Review effort: Max
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
e7f176a to
a2a9686
Compare
This comment has been minimized.
This comment has been minimized.
a2a9686 to
939615a
Compare
This comment has been minimized.
This comment has been minimized.
939615a to
b98830a
Compare
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
## Description Test-only change for `release/17.0`. It fixes CLI E2E failures that show up on unrelated release PRs (for example #22401 and #22362). There are no product changes. **1. ConfigSource brownfield adoption test.** This ports only the `ConfigSourceTestContext` test fix from #22182, which is already merged on `main` and is also part of the open backport #22219. `Update_AcceptingConfigurationSourceUpdatesBrownfieldConfiguration` assumed the old SDK version and an exact JSON property order. With this change, the test: - runs `aspire update --yes --nuget-config-dir .` - sets the expected `sdk.version` from the AppHost - compares the result with `JsonNode.DeepEquals` **2. Post-update CLI self-update prompt.** After the project update, `aspire update` may ask `An update is available for the Aspire CLI. Would you like to update it now? [Y/n]`. `features.updateNotificationsEnabled` does not control this prompt. It appears only when a newer CLI has been published on the selected channel. Four tests blocked on it until they timed out: - `CentralPackageManagementTests.AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps` - `CentralPackageManagementTests.AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent` - `ChannelUpdateWorkflowTests.UpdateToStable_TypeScriptSingleFileInit_KeepsConfigChannel` - `ChannelUpdateWorkflowTests.UpdateToStable_TypeScript_PreviewsStablePkgsAndKeepsChannel` The new `CliE2EAutomatorHelpers.WaitForAspireUpdateCompletionAsync` helper waits until one of three things appears for the current `SequenceCounter` value: - the success prompt - the error prompt, which still fails fast - the CLI self-update prompt Only output after the line where the command was typed is considered, so a prompt left on screen by an earlier `aspire update` in the same test does not count. When the CLI self-update prompt appears, the helper types `n` without Enter, so no phantom shell command desyncs the counter, and then waits for the success prompt. It does not press Enter blindly or use fixed delays, and it works whether or not the prompt appears. The comments that claimed `updateNotificationsEnabled` suppresses this prompt have been corrected. ### Validation - `MSBUILDTERMINALLOGGER=false dotnet build tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj -v q -nologo` succeeded with 0 warnings and 0 errors. - The affected E2E tests were **not run locally**: they need Docker plus a Linux CLI archive, and Docker isn't available on the authoring machine. The CLI E2E jobs in this PR's CI provide that validation. - Root cause comes from the asciinema recordings and TRX files of CI run 44398134189 (#22401). In all four failures the terminal is blocked at the CLI self-update `[Y/n]` prompt. Fixes # (issue) ## Checklist - Is this feature complete? - [x] Yes. Ready to ship. - [ ] No. Follow-up changes expected. - Are you including unit tests for the changes and scenario tests if relevant? - [x] 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 - [x] 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 - [x] No --------- Co-authored-by: Copilot App <[email protected]> Co-authored-by: Copilot Autofix powered by AI <[email protected]>
b98830a to
633df0e
Compare
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
633df0e to
b8aa1a2
Compare
This comment has been minimized.
This comment has been minimized.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
b8aa1a2 to
928bbc8
Compare
Tests selector52 / 101 PR test projects · 4 PR jobs, from 11 changed files. Selected PR test projects (52 / 101)
Selected PR jobs (4)
How these were chosen — grouped by what changed
🔧 show 46
🧪 📦 affected project 📦 affected project 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
5399d19
into
release/17.0
|
✅ No documentation update needed. excluded → backport. Exclusion reasons: base_branch_is_release, head_branch_is_backport, title_release_prefix, body_backport_marker (title is prefixed |


Backport of #22346 to release/17.0
/cc Karol Zadora-Przylecki (@karolz-ms)
Customer Impact
Testing
Risk
Regression?