From 5c9b6b29b53a470b7d31fe859deb746d6da04623 Mon Sep 17 00:00:00 2001 From: Isla Date: Sun, 3 Aug 2025 18:57:01 +0200 Subject: [PATCH] Fixed properties override when publishing an update in external service --- src/Aspire.Hosting/ExternalServiceBuilderExtensions.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Aspire.Hosting/ExternalServiceBuilderExtensions.cs b/src/Aspire.Hosting/ExternalServiceBuilderExtensions.cs index 9b1299fd1dc..d7a5cdf427e 100644 --- a/src/Aspire.Hosting/ExternalServiceBuilderExtensions.cs +++ b/src/Aspire.Hosting/ExternalServiceBuilderExtensions.cs @@ -145,9 +145,7 @@ await e.Notifications.PublishUpdateAsync(resource, snapshot => snapshot with await e.Notifications.PublishUpdateAsync(resource, snapshot => snapshot with { - Properties = [ - new(CustomResourceKnownProperties.Source, uri.Host) - ], + Properties = snapshot.Properties.SetResourceProperty(CustomResourceKnownProperties.Source, uri.Host), // Add the URL if it came from a parameter as non-static URLs must be published by the owning custom resource Urls = AddUrlIfNotPresent(snapshot.Urls, uri), // Required in order for health checks to work