From 5b542956e258a21bf415f864e2ecc9ca403550e1 Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Tue, 9 Jul 2024 17:53:09 -0400 Subject: [PATCH] Support regex/negative regex filters for stress test discovery. Add storage env defaults --- .../scripts/stress-testing/find-all-stress-packages.ps1 | 2 +- .../scripts/stress-testing/stress-test-deployment-lib.ps1 | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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 a79db98e7c968..bec510cd958a6 100644 --- a/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 +++ b/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 @@ -75,7 +75,7 @@ function ParseChart([string]$chartFile) { function MatchesAnnotations([hashtable]$chart, [hashtable]$filters) { foreach ($filter in $filters.GetEnumerator()) { - if (!$chart["annotations"] -or $chart["annotations"][$filter.Key] -ne $filter.Value) { + if (!$chart["annotations"] -or $chart["annotations"][$filter.Key] -notmatch $filter.Value) { return $false } } diff --git a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 index aa426d7b4687d..c67540f3b3e5c 100644 --- a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 +++ b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 @@ -122,6 +122,12 @@ function DeployStressTests( } $clusterGroup = 'rg-stress-cluster-prod' $subscription = 'Azure SDK Test Resources' + } elseif ($environment -eq 'storage') { + if ($clusterGroup -or $subscription) { + Write-Warning "Overriding cluster group and subscription with defaults for 'storage' environment." + } + $clusterGroup = 'rg-stress-cluster-storage' + $subscription = 'XClient' } elseif (!$clusterGroup -or !$subscription) { throw "clusterGroup and subscription parameters must be specified when deploying to an environment that is not pg or prod." }