External Services with URL Parameter fails to generate manifests#10790
Merged
davidfowl merged 3 commits intodotnet:mainfrom Aug 1, 2025
Merged
External Services with URL Parameter fails to generate manifests#10790davidfowl merged 3 commits intodotnet:mainfrom
davidfowl merged 3 commits intodotnet:mainfrom
Conversation
Need to check for publish mode before calling GetValueAsync on the URL parameter Fix dotnet#10789
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where external services with URL parameters fail to generate manifests in publish mode. The fix addresses the problem by checking the execution mode before attempting to resolve parameter values during manifest generation.
Key changes:
- Added a check for publish mode before calling
GetValueAsyncon URL parameters - Created a test case to verify manifest generation works correctly for external services with parameters
- Updated the validation logic to only validate URL parameters when not in publish mode
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Aspire.Hosting/ResourceBuilderExtensions.cs |
Fixed the validation logic to check publish mode before resolving URL parameter values |
tests/Aspire.Hosting.Tests/ExternalServiceTests.cs |
Added test case to verify external services with parameters generate manifests correctly in publish mode |
tests/Aspire.Hosting.Tests/Snapshots/ExternalServiceTests.ExternalServiceWithParameterPublishManifest.verified.json |
Snapshot file for the new test case showing expected manifest output |
DamianEdwards
approved these changes
Aug 1, 2025
Member
Author
|
/backport to release/9.4 |
Contributor
|
Started backporting to release/9.4: https://github.com/dotnet/aspire/actions/runs/16678134216 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Need to check for publish mode before calling GetValueAsync on the URL parameter
Fix #10789