[stress testing] Allow default matrix selection override (#9249)
This commit is contained in:
Родитель
3e821cacfa
Коммит
ae456bab66
|
@ -48,11 +48,21 @@ function FindStressPackages(
|
|||
|
||||
VerifyAddonsVersion $chart $chartFile
|
||||
|
||||
# Default to "sparse" matrix selection type, unless a default is specified
|
||||
# in Chart.yaml annotations, or an override is passed in from the command line
|
||||
$selection = if ($MatrixSelection) {
|
||||
$MatrixSelection
|
||||
} elseif ($chart['annotations'] -and $chart['annotations']['matrixSelection']) {
|
||||
$chart['annotations']['matrixSelection']
|
||||
} else {
|
||||
"sparse"
|
||||
}
|
||||
|
||||
$matrixFilePath = (Join-Path $chartFile.Directory.FullName $MatrixFileName)
|
||||
if (Test-Path $matrixFilePath) {
|
||||
GenerateScenarioMatrix `
|
||||
-matrixFilePath $matrixFilePath `
|
||||
-Selection $MatrixSelection `
|
||||
-Selection $selection `
|
||||
-DisplayNameFilter $MatrixDisplayNameFilter `
|
||||
-Filters $MatrixFilters `
|
||||
-Replace $MatrixReplace `
|
||||
|
|
|
@ -103,7 +103,7 @@ function DeployStressTests(
|
|||
[Parameter(Mandatory=$False)][switch]$Template,
|
||||
[Parameter(Mandatory=$False)][switch]$RetryFailedTests,
|
||||
[Parameter(Mandatory=$False)][string]$MatrixFileName,
|
||||
[Parameter(Mandatory=$False)][string]$MatrixSelection = "sparse",
|
||||
[Parameter(Mandatory=$False)][string]$MatrixSelection,
|
||||
[Parameter(Mandatory=$False)][string]$MatrixDisplayNameFilter,
|
||||
[Parameter(Mandatory=$False)][array]$MatrixFilters,
|
||||
[Parameter(Mandatory=$False)][array]$MatrixReplace,
|
||||
|
|
|
@ -624,6 +624,17 @@ A more detailed information on the logic behind the matrix generation can be fou
|
|||
|
||||
The `stress-test-addons` helm library will handle a scenarios matrix automatically, and deploy multiple instances of the stress test job, one for each scenario with customized values.
|
||||
|
||||
NOTE: Matrix generation has two modes, 'sparse' and 'all', which generate either the minimum set of tests covering all parameters or an exhaustive set. See https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/matrix_generator.md#matrix-generation-behavior for more details. The deploy script defaults to 'sparse' mode, but this can be customized either by passing `-MatrixSelection <mode>` to the deploy script or overriding the default selection via `annotations.matrixSelection` under Chart.yaml:
|
||||
|
||||
```
|
||||
# Chart.yaml
|
||||
...
|
||||
annotations:
|
||||
stressTest: 'true'
|
||||
namespace: 'examples'
|
||||
matrixSelection: 'all'
|
||||
```
|
||||
|
||||
### Node Size Requirements
|
||||
|
||||
The stress test cluster may be deployed with several node SKUs (see [agentPoolProfiles declaration and
|
||||
|
|
Загрузка…
Ссылка в новой задаче