From d50badeebdbfdecdf59edb4353592812edcad0e5 Mon Sep 17 00:00:00 2001 From: David Boike Date: Fri, 29 May 2026 14:56:03 -0500 Subject: [PATCH 1/2] 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/2] 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 =