From feab5d879620c346a6b9475c48a13e02fe173ac0 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Thu, 27 Oct 2022 18:07:40 -0700 Subject: [PATCH] Sync eng/common directory with azure-sdk-tools for PR 4543 (#32080) * stress test addons version check * cleanup Co-authored-by: Albert Cheng --- .../stress-testing/find-all-stress-packages.ps1 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 b/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 index f949b03ad8a3d..673e64e73bfd0 100644 --- a/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 +++ b/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 @@ -36,6 +36,8 @@ function FindStressPackages( } foreach ($chartFile in $chartFiles) { $chart = ParseChart $chartFile + + VerifyAddonsVersion $chart if (matchesAnnotations $chart $filters) { $matrixFilePath = (Join-Path $chartFile.Directory.FullName $MatrixFileName) if (Test-Path $matrixFilePath) { @@ -73,6 +75,15 @@ function MatchesAnnotations([hashtable]$chart, [hashtable]$filters) { return $true } +function VerifyAddonsVersion([hashtable]$chart) { + foreach ($dependency in $chart.dependencies) { + if ($dependency.name -eq "stress-test-addons" -and + $dependency.version -lt "0.2.0") { + throw "The stress-test-addons version in use is $($dependency.version), please use versions >= 0.2.0" + } + } +} + function GetUsername() { # Check GITHUB_USER for users in codespaces environments, since the default user is `codespaces` and # we would like to avoid namespace overlaps for different codespaces users.