Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use one ignore list for windows vhd test #4504

Merged
merged 1 commit into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions vhdbuilder/packer/generate-windows-vhd-configuration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ $global:aksToolsDir = "c:\aks-tools"
# We need to guarantee that the node provisioning will not fail because the vhd is full before resize-osdisk is called in AKS Windows CSE script.
$global:lowestFreeSpace = 2*1024*1024*1024 # 2GB

$global:excludeHashComparisionListInAzureChinaCloud = @(
"calico-windows",
"azure-vnet-cni-singletenancy-windows-amd64",
"azure-vnet-cni-singletenancy-swift-windows-amd64",
"azure-vnet-cni-singletenancy-overlay-windows-amd64",
# We need upstream's help to republish this package. Before that, it does not impact functionality and 1.26 is only in public preview
# so we can ignore the different hash values.
"v1.26.0-1int.zip",
"azure-acr-credential-provider-windows-amd64-v1.29.2.tar.gz"
)

# defaultContainerdPackageUrl refers to the stable containerd package used to pull and cache container images
# Add cache for another containerd version which is not installed by default
$global:defaultContainerdPackageUrl = "https://acs-mirror.azureedge.net/containerd/windows/v1.6.21-azure.1/binaries/containerd-v1.6.21-azure.1-windows-amd64.tar.gz"
Expand Down
13 changes: 1 addition & 12 deletions vhdbuilder/packer/test/windows-files-check.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,6 @@ function Test-CompareSingleDir {
New-Item -ItemType Directory $dir -Force | Out-Null
}

$excludeHashComparisionListInAzureChinaCloud = @(
"calico-windows",
"azure-vnet-cni-singletenancy-windows-amd64",
"azure-vnet-cni-singletenancy-swift-windows-amd64",
"azure-vnet-cni-singletenancy-overlay-windows-amd64",
# We need upstream's help to republish this package. Before that, it does not impact functionality and 1.26 is only in public preview
# so we can ignore the different hash values.
"v1.26.0-1int.zip",
"azure-acr-credential-provider-windows-amd64-v1.29.2.tar.gz"
)

foreach ($URL in $map[$dir]) {
$fileName = [IO.Path]::GetFileName($URL)
$dest = [IO.Path]::Combine($dir, $fileName)
Expand All @@ -197,7 +186,7 @@ function Test-CompareSingleDir {
$globalFileSize = (Get-Item $dest).length

$isIgnore=$False
foreach($excludePackage in $excludeHashComparisionListInAzureChinaCloud) {
foreach($excludePackage in $global:excludeHashComparisionListInAzureChinaCloud) {
if ($URL.Contains($excludePackage)) {
$isIgnore=$true
break
Expand Down
14 changes: 1 addition & 13 deletions vhdbuilder/packer/test/windows-vhd-content-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,8 @@ function Test-FilesToCacheOnVHD
$localFileSize = (Get-Item $dest).length
$remoteFileSize = (Invoke-WebRequest $mcURL -UseBasicParsing -Method Head).Headers.'Content-Length'
if ($localFileSize -ne $remoteFileSize) {
# Please also update excludeHashComparisionListInAzureChinaCloud in vhdbuilder/packer/test/windows-files-check.ps1
$excludeHashComparisionListInAzureChinaCloud = @(
"calico-windows",
"azure-vnet-cni-singletenancy-windows-amd64",
"azure-vnet-cni-singletenancy-swift-windows-amd64",
"azure-vnet-cni-singletenancy-overlay-windows-amd64",
# We need upstream's help to republish this package. Before that, it does not impact functionality and 1.26 is only in public preview
# so we can ignore the different hash values.
"v1.26.0-1int.zip",
"azure-acr-credential-provider-windows-amd64-v1.29.2.tar.gz"
)

$isIgnore=$False
foreach($excludePackage in $excludeHashComparisionListInAzureChinaCloud) {
foreach($excludePackage in $global:excludeHashComparisionListInAzureChinaCloud) {
if ($mcURL.Contains($excludePackage)) {
$isIgnore=$true
break
Expand Down
Loading