Skip to content

Use KnownConfigNames for resource service endpoint URL with legacy fallback - #17385

Merged
James Newton-King (JamesNK) merged 2 commits into
mainfrom
use-known-config-names-resource-service-url
May 28, 2026
Merged

James Newton-King (JamesNK) merged 2 commits into
mainfrom
use-known-config-names-resource-service-url

Conversation

@JamesNK

Copy link
Copy Markdown
Member

Summary

Remove the hardcoded DOTNET_RESOURCE_SERVICE_ENDPOINT_URL constant from DashboardServiceHost and use KnownConfigNames.ResourceServiceEndpointUrl (ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL) with fallback to KnownConfigNames.Legacy.ResourceServiceEndpointUrl (DOTNET_RESOURCE_SERVICE_ENDPOINT_URL).

Changes

  • DashboardServiceHost.cs: Removed ResourceServiceUrlVariableName private const. Updated ConfigureKestrel to prefer the new config name and fall back to the legacy name, matching the pattern used elsewhere in the codebase.
  • DashboardClient.cs: Updated XML doc comment to reference the new env var name.

@github-actions

github-actions Bot commented May 22, 2026 •

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 -- 17385

Or

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aligns the dashboard resource service endpoint configuration with the centralized KnownConfigNames constants by preferring KnownConfigNames.ResourceServiceEndpointUrl (ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL) while still supporting the legacy KnownConfigNames.Legacy.ResourceServiceEndpointUrl (DOTNET_RESOURCE_SERVICE_ENDPOINT_URL), and updates related documentation.

Changes:

  • Updated DashboardServiceHost to read the resource service endpoint URL from the new config name with a legacy fallback.
  • Updated DashboardClient XML docs to reference the new environment variable name.

Reviewed changes

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

File Description
src/Aspire.Hosting/Dashboard/DashboardServiceHost.cs Switches env var lookup to KnownConfigNames.* with legacy fallback for the resource service endpoint URL.
src/Aspire.Dashboard/ServiceClient/DashboardClient.cs Updates XML documentation to reference the new env var name.

…llback

Remove hardcoded DOTNET_RESOURCE_SERVICE_ENDPOINT_URL constant from
DashboardServiceHost and use KnownConfigNames.ResourceServiceEndpointUrl
(ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL) with fallback to
KnownConfigNames.Legacy.ResourceServiceEndpointUrl.
@JamesNK
James Newton-King (JamesNK) force-pushed the use-known-config-names-resource-service-url branch from 9c918ae to 9ff622a Compare May 28, 2026 00:19
@JamesNK
James Newton-King (JamesNK) merged commit 9a9ddbb into main May 28, 2026
615 of 619 checks passed
@JamesNK
James Newton-King (JamesNK) deleted the use-known-config-names-resource-service-url branch May 28, 2026 01:11
@JamesNK

Copy link
Copy Markdown
Member Author

/backport to release/13.4

@microsoft-github-policy-service microsoft-github-policy-service Bot modified the milestones: 13.4, 13.5 May 28, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to release/13.4 (link to workflow run)

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

✅ No documentation update needed.

docs_optional → bug_fix_restores_documented_behavior

No triggered signals (signal_count == 0). The docs already document ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL as the correct environment variable name in multiple pages (app-host/configuration.mdx, dashboard/configuration.mdx, dashboard/enable-browser-telemetry.mdx, etc.). This PR updates DashboardServiceHost to prefer KnownConfigNames.ResourceServiceEndpointUrl (ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL) with a legacy fallback to DOTNET_RESOURCE_SERVICE_ENDPOINT_URL, aligning the implementation with already-documented behavior. No docs update is needed.

@github-actions

Copy link
Copy Markdown
Contributor

❌ CLI E2E Tests failed — 106 passed, 1 failed, 2 unknown (commit 9ff622a)

❌ Failed Tests

Status Test Recording Job Artifacts
❌ LatestCliCanStartStableChannelAppHost Recording #78203054866 Logs
View all recordings
Status Test Recording Job Artifacts
✅ AddPackageInteractiveWhileAppHostRunningDetached Recording #78203055239 Logs
✅ AddPackageWhileAppHostRunningDetached Recording #78203055239 Logs
✅ AgentCommands_AllHelpOutputs_AreCorrect Recording #78203055154 Logs
✅ AgentInitCommand_DefaultSelection_InstallsDefaultSkills Recording #78203055154 Logs
✅ AgentInitCommand_MigratesDeprecatedConfig Recording #78203055154 Logs
✅ AgentMcpListStructuredLogsReturnsLogsFromStarterApp Recording #78203055801 Logs
✅ AgentMcpListStructuredLogsReturnsLogsFromStarterApp_DevLocalhost Recording #78203055801 Logs
✅ AgentMcpListStructuredLogsReturnsLogsFromStarterApp_Isolated Recording #78203055801 Logs
✅ AllPublishMethodsBuildDockerImages Recording #78203055305 Logs
✅ AspireAddAndStartWorkAgainstLegacyAppHostTs Recording #78203054846 Logs
✅ AspireAddPackageVersionToDirectoryPackagesProps Recording #78203055516 Logs
✅ AspireInitSingleFileAppHostRunsViaDotnetRunAppHost Recording #78203055567 Logs
✅ AspireInitWithExistingAppHostDirRecreatesMissingNuGetConfigAndPreservesFiles Recording #78203055618 Logs
❔ AspireInitWithSolutionFileGeneratesAppHostThatBuildsAgainstChannelHive Recording #78203055618 Logs
✅ AspireStartUpdatesStaleTypeScriptAppHostPath Recording #78203055532 Logs
✅ AspireUpdateRemovesAppHostPackageVersionFromDirectoryPackagesProps Recording #78203055516 Logs
✅ AspireUpdateRemovesOrphanAppHostPackageVersionWhenSdkAlreadyCurrent Recording #78203055516 Logs
✅ Banner_DisplayedOnFirstRun Recording #78203055330 Logs
✅ Banner_DisplayedWithExplicitFlag Recording #78203055330 Logs
✅ Banner_NotDisplayedWithNoLogoFlag Recording #78203055330 Logs
✅ CertificatesClean_RemovesCertificates Recording #78203055348 Logs
✅ CertificatesTrust_WithNoCert_CreatesAndTrustsCertificate Recording #78203055348 Logs
✅ CertificatesTrust_WithUntrustedCert_TrustsCertificate Recording #78203055348 Logs
✅ ConfigSetGet_CreatesNestedJsonFormat Recording #78203055210 Logs
✅ CreateAndRunAspireStarterProject Recording #78203054866 Logs
✅ CreateAndRunAspireStarterProjectWithBundle Recording #78203055723 Logs
✅ CreateAndRunEmptyAppHostProject Recording #78203055798 Logs
✅ CreateAndRunJavaEmptyAppHostProject Recording #78203055245 Logs
✅ CreateAndRunJsReactProject Recording #78203055632 Logs
✅ CreateAndRunPythonReactProject Recording #78203055560 Logs
✅ CreateAndRunTypeScriptEmptyAppHostProject Recording #78203055932 Logs
✅ CreateAndRunTypeScriptStarterProject Recording #78203055382 Logs
✅ CreateJavaAppHostWithViteApp Recording #78203055234 Logs
✅ CreateTypeScriptAppHostWithViteApp_AllowsGuestAppPackageManagerToDiffer Recording #78203055754 Logs
✅ CreateTypeScriptAppHostWithViteApp_UsesConfiguredToolchain Recording #78203055754 Logs
✅ DashboardRunWithAgentMcpListTracesReturnsNoTraces Recording #78203055454 Logs
✅ DashboardRunWithAgentMcpListTracesReturnsNoTraces_DevLocalhost Recording #78203055454 Logs
✅ DashboardRunWithOtelTracesReturnsNoTraces Recording #78203055454 Logs
✅ DashboardRunWithOtelTracesReturnsNoTraces_DevLocalhost Recording #78203055454 Logs
✅ DeployK8sBasicApiService Recording #78203055554 Logs
✅ DeployK8sWithExternalHelmChart Recording #78203055161 Logs
✅ DeployK8sWithGarnet Recording #78203055500 Logs
✅ DeployK8sWithMongoDB Recording #78203055924 Logs
✅ DeployK8sWithMySql Recording #78203055133 Logs
✅ DeployK8sWithPostgres Recording #78203055728 Logs
✅ DeployK8sWithRabbitMQ Recording #78203055477 Logs
✅ DeployK8sWithRedis Recording #78203055562 Logs
✅ DeployK8sWithSqlServer Recording #78203055559 Logs
✅ DeployK8sWithValkey Recording #78203055480 Logs
✅ DeployTypeScriptAppToKubernetes Recording #78203055182 Logs
✅ DescribeCommandResolvesReplicaNames Recording #78203054887 Logs
✅ DescribeCommandShowsRunningResources Recording #78203054887 Logs
✅ DetachFormatJsonProducesValidJson Recording #78203055367 Logs
✅ DetachFormatJsonProducesValidJsonWhenRestartingExistingInstance Recording #78203055367 Logs
✅ DoPublishAndDeployListStepsWork Recording #78203055224 Logs
✅ DocsCommand_RendersInteractiveMarkdownFromLocalSource Recording #78203055545 Logs
✅ DoctorCommand_DetectsDeprecatedAgentConfig Recording #78203055154 Logs
✅ DoctorCommand_TypeScriptAppHostReportsMissingConfiguredToolchain Recording #78203055145 Logs
✅ DoctorCommand_WithSslCertDir_ShowsTrusted Recording #78203055145 Logs
✅ DoctorCommand_WithoutSslCertDir_ShowsPartiallyTrusted Recording #78203055145 Logs
✅ GatewayWithoutExternalEndpoint_FailsPublishWithGuidance Recording #78203055281 Logs
✅ GeneratedAspireDevScript_StartsWatchMode_WithConfiguredToolchain Recording #78203055754 Logs
✅ GlobalMigration_HandlesCommentsAndTrailingCommas Recording #78203055210 Logs
✅ GlobalMigration_HandlesMalformedLegacyJson Recording #78203055210 Logs
✅ GlobalMigration_PreservesAllValueTypes Recording #78203055210 Logs
✅ GlobalMigration_SkipsWhenNewConfigExists Recording #78203055210 Logs
✅ GlobalSettings_MigratedFromLegacyFormat Recording #78203055210 Logs
✅ IngressWithoutExternalEndpoint_FailsPublishWithGuidance Recording #78203055281 Logs
✅ InitTypeScriptAppHost_AugmentsExistingViteRepoInWorkspaceSubdirectory Recording #78203055754 Logs
✅ InteractiveCSharpInitCreatesExpectedFiles Recording #78203055607 Logs
✅ InvalidAppHostPathWithComments_IsHealedOnRun Recording #78203055854 Logs
✅ JavaScriptHostingApisRunFromTypeScriptAppHost Recording #78203055305 Logs
❌ LatestCliCanStartStableChannelAppHost Recording #78203054866 Logs
✅ LatestCliCanStartStableChannelTypeScriptAppHost Recording #78203054866 Logs
✅ LegacySettingsMigration_AdjustsRelativeAppHostPath Recording #78203055532 Logs
✅ LogsCommandShowsResourceLogs Recording #78203055386 Logs
✅ OtelLogsReturnsStructuredLogsFromStarterApp Recording #78203055908 Logs
✅ OtelLogsReturnsStructuredLogsFromStarterAppIsolated Recording #78203055908 Logs
✅ PsCommandListsRunningAppHost Recording #78203055356 Logs
✅ PsFormatJsonOutputsOnlyJsonToStdout Recording #78203055356 Logs
✅ PublishJavaScriptPatternsGeneratesExpectedDockerComposeArtifacts Recording #78203054852 Logs
✅ PublishWithConfigureEnvFileUpdatesEnvOutput Recording #78203054852 Logs
✅ PublishWithDockerComposeServiceCallbackSucceeds Recording #78203054852 Logs
✅ PublishWithoutOutputPathUsesAppHostDirectoryDefault Recording #78203054852 Logs
✅ ResourceCommand_FailedExecution_DisplaysAppHostLogPathAndLogContainsEntries Recording #78203055126 Logs
✅ ResourceCommand_SetAndDeleteParameterUpdatesDescribeOutput Recording #78203055126 Logs
✅ RestoreGeneratesSdkFiles Recording #78203054924 Logs
✅ RestoreGeneratesSdkFiles_WithConfiguredToolchain Recording #78203055907 Logs
✅ RestoreRefreshesGeneratedSdkAfterAddingIntegration Recording #78203055907 Logs
✅ RestoreSupportsConfigOnlyHelperPackageAndCrossPackageTypes Recording #78203055796 Logs
✅ RunFromParentDirectory_UsesExistingConfigNearAppHost Recording #78203055105 Logs
✅ RunReportsSyntaxErrorsForDotNetAppHost Recording #78203055483 Logs
✅ RunReportsSyntaxErrorsForTypeScriptAppHost Recording #78203055483 Logs
✅ SecretCrudOnDotNetAppHost Recording #78203055599 Logs
✅ SecretCrudOnTypeScriptAppHost Recording #78203055156 Logs
✅ StagingChannel_ConfigureAndVerifySettings_ThenSwitchChannels Recording #78203055529 Logs
✅ StartAndWaitForTypeScriptSqlServerAppHostWithNativeAssets Recording #78203055223 Logs
✅ StartReportsSyntaxErrorsForDotNetAppHost Recording #78203055483 Logs
✅ StartReportsSyntaxErrorsForTypeScriptAppHost Recording #78203055483 Logs
✅ StopAllAppHostsFromAppHostDirectory Recording #78203055289 Logs
✅ StopJavaPolyglotAppHostUsingApphostDirectory Recording #78203055824 Logs
✅ StopNonInteractiveSingleAppHost Recording #78203055289 Logs
✅ StopTypeScriptPolyglotAppHostUsingApphostDirectory Recording #78203055788 Logs
✅ StopWithNoRunningAppHostExitsSuccessfully Recording #78203055239 Logs
✅ UnAwaitedChainsCompileWithAutoResolvePromises Recording #78203055907 Logs
❔ UpdateProjectChannelToStable_CSharpEmptyAppHost_PreservesAspireConfigChannel Recording #78203054875 Logs
✅ UpdateProjectChannelToStable_CSharpSingleFileInit_PreservesAspireConfigChannel Recording #78203054875 Logs
✅ UpdateProjectChannelToStable_TypeScriptSingleFileInit_PreservesAspireConfigChannel Recording #78203054875 Logs
✅ UpdateProjectChannelToStable_TypeScript_PreviewsStablePackagesAndPreservesChannel Recording #78203054875 Logs

📹 Recordings uploaded automatically from CI run #26546664612

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.

3 participants