-
Notifications
You must be signed in to change notification settings - Fork 745
Make *.localhost resource endpoint URLs the primary endpoint URL #12466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12466Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12466" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the URL ordering behavior when the dashboard uses a *.dev.localhost address. The change ensures that WithUrlForEndpoint callbacks target the *.dev.localhost URL (which is displayed prominently in the dashboard) rather than the plain localhost URL.
Key changes:
- Swapped URL ordering in
ApplicationOrchestrator.csso the*.dev.localhostURL is added as the primary URL before thelocalhostURL - Updated test to verify that
WithUrlForEndpointcorrectly targets the primary*.dev.localhostURL - Improved code comments to clarify the intent of URL swapping
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Aspire.Hosting/Orchestrator/ApplicationOrchestrator.cs | Modified URL creation logic to swap primary and additional URLs, ensuring *.dev.localhost URLs are added first and targeted by WithUrlForEndpoint calls |
| tests/Aspire.Hosting.Tests/WithUrlsTests.cs | Enhanced test to verify WithUrlForEndpoint applies customizations to the primary *.dev.localhost URL; refactored assertions from multiple Assert.Single calls to a single Assert.Collection for better readability |
|
/test-scenario smoke-test-dotnet |
|
/test-scenario smoke-test-python |
|
🤖 AI Agent Task Created Scenario: smoke-test-dotnet An AI agent has been assigned to execute this scenario. 📝 Issue: https://github.com/dotnet/aspire-playground/issues/78 Please navigate to the issue for more details and to track progress. |
|
🤖 AI Agent Task Created Scenario: smoke-test-python An AI agent has been assigned to execute this scenario. 📝 Issue: https://github.com/dotnet/aspire-playground/issues/79 Please navigate to the issue for more details and to track progress. |
) * Make *.localhost resource endpoint URLs the primary endpoint URL Fixes #12465 * Update test
Description
Make
*.localhostresource endpoint URLs the primary endpoint URL so that callers ofWithUrlForEndpointupdate that URL instead of thelocalhostURL that isn't shown on the resources summary page.Fixes #12465
Checklist