Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ function FindStressPackages(
$filters['stressTest'] = 'true'
$packages = @()
$chartFiles = Get-ChildItem -Recurse -Filter 'Chart.yaml' $directory
Write-Host "Found chart files:"
Write-Host ($chartFiles -join "`n")
if ($chartFiles) {
Write-Host "Found chart files:"
Write-Host ($chartFiles -join "`n")
}

if (!$MatrixFileName) {
$MatrixFileName = 'scenarios-matrix.yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ function DeployStressTests(
-MatrixFilters $MatrixFilters `
-MatrixReplace $MatrixReplace `
-MatrixNonSparseParameters $MatrixNonSparseParameters)
if (!$pkgs -or !$pkgs.Length) {
Write-Warning "No stress test packages found in $searchDirectory"
exit 0
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using exit 0 directly terminates the entire PowerShell process, which may not be appropriate if this function is called from another script or module. Consider using return instead to exit only the function scope, or throw an error to let the caller decide how to handle this case.

Suggested change
exit 0
return

Copilot uses AI. Check for mistakes.
}
Write-Host "" "Found $($pkgs.Length) stress test packages:"
Write-Host $pkgs.Directory ""
foreach ($pkg in $pkgs) {
Expand Down