From 715cecc17bd9175dd5c6e90d4cb9e3cc324587ec Mon Sep 17 00:00:00 2001 From: Ben Broderick Phillips Date: Wed, 20 Nov 2024 15:33:42 -0500 Subject: [PATCH] Bump powershell yaml versions to 0.4.7 (#9326) --- eng/common-tests/psmodule-helpers/Install-Module-Parallel.ps1 | 4 ++-- eng/common/scripts/Cadl-Project-Generate.ps1 | 2 +- eng/common/scripts/Cadl-Project-Sync.ps1 | 2 +- eng/common/scripts/Helpers/Package-Helpers.ps1 | 2 +- eng/common/scripts/TypeSpec-Project-Generate.ps1 | 2 +- eng/common/scripts/TypeSpec-Project-Process.ps1 | 4 ++-- eng/common/scripts/TypeSpec-Project-Sync.ps1 | 2 +- eng/common/scripts/Update-DocsMsToc.ps1 | 2 +- eng/common/scripts/Verify-Resource-Ref.ps1 | 4 ++-- eng/common/scripts/Verify-RestApiSpecLocation.ps1 | 2 +- eng/common/scripts/job-matrix/job-matrix-functions.ps1 | 2 +- .../scripts/stress-testing/stress-test-deployment-lib.ps1 | 2 +- tools/stress-cluster/cluster/provision.ps1 | 2 +- 13 files changed, 16 insertions(+), 16 deletions(-) diff --git a/eng/common-tests/psmodule-helpers/Install-Module-Parallel.ps1 b/eng/common-tests/psmodule-helpers/Install-Module-Parallel.ps1 index 9a0e4c062..1d129db20 100644 --- a/eng/common-tests/psmodule-helpers/Install-Module-Parallel.ps1 +++ b/eng/common-tests/psmodule-helpers/Install-Module-Parallel.ps1 @@ -4,8 +4,8 @@ $command = { . $PWD/../../common/scripts/Helpers/PSModule-Helpers.ps1 - Write-Host 'Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module' - Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module + Write-Host 'Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module' + Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module Write-Host } diff --git a/eng/common/scripts/Cadl-Project-Generate.ps1 b/eng/common/scripts/Cadl-Project-Generate.ps1 index bd4a2377e..e989042e5 100644 --- a/eng/common/scripts/Cadl-Project-Generate.ps1 +++ b/eng/common/scripts/Cadl-Project-Generate.ps1 @@ -12,7 +12,7 @@ param ( $ErrorActionPreference = "Stop" . $PSScriptRoot/Helpers/PSModule-Helpers.ps1 . $PSScriptRoot/common.ps1 -Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module +Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module function NpmInstallForProject([string]$workingDirectory) { Push-Location $workingDirectory diff --git a/eng/common/scripts/Cadl-Project-Sync.ps1 b/eng/common/scripts/Cadl-Project-Sync.ps1 index c6e8cf5ce..5d661e90e 100644 --- a/eng/common/scripts/Cadl-Project-Sync.ps1 +++ b/eng/common/scripts/Cadl-Project-Sync.ps1 @@ -9,7 +9,7 @@ param ( $ErrorActionPreference = "Stop" . $PSScriptRoot/Helpers/PSModule-Helpers.ps1 -Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module +Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module $sparseCheckoutFile = ".git/info/sparse-checkout" function AddSparseCheckoutPath([string]$subDirectory) { diff --git a/eng/common/scripts/Helpers/Package-Helpers.ps1 b/eng/common/scripts/Helpers/Package-Helpers.ps1 index e83be6643..f1ea6ef91 100644 --- a/eng/common/scripts/Helpers/Package-Helpers.ps1 +++ b/eng/common/scripts/Helpers/Package-Helpers.ps1 @@ -80,7 +80,7 @@ function CompatibleConvertFrom-Yaml { $yqPresent = Get-Command 'yq' -ErrorAction SilentlyContinue if (-not $yqPresent) { . (Join-Path $PSScriptRoot PSModule-Helpers.ps1) - Install-ModuleIfNotInstalled -WhatIf:$false "powershell-yaml" "0.4.1" | Import-Module + Install-ModuleIfNotInstalled -WhatIf:$false "powershell-yaml" "0.4.7" | Import-Module } # Process the content (for example, you could convert from YAML here) diff --git a/eng/common/scripts/TypeSpec-Project-Generate.ps1 b/eng/common/scripts/TypeSpec-Project-Generate.ps1 index e0ca0a55f..4f8fa144b 100644 --- a/eng/common/scripts/TypeSpec-Project-Generate.ps1 +++ b/eng/common/scripts/TypeSpec-Project-Generate.ps1 @@ -13,7 +13,7 @@ $ErrorActionPreference = "Stop" . $PSScriptRoot/Helpers/PSModule-Helpers.ps1 . $PSScriptRoot/Helpers/CommandInvocation-Helpers.ps1 . $PSScriptRoot/common.ps1 -Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module +Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module function NpmInstallForProject([string]$workingDirectory) { Push-Location $workingDirectory diff --git a/eng/common/scripts/TypeSpec-Project-Process.ps1 b/eng/common/scripts/TypeSpec-Project-Process.ps1 index 7b894379e..e4b933479 100644 --- a/eng/common/scripts/TypeSpec-Project-Process.ps1 +++ b/eng/common/scripts/TypeSpec-Project-Process.ps1 @@ -14,7 +14,7 @@ param ( . $PSScriptRoot/common.ps1 . $PSScriptRoot/Helpers/PSModule-Helpers.ps1 -Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module +Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module function CreateUpdate-TspLocation([System.Object]$tspConfig, [string]$TypeSpecProjectDirectory, [string]$CommitHash, [string]$repo, [string]$repoRoot, [ref]$isNewSdkProject) { $additionalDirs = @() @@ -225,4 +225,4 @@ if ($SkipSyncAndGenerate -and !$isNewSdkProject) { } } -return $sdkProjectFolder \ No newline at end of file +return $sdkProjectFolder diff --git a/eng/common/scripts/TypeSpec-Project-Sync.ps1 b/eng/common/scripts/TypeSpec-Project-Sync.ps1 index 0c7427af4..ce4514893 100644 --- a/eng/common/scripts/TypeSpec-Project-Sync.ps1 +++ b/eng/common/scripts/TypeSpec-Project-Sync.ps1 @@ -11,7 +11,7 @@ param ( $ErrorActionPreference = "Stop" . $PSScriptRoot/Helpers/PSModule-Helpers.ps1 -Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module +Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module $sparseCheckoutFile = ".git/info/sparse-checkout" function AddSparseCheckoutPath([string]$subDirectory) { diff --git a/eng/common/scripts/Update-DocsMsToc.ps1 b/eng/common/scripts/Update-DocsMsToc.ps1 index 61596d81c..aa84b1c6b 100644 --- a/eng/common/scripts/Update-DocsMsToc.ps1 +++ b/eng/common/scripts/Update-DocsMsToc.ps1 @@ -55,7 +55,7 @@ param( . $PSScriptRoot/common.ps1 . $PSScriptRoot/Helpers/PSModule-Helpers.ps1 -Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module +Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module Set-StrictMode -Version 3 diff --git a/eng/common/scripts/Verify-Resource-Ref.ps1 b/eng/common/scripts/Verify-Resource-Ref.ps1 index f806290e9..8669a2988 100644 --- a/eng/common/scripts/Verify-Resource-Ref.ps1 +++ b/eng/common/scripts/Verify-Resource-Ref.ps1 @@ -1,5 +1,5 @@ . (Join-Path $PSScriptRoot common.ps1) -Install-Module -Name powershell-yaml -RequiredVersion 0.4.1 -Force -Scope CurrentUser +Install-Module -Name powershell-yaml -RequiredVersion 0.4.7 -Force -Scope CurrentUser $ymlfiles = Get-ChildItem $RepoRoot -recurse | Where-Object {$_ -like '*.yml'} $affectedRepos = [System.Collections.ArrayList]::new() @@ -48,4 +48,4 @@ if ($affectedRepos.Count -gt 0) exit 1 } -Write-Output "All repository resources in yaml files reference a valid tag" \ No newline at end of file +Write-Output "All repository resources in yaml files reference a valid tag" diff --git a/eng/common/scripts/Verify-RestApiSpecLocation.ps1 b/eng/common/scripts/Verify-RestApiSpecLocation.ps1 index 8a420bd76..7182db193 100644 --- a/eng/common/scripts/Verify-RestApiSpecLocation.ps1 +++ b/eng/common/scripts/Verify-RestApiSpecLocation.ps1 @@ -50,7 +50,7 @@ if (-not $GitHubPat) { Write-Host "The spec used to release SDK should be from the main branch of Azure/azure-rest-api-specs repository." Write-Host "ServiceDir:$ServiceDirectory, PackageName:$PackageName, ArtifactLocation:$ArtifactLocation, PackageInfoDirectory:$PackageInfoDirectory." -Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module +Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module # This function is used to verify the 'require' and 'input-file' settings in autorest.md point to the main branch of Azure/azure-rest-api-specs repository # input-file may be: diff --git a/eng/common/scripts/job-matrix/job-matrix-functions.ps1 b/eng/common/scripts/job-matrix/job-matrix-functions.ps1 index e271d0f21..e327763bd 100644 --- a/eng/common/scripts/job-matrix/job-matrix-functions.ps1 +++ b/eng/common/scripts/job-matrix/job-matrix-functions.ps1 @@ -213,7 +213,7 @@ function GetMatrixConfigFromFile([String] $config) { } function GetMatrixConfigFromYaml([String] $yamlConfig) { - Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module + Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module # ConvertTo then from json is to make sure the nested values are in PSCustomObject [MatrixConfig]$config = ConvertFrom-Yaml $yamlConfig -Ordered | ConvertTo-Json -Depth 100 | ConvertFrom-Json return GetMatrixConfig $config 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 48bab2c49..56876ba0e 100644 --- a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 +++ b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 @@ -414,7 +414,7 @@ function CheckDependencies() } ) - Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module + Install-ModuleIfNotInstalled "powershell-yaml" "0.4.7" | Import-Module $shouldError = $false foreach ($dep in $deps) { diff --git a/tools/stress-cluster/cluster/provision.ps1 b/tools/stress-cluster/cluster/provision.ps1 index 2abcdfc6f..78a245f0f 100644 --- a/tools/stress-cluster/cluster/provision.ps1 +++ b/tools/stress-cluster/cluster/provision.ps1 @@ -21,7 +21,7 @@ param ( $ErrorActionPreference = 'Stop' . (Join-Path $PSScriptRoot "../../../eng/common/scripts/Helpers" PSModule-Helpers.ps1) -Install-ModuleIfNotInstalled -WhatIf:$false "powershell-yaml" "0.4.1" | Import-Module +Install-ModuleIfNotInstalled -WhatIf:$false "powershell-yaml" "0.4.7" | Import-Module $STATIC_TEST_DOTENV_NAME="public" $VALUES_FILE = "$PSScriptRoot/kubernetes/stress-test-addons/values.yaml"