Skip to content

Updated latest smoke-test to use dotnet 10 sdk and added a smoke-test…#29355

Merged
VeryEarly merged 3 commits intomainfrom
thomas-temby/smoke-test-fix
Apr 10, 2026
Merged

Updated latest smoke-test to use dotnet 10 sdk and added a smoke-test…#29355
VeryEarly merged 3 commits intomainfrom
thomas-temby/smoke-test-fix

Conversation

@thomas-temby
Copy link
Copy Markdown
Contributor

@thomas-temby thomas-temby commented Apr 2, 2026

Description

  • Updated the Smoke-Test to use dotnet 10 sdk when testing latest PowerShell
  • Updated the Smoke-Test to include powershell 7.6

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • Update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Azure PowerShell release smoke-test pipeline to exercise newer runtime combinations by adding PowerShell 7.6 smoke tests and switching the “latest PowerShell” smoke tests to run with a .NET 10 SDK.

Changes:

  • Added PowerShell 7.6 smoke-test jobs (Windows + Linux) in the release-test pipeline.
  • Updated “latest PowerShell” smoke-test jobs to use .NET SDK 10.
  • Added extra verification/error handling around PowerShell installation via dotnet tool install in the smoke-test preparation script.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
tools/Test/SmokeTest/PrepareRequiredPowershell.ps1 Enhances installation logging and adds a verification step for dotnet tool install PowerShell (for newer .NET SDKs).
.azure-pipelines/release-test.yml Introduces PS 7.6 smoke-test jobs and adds a .NET SDK 10 parameter; updates “latest” smoke tests to use it.

Comment on lines +38 to +45
if ([Version](dotnet --version) -gt [Version]"9.0.0") {
if((dotnet tool list --local --format json | ConvertFrom-Json).data.where({ $_.packageId -eq 'powershell' }).Count -gt 0) {
Write-Host "PowerShell $requiredPsVersion has been installed successfully."
} else {
throw "Failed to install PowerShell $requiredPsVersion. Please ensure the PS version is correct and target framework of the package is compatible with the OS platform. Please refer to https://www.nuget.org/packages/PowerShell for more details."
}
} else {
Write-Host "Dotnet version is less than 9.0.0, skipping the verification of PowerShell installation"
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

[Version](dotnet --version) can throw when the SDK version contains prerelease/build metadata (e.g., 10.0.100-preview...). That would break smoke tests right when targeting 10.x. Consider parsing only the numeric portion (split on -) and using System.Version::TryParse (or similar) before comparing.

Suggested change
if ([Version](dotnet --version) -gt [Version]"9.0.0") {
if((dotnet tool list --local --format json | ConvertFrom-Json).data.where({ $_.packageId -eq 'powershell' }).Count -gt 0) {
Write-Host "PowerShell $requiredPsVersion has been installed successfully."
} else {
throw "Failed to install PowerShell $requiredPsVersion. Please ensure the PS version is correct and target framework of the package is compatible with the OS platform. Please refer to https://www.nuget.org/packages/PowerShell for more details."
}
} else {
Write-Host "Dotnet version is less than 9.0.0, skipping the verification of PowerShell installation"
$dotnetVersionOutput = (dotnet --version).Trim()
$dotnetVersionString = $dotnetVersionOutput.Split('-')[0]
$dotnetVersion = $null
if (-not [Version]::TryParse($dotnetVersionString, [ref]$dotnetVersion)) {
Write-Host "Unable to parse .NET SDK version '$dotnetVersionOutput', skipping the verification of PowerShell installation"
}
elseif ($dotnetVersion -gt [Version]"9.0.0") {
if((dotnet tool list --local --format json | ConvertFrom-Json).data.where({ $_.packageId -eq 'powershell' }).Count -gt 0) {
Write-Host "PowerShell $requiredPsVersion has been installed successfully."
} else {
throw "Failed to install PowerShell $requiredPsVersion. Please ensure the PS version is correct and target framework of the package is compatible with the OS platform. Please refer to https://www.nuget.org/packages/PowerShell for more details."
}
} else {
Write-Host "Dotnet version is less than or equal to 9.0.0, skipping the verification of PowerShell installation"

Copilot uses AI. Check for mistakes.
Comment on lines +39 to +43
if((dotnet tool list --local --format json | ConvertFrom-Json).data.where({ $_.packageId -eq 'powershell' }).Count -gt 0) {
Write-Host "PowerShell $requiredPsVersion has been installed successfully."
} else {
throw "Failed to install PowerShell $requiredPsVersion. Please ensure the PS version is correct and target framework of the package is compatible with the OS platform. Please refer to https://www.nuget.org/packages/PowerShell for more details."
}
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The verification logic assumes (dotnet tool list --local --format json | ConvertFrom-Json).data exists and is non-null. If the JSON schema differs (or the command emits non-JSON output), this will throw a null/method-invocation error rather than the intended failure message. Consider guarding for missing properties / ConvertFrom-Json failures and using Where-Object with null checks before deciding success/failure.

Copilot uses AI. Check for mistakes.
dotnet tool install PowerShell
}
else {
dotnet tool install PowerShell --version $requiredPsVersion
}
if ([Version](dotnet --version) -gt [Version]"9.0.0") {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is not necessary to check the dotnet version. The exception is on purpose to notify us when new version of dotnet and/or powershell are rolled out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The dotnet version check was to ensure "dotnet tool list" had the Json output option (was failing when testing PS 5.4). I added the check so the error clearly states the failure to install PowerShell compared to the previously thrown error "Cannot find a tool in the manifest file that has a command named 'pwsh'."

Happy to remove the updated error if you'd prefer

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@thomas-temby do you mean even after line 33 and line 36, powershell is still not installed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, the error message when trying to install with a invalid sdk is "Unhandled exception: Settings file 'DotnetToolSettings.xml' was not found in the package." but does not cause the job to fail and is non-descript to someone that doesn't have prior knowledge

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The version check here would cause additional maintenance work because every time when new .NET SDK is released, you need to update the version number. Additionally, in most of the situations, the issue won't happen except for new PS version rollout. The latest job OS_Latest_PS_SmokeTest is also a duplicate of OS_PS7_6_X_SmokeTest since latest now equals to 7.6. So it is not worth any efforts here. In live test, I have removed the latest jobs and add a new PS version detection job instead. #29360

YanaXu
YanaXu previously approved these changes Apr 2, 2026
@VeryEarly VeryEarly self-assigned this Apr 2, 2026
@VeryEarly VeryEarly dismissed YanaXu’s stale review April 2, 2026 14:32

unresolved comments

@VeryEarly VeryEarly removed their assignment Apr 2, 2026
@VeryEarly
Copy link
Copy Markdown
Collaborator

Hi @thomas-temby, please resolve comments from @vidai-msft

Copilot AI review requested due to automatic review settings April 7, 2026 00:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment thread .azure-pipelines/release-test.yml Outdated
- job: CheckLatestPowerShellVersion
displayName: Check for latest PowerShell version
pool:
vmImage: ${{ variables.linuxAgentPoolName }}
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

CheckLatestPowerShellVersion uses pool: vmImage: ${{ variables.os_linux }}, but os_linux is not defined anywhere in this pipeline (and the rest of this file uses self-hosted pool names like pool-ubuntu-2404). This job will fail to start due to an unresolved variable / incorrect pool schema. Use the same pool pattern as the smoke-test jobs (e.g., pool: name: ${{ variables.linuxAgentPoolName }}) or define os_linux appropriately if you intended a Microsoft-hosted image.

Suggested change
vmImage: ${{ variables.linuxAgentPoolName }}
name: ${{ variables.linuxAgentPoolName }}

Copilot uses AI. Check for mistakes.
Comment thread .azure-pipelines/release-test.yml
Copilot AI review requested due to automatic review settings April 7, 2026 01:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comment thread .azure-pipelines/release-test.yml Outdated
targetType: filePath
filePath: ./tools/TestFx/Live/CheckLatestPowerShellVersion.ps1
env:
POWERSHELLLATEST: ${{ parameters.ps7_6 }}
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

CheckLatestPowerShellVersion.ps1 treats POWERSHELLLATEST as a major.minor string (casts it to System.Version after appending .0). Passing ${{ parameters.ps7_6 }} (default 7.6.*) will cause a FormatException and fail the job. Consider either sanitizing the value in YAML (pass 7.6) or updating the script to strip a trailing .* before version comparison.

Suggested change
POWERSHELLLATEST: ${{ parameters.ps7_6 }}
POWERSHELLLATEST: ${{ replace(parameters.ps7_6, '.*', '') }}

Copilot uses AI. Check for mistakes.
Comment thread .azure-pipelines/release-test.yml Outdated
targetType: filePath
filePath: ./tools/TestFx/Live/CheckLatestPowerShellVersion.ps1
env:
POWERSHELLLATEST: ${{ parameters.psLatest }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be pipeline variable and no need to define here.

Comment thread .azure-pipelines/release-test.yml Outdated
displayName: PowerShell 7.6.x Version
type: string
default: 7.6.*
- name: psLatest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

psLatest can be removed.

@thomas-temby thomas-temby marked this pull request as draft April 7, 2026 23:56
@thomas-temby thomas-temby force-pushed the thomas-temby/smoke-test-fix branch from 34e7d31 to b1a0e11 Compare April 8, 2026 00:49
Copilot AI review requested due to automatic review settings April 8, 2026 00:49
…ved re-validation for ps installation

Using a seperate parameter for PS latest to allow version parsing
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

Comment thread src/StackHCIVM/StackHCIVM/ChangeLog.md Outdated
Comment on lines +25 to +27
## Version 1.1.1
* Added breaking change announcements for upcoming SecureString parameter type changes in `New-AzStackHCIVMImage` and `New-AzStackHCIVMVirtualMachine`

Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This change log now has two identical '## Version 1.1.1' sections, which will duplicate release notes. Remove the duplicated entry (and ensure new notes go under '## Upcoming Release' per the header guidance).

Suggested change
## Version 1.1.1
* Added breaking change announcements for upcoming SecureString parameter type changes in `New-AzStackHCIVMImage` and `New-AzStackHCIVMVirtualMachine`

Copilot uses AI. Check for mistakes.
Comment on lines 20 to 23
## Upcoming Release

## Version 1.1.1
* Added breaking change announcements for upcoming SecureString parameter type changes in `New-AzStackHCIVMImage` and `New-AzStackHCIVMVirtualMachine`
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

PR description indicates this is a smoke-test pipeline-only change and selects 'No need for a release', but this PR modifies module ChangeLog.md content. These changelog edits look unrelated and should be reverted (or the PR description/checkbox updated if a user-facing release note is intended).

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +26
## Version 1.2.3
* Added announcement for upcoming breaking changes as part of the 2025-10-01-preview API migration:
- Removed parameter `ActionBlockResponseCode` from `New-AzDnsResolverPolicyDnsSecurityRule` and `Update-AzDnsResolverPolicyDnsSecurityRule`. The block response code is no longer configurable.
- Parameter `DnsResolverDomainList` is no longer mandatory on `New-AzDnsResolverPolicyDnsSecurityRule`. DNS security rules will support managed domain lists as an alternative to user-defined domain lists.
- Parameter `Domain` is no longer mandatory on `New-AzDnsResolverDomainList`. Domain lists will support bulk upload via the new cmdlet `Invoke-AzDnsResolverBulkDnsResolverDomainList`, which will be introduced in the upcoming release.
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This file repeats the entire '## Version 1.2.3' section twice. Remove the duplicate to avoid publishing the same breaking-change announcement twice (and keep new notes under '## Upcoming Release' rather than introducing a second identical version header).

Copilot uses AI. Check for mistakes.
Comment thread src/CosmosDB/CosmosDB/ChangeLog.md Outdated
Comment on lines +27 to +30
## Version 1.20.0
* Added `-DisableLocalAuth` parameter to `New-AzCosmosDBAccount` and `Update-AzCosmosDBAccount` to opt out of local authentication.
* Added `-Capabilities` parameter to `Update-AzCosmosDBAccount` to allow adding or removing account capabilities.

Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

This change log now contains duplicate '## Version 1.20.0' entries with the same bullet points. Remove the duplicated version section to prevent duplicate release notes.

Suggested change
## Version 1.20.0
* Added `-DisableLocalAuth` parameter to `New-AzCosmosDBAccount` and `Update-AzCosmosDBAccount` to opt out of local authentication.
* Added `-Capabilities` parameter to `Update-AzCosmosDBAccount` to allow adding or removing account capabilities.

Copilot uses AI. Check for mistakes.
Comment thread .azure-pipelines/release-test.yml
@thomas-temby thomas-temby force-pushed the thomas-temby/smoke-test-fix branch from b1a0e11 to f736dfd Compare April 8, 2026 00:55
Copilot AI review requested due to automatic review settings April 8, 2026 01:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment thread .azure-pipelines/release-test.yml
Comment thread .azure-pipelines/release-test.yml
Comment thread .azure-pipelines/release-test.yml Outdated
default: 10.x

variables:
POWERSHELLLATEST: 7.6
Copy link

Copilot AI Apr 8, 2026

Choose a reason for hiding this comment

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

POWERSHELLLATEST is a hard-coded duplicate of the highest tested PS minor version (currently ps7_6). This creates a maintenance hazard if the test matrix is updated (e.g., ps7_7) but POWERSHELLLATEST isn’t changed, leading to false warnings/incorrect version checks. Consider deriving it from parameters.ps7_6 (e.g., stripping .*) or making it a parameter so it’s updated in one place.

Suggested change
POWERSHELLLATEST: 7.6
POWERSHELLLATEST: ${{ replace(parameters.ps7_6, '.*', '') }}

Copilot uses AI. Check for mistakes.
@thomas-temby thomas-temby force-pushed the thomas-temby/smoke-test-fix branch from d7b70e5 to 19b968d Compare April 8, 2026 01:47
@thomas-temby thomas-temby force-pushed the thomas-temby/smoke-test-fix branch from 19b968d to c3dd648 Compare April 8, 2026 01:54
Copilot AI review requested due to automatic review settings April 8, 2026 01:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@thomas-temby thomas-temby marked this pull request as ready for review April 8, 2026 02:13
@VeryEarly VeryEarly merged commit bccd62a into main Apr 10, 2026
27 checks passed
@VeryEarly VeryEarly deleted the thomas-temby/smoke-test-fix branch April 10, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants