From 938abb9f1458afca2eb913f4fc5044a66e363b8f Mon Sep 17 00:00:00 2001 From: kishorekumar-anchala <168699259+kishorekumar-anchala@users.noreply.github.com> Date: Thu, 19 Jun 2025 21:59:20 +0530 Subject: [PATCH] [windows] Remove checksum validation for WSL2 and AzCosmos db (#12425) --- .../windows/scripts/build/Install-AzureCosmosDbEmulator.ps1 | 3 +-- images/windows/scripts/build/Install-WSL2.ps1 | 3 +-- images/windows/scripts/helpers/InstallHelpers.ps1 | 5 +++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/images/windows/scripts/build/Install-AzureCosmosDbEmulator.ps1 b/images/windows/scripts/build/Install-AzureCosmosDbEmulator.ps1 index 02bf38742..4668ee790 100644 --- a/images/windows/scripts/build/Install-AzureCosmosDbEmulator.ps1 +++ b/images/windows/scripts/build/Install-AzureCosmosDbEmulator.ps1 @@ -4,7 +4,6 @@ #################################################################################### Install-Binary -Type MSI ` - -Url "https://aka.ms/cosmosdb-emulator" ` - -ExpectedSHA256Sum "BFBA892C3B9E27093A6AA36CD3C447D812CA32D6A4361DB64E753A63C90C2766" + -Url "https://aka.ms/cosmosdb-emulator" Invoke-PesterTests -TestFile "Tools" -TestName "Azure Cosmos DB Emulator" diff --git a/images/windows/scripts/build/Install-WSL2.ps1 b/images/windows/scripts/build/Install-WSL2.ps1 index 7453d27dd..2a98ee630 100644 --- a/images/windows/scripts/build/Install-WSL2.ps1 +++ b/images/windows/scripts/build/Install-WSL2.ps1 @@ -7,8 +7,7 @@ $downloadUrl = Resolve-GithubReleaseAssetUrl ` -UrlMatchPattern "wsl.*.x64.msi" Install-Binary -Type MSI ` - -Url $downloadUrl ` - -ExpectedSHA256Sum "AF1C1CBDB2F8E323A74224F200B3A4E25C0CF6DD5DAE7D0D14CB64109E429ED8" + -Url $downloadUrl Write-Host "Performing wsl --install --no-distribution" wsl.exe --install --no-distribution diff --git a/images/windows/scripts/helpers/InstallHelpers.ps1 b/images/windows/scripts/helpers/InstallHelpers.ps1 index f984d8ea1..b49cb25d0 100644 --- a/images/windows/scripts/helpers/InstallHelpers.ps1 +++ b/images/windows/scripts/helpers/InstallHelpers.ps1 @@ -198,6 +198,7 @@ function Invoke-DownloadWithRetry { for ($retries = 20; $retries -gt 0; $retries--) { try { $attemptStartTime = Get-Date + $ProgressPreference = 'SilentlyContinue' Invoke-WebRequest -Uri $Url -OutFile $Path -UseBasicParsing $attemptSeconds = [math]::Round(($(Get-Date) - $attemptStartTime).TotalSeconds, 2) Write-Host "Package downloaded in $attemptSeconds seconds" @@ -794,7 +795,7 @@ function Get-ChecksumFromGithubRelease { [Parameter(Mandatory = $true)] [Alias("File", "Asset")] [string] $FileName, - [Parameter(Mandatory = $true)] + [Parameter(Mandatory = $false)] [ValidateSet("SHA256", "SHA512")] [string] $HashType ) @@ -867,7 +868,7 @@ function Get-ChecksumFromUrl { [Parameter(Mandatory = $true)] [Alias("File", "Asset")] [string] $FileName, - [Parameter(Mandatory = $true)] + [Parameter(Mandatory = $false)] [ValidateSet("SHA256", "SHA512")] [Alias("Type")] [string] $HashType