From d50badeebdbfdecdf59edb4353592812edcad0e5 Mon Sep 17 00:00:00 2001 From: David Boike Date: Fri, 29 May 2026 14:56:03 -0500 Subject: [PATCH 1/4] raygun.io redirects to raygun.com now, so skip an unnecessary redirect on startup --- src/ServiceControl.Config/Framework/RaygunFeedBack.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceControl.Config/Framework/RaygunFeedBack.cs b/src/ServiceControl.Config/Framework/RaygunFeedBack.cs index a65c01e12c..6128a68511 100644 --- a/src/ServiceControl.Config/Framework/RaygunFeedBack.cs +++ b/src/ServiceControl.Config/Framework/RaygunFeedBack.cs @@ -138,7 +138,7 @@ async Task TryInitializeRaygunClientWithCredentials(ICredentials? credenti readonly Guid trackingId; readonly RaygunSettings raygunSettings = new() { ApiKey = "zdm49nndHCXZ3NVzM8Kzug==" }; - const string RaygunUrl = "https://raygun.io"; + const string RaygunUrl = "https://raygun.com"; sealed class Feedback(string message) : Exception(message); } From 434f81dc27e2421826e70e10b766ea0da5ca748b Mon Sep 17 00:00:00 2001 From: David Boike Date: Fri, 29 May 2026 15:14:16 -0500 Subject: [PATCH 2/4] Make update check async so no-outbound environment does not block for 100 second HTTP timeout --- .../UI/Shell/ShellViewModel.cs | 51 ++++++++++++------- .../UI/Shell/VersionCheckerHelper.cs | 3 +- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs b/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs index 2dbc21aba8..4760178148 100644 --- a/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs +++ b/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs @@ -94,7 +94,7 @@ protected override async Task OnActivate() { await base.OnActivate(); - await CheckForUpdates(); + BeginCheckForUpdates(); } public async Task RefreshInstances() @@ -121,27 +121,42 @@ void LoadAppVersion() AppVersion = Constants.CurrentVersion; } - async Task CheckForUpdates() + void BeginCheckForUpdates() { - // Get the lates upgradble version based on the current version - // get the json version file from https://s3.us-east-1.amazonaws.com/platformupdate.particular.net/servicecontrol.txt - - var availableUpgradeRelease = await VersionCheckerHelper.GetLatestRelease(AppVersion); - - if (availableUpgradeRelease.Version == AppVersion) - { - UpdateAvailable = false; - } - else + updateCheckTask = Task.Run(async () => { - AvailableUpgradeReleaseLink = availableUpgradeRelease.Assets.FirstOrDefault().Download.ToString(); - UpdateAvailableText = $"v{availableUpgradeRelease.Version} - Update Available"; - UpdateAvailable = true; - } - - NotifyOfPropertyChange(nameof(UpdateAvailable)); + NotifyOfPropertyChange(nameof(IsCheckingForUpdate)); + try + { + // Get the lates upgradeable version based on the current version + // get the json version file from https://s3.us-east-1.amazonaws.com/platformupdate.particular.net/servicecontrol.txt + + var availableUpgradeRelease = await VersionCheckerHelper.GetLatestRelease(AppVersion); + + if (availableUpgradeRelease.Version == AppVersion) + { + UpdateAvailable = false; + } + else + { + AvailableUpgradeReleaseLink = availableUpgradeRelease.Assets.FirstOrDefault().Download.ToString(); + UpdateAvailableText = $"v{availableUpgradeRelease.Version} - Update Available"; + UpdateAvailable = true; + } + + NotifyOfPropertyChange(nameof(UpdateAvailable)); + } + finally + { + updateCheckTask = null; + NotifyOfPropertyChange(nameof(IsCheckingForUpdate)); + } + }); } + public bool IsCheckingForUpdate => updateCheckTask is not null; + + Task updateCheckTask; readonly ListInstancesViewModel listInstances; readonly NoInstancesViewModel noInstances; } diff --git a/src/ServiceControl.Config/UI/Shell/VersionCheckerHelper.cs b/src/ServiceControl.Config/UI/Shell/VersionCheckerHelper.cs index eb54174b6a..e91190b5e3 100644 --- a/src/ServiceControl.Config/UI/Shell/VersionCheckerHelper.cs +++ b/src/ServiceControl.Config/UI/Shell/VersionCheckerHelper.cs @@ -43,11 +43,12 @@ static async Task> GetVersionInformation() } } - static readonly HttpClient httpClient = new HttpClient(new HttpClientHandler + static readonly HttpClient httpClient = new(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate }) { + Timeout = TimeSpan.FromSeconds(30), DefaultRequestHeaders = { Accept = From bab0d9cf2784dddbe79ec183113867705da67476 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Mon, 1 Jun 2026 11:53:12 +0200 Subject: [PATCH 3/4] Simplify --- .../UI/Shell/ShellViewModel.cs | 59 ++++++++++--------- 1 file changed, 32 insertions(+), 27 deletions(-) diff --git a/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs b/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs index 4760178148..9541e07334 100644 --- a/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs +++ b/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs @@ -116,42 +116,47 @@ public async Task RefreshInstances() } } - void LoadAppVersion() + void LoadAppVersion() => AppVersion = Constants.CurrentVersion; + + void BeginCheckForUpdates() { - AppVersion = Constants.CurrentVersion; + if (updateCheckTask is not null) + { + return; + } + + updateCheckTask = CheckForUpdates(); + + NotifyOfPropertyChange(nameof(IsCheckingForUpdate)); } - void BeginCheckForUpdates() + async Task CheckForUpdates() { - updateCheckTask = Task.Run(async () => + try { - NotifyOfPropertyChange(nameof(IsCheckingForUpdate)); - try + var availableUpgradeRelease = await VersionCheckerHelper.GetLatestRelease(AppVersion); + + if (availableUpgradeRelease.Version == AppVersion) { - // Get the lates upgradeable version based on the current version - // get the json version file from https://s3.us-east-1.amazonaws.com/platformupdate.particular.net/servicecontrol.txt - - var availableUpgradeRelease = await VersionCheckerHelper.GetLatestRelease(AppVersion); - - if (availableUpgradeRelease.Version == AppVersion) - { - UpdateAvailable = false; - } - else - { - AvailableUpgradeReleaseLink = availableUpgradeRelease.Assets.FirstOrDefault().Download.ToString(); - UpdateAvailableText = $"v{availableUpgradeRelease.Version} - Update Available"; - UpdateAvailable = true; - } - - NotifyOfPropertyChange(nameof(UpdateAvailable)); + UpdateAvailable = false; } - finally + else { - updateCheckTask = null; - NotifyOfPropertyChange(nameof(IsCheckingForUpdate)); + AvailableUpgradeReleaseLink = availableUpgradeRelease.Assets.FirstOrDefault()?.Download.ToString(); + UpdateAvailableText = $"v{availableUpgradeRelease.Version} - Update Available"; + UpdateAvailable = true; } - }); + } + catch + { + UpdateAvailable = false; + } + finally + { + updateCheckTask = null; + NotifyOfPropertyChange(nameof(UpdateAvailable)); + NotifyOfPropertyChange(nameof(IsCheckingForUpdate)); + } } public bool IsCheckingForUpdate => updateCheckTask is not null; From db160f03a3289219a2a102594e2919ea5b333723 Mon Sep 17 00:00:00 2001 From: Daniel Marbach Date: Mon, 1 Jun 2026 11:55:59 +0200 Subject: [PATCH 4/4] Notify all --- src/ServiceControl.Config/UI/Shell/ShellViewModel.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs b/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs index 9541e07334..bcd58bb12e 100644 --- a/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs +++ b/src/ServiceControl.Config/UI/Shell/ShellViewModel.cs @@ -154,7 +154,10 @@ async Task CheckForUpdates() finally { updateCheckTask = null; + NotifyOfPropertyChange(nameof(UpdateAvailable)); + NotifyOfPropertyChange(nameof(UpdateAvailableText)); + NotifyOfPropertyChange(nameof(AvailableUpgradeReleaseLink)); NotifyOfPropertyChange(nameof(IsCheckingForUpdate)); } }