From a667bba8c3cd6afa56b5ed659187f7cfc599fce9 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Fri, 7 Nov 2025 21:28:16 -0700 Subject: [PATCH] Revert "Hid Debug Messages in Updater" This reverts commit 9055d7089e97e61ff273c3b887973b109683f7d5. --- Update.ps1 | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/Update.ps1 b/Update.ps1 index 94cc37ff..7be9aa51 100644 --- a/Update.ps1 +++ b/Update.ps1 @@ -1,14 +1,11 @@ [CmdletBinding()] -param( - [switch]$Trace -) +param() $scriptDir = Split-Path $MyInvocation.MyCommand.Path -Parent $script:BorealisTlsInitialized = $false $script:BorealisTrustedThumbprints = @() $script:BorealisCallbackApplied = $false $script:AgentPythonHttpHelper = '' -$script:UpdateDebugEnabled = $Trace.IsPresent $symbols = @{ Success = [char]0x2705 Running = [char]0x23F3 @@ -28,10 +25,6 @@ function Write-UpdateLog { $normalized = if ($Level) { $Level } else { 'INFO' } $normalized = $normalized.ToUpperInvariant() - if ($normalized -eq 'DEBUG' -and -not $script:UpdateDebugEnabled) { - return - } - if (-not $Color) { switch ($normalized) { 'WARN' { $Color = 'Yellow' } @@ -368,7 +361,7 @@ function Save-ServerCertificateCache { try { Set-Content -Path $targetPath -Value $CertificatePem -Encoding UTF8 - Write-UpdateLog ("Saved Borealis Engine certificate to {0}" -f $targetPath) 'INFO' + Write-UpdateLog ("Cached server certificate to {0}" -f $targetPath) 'INFO' return $targetPath } catch { Write-UpdateLog ("Failed to cache server certificate: {0}" -f $_.Exception.Message) 'WARN' @@ -554,11 +547,11 @@ function Initialize-BorealisTlsContext { $trusted = @() $cachedCertPath = Get-ExistingServerCertificatePath -AgentRoot $AgentRoot if ($cachedCertPath) { - Write-UpdateLog ("Attempting Borealis Engine connection using cached certificate: {0}" -f $cachedCertPath) 'INFO' + Write-UpdateLog ("Using cached TLS certificate: {0}" -f $cachedCertPath) 'INFO' try { $trusted += Get-CertificatesFromPem -Path $cachedCertPath } catch { - Write-UpdateLog ("Unable to load cached certificate; continuing without it ({0})." -f $_.Exception.Message) 'WARN' + Write-UpdateLog ("Failed to load cached TLS certificate: {0}" -f $_.Exception.Message) 'WARN' } } @@ -569,7 +562,7 @@ function Initialize-BorealisTlsContext { } else { $script:BorealisTrustedThumbprints = @() Write-Verbose "No Borealis TLS certificates located; loopback hosts will be allowed without CA verification." - Write-UpdateLog "No cached Borealis Engine certificate available yet; limiting TLS checks to loopback hosts." 'WARN' + Write-UpdateLog "No TLS certificates found; falling back to loopback-only allowance." 'WARN' } Ensure-BorealisCertificateValidator @@ -834,9 +827,9 @@ function Invoke-AgentHttpRequest { $cafile = Get-ExistingServerCertificatePath -AgentRoot $AgentRoot if ($cafile) { - Write-UpdateLog ("Attempting to contact Borealis Engine using cached certificate: {0}" -f $cafile) 'INFO' + Write-UpdateLog ("Using cached TLS certificate for helper: {0}" -f $cafile) 'DEBUG' } else { - Write-UpdateLog "No cached Borealis Engine certificate found; establishing connection without validation." 'WARN' + Write-UpdateLog "No TLS bundle available; helper will skip certificate validation for this request." 'WARN' } $payload = @{ method = $Method