Skip to content

Conversation

davidfowl
Copy link
Member

Description

  • Endpoints wrapped in connection strings were throwing during the preprocess pass of the evalution. Avoid throwing during that pass
  • Added tests for this scenario

Fixes #8596

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
  • Did you add public API?
    • No
  • Does the change make any security assumptions or guarantees?
    • No
  • Does the change require an update in our Aspire docs?
    • No

- Endpoints wrapped in connection strings were throwing during the preproces pass of the evalution. Avoid throwing during that pass
- Added tests for this scenario

Fixes #8596
@Copilot Copilot AI review requested due to automatic review settings April 8, 2025 02:04
@davidfowl davidfowl requested a review from mitchdenny as a code owner April 8, 2025 02:04
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.

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

Comments suppressed due to low confidence (1)

src/Aspire.Hosting/ApplicationModel/ExpressionResolver.cs:163

  • Consider adding tests for scenarios when Preprocess is true to ensure that missing connection strings do not trigger an exception during pre-processing.
if (!Preprocess && string.IsNullOrEmpty(value.Value) && !cs.Optional)

@github-actions github-actions bot added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Apr 8, 2025
@davidfowl
Copy link
Member Author

/backport to release/9.2

Copy link
Contributor

github-actions bot commented Apr 8, 2025

Started backporting to release/9.2: https://github.com/dotnet/aspire/actions/runs/14323470219

@davidfowl davidfowl merged commit 256b4da into main Apr 8, 2025
175 checks passed
@davidfowl davidfowl deleted the davidfowl/fix-endpoint-resolution branch April 8, 2025 02:38
@danmoseley
Copy link
Member

hey @afscrome thanks for finding this and other last minute issues. really helps.

@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9.2 Regression: Failed to apply environment variable 'ConnectionStrings__RESOURCE'
3 participants