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

Sync eng/common directory with azure-sdk-tools for PR 4543 #4071

Merged
merged 2 commits into from
Oct 28, 2022
Merged
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 eng/common/scripts/stress-testing/find-all-stress-packages.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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.
Expand Down