You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using powershell 7.4 (7.3.X and earlier fine)
The Tests in Help.tsts.ps1 now fails due to an additional common parameter in PowerShell 7.4.
The Help.Tsts.ps1 attempts to filter out common params through a hard coded list but that is now missing one,
specifically "ProgressAction"
On development workstations this will occur when the local runtime is bumped to 7.4, however, it will also with the devcontainer due to powershell:latest being called, which now brings 7.4
Steps to Reproduce
Merely update the powershell runtime to PowerShell 7.4.1 or later (i haven't tested 7.4.0), and run the regular build file.
you will get a series of errors showing that the parameter ProgressAction doesn't have help description or type.
Additionally just run the normal tests from the default devcontainer.
Current Behavior
help.tsts.ps1 returns some incorrect pester fails.
Expected behavior
help.tsts.ps1 doesn't validate common params
Possible Solution
2 solutions considered,
update help.tsts.ps1 static list of common params with the new param
update help.tsts.ps1 static list of common params with dynamic list of common and optional params
theoretically, either will work for now, but the dynamic option will be more resilient to future changes to Powershell.
PR coming with recommended solution of dynamic list.
Operating System and PowerShell version: ubuntu 20.04 - Ubuntu 22.04 and Windows 11, Powershell Versions 7.2 7.3 7.4
Additional context
we have a series of internal powershell modules that use the testing provided in help.tsts.ps1
the automated tests that run on our various agents cause these tests to fail if the powershell version is 7.4
while we can control the agent PS version, this is getting in the way of some development work where we have less control over the specific powershell versions. additionally the default devcontainer runs with powershell:latest , causing this model to fail as well
the fix proposed won't fix our prior deployed modules we will need to amend them, however it will prevent future modules experiencing the same issue
The text was updated successfully, but these errors were encountered:
Description
When using powershell 7.4 (7.3.X and earlier fine)
The Tests in Help.tsts.ps1 now fails due to an additional common parameter in PowerShell 7.4.
The Help.Tsts.ps1 attempts to filter out common params through a hard coded list but that is now missing one,
specifically "ProgressAction"
On development workstations this will occur when the local runtime is bumped to 7.4, however, it will also with the devcontainer due to powershell:latest being called, which now brings 7.4
Steps to Reproduce
Merely update the powershell runtime to PowerShell 7.4.1 or later (i haven't tested 7.4.0), and run the regular build file.
you will get a series of errors showing that the parameter ProgressAction doesn't have help description or type.
Additionally just run the normal tests from the default devcontainer.
Current Behavior
help.tsts.ps1 returns some incorrect pester fails.
Expected behavior
help.tsts.ps1 doesn't validate common params
Possible Solution
2 solutions considered,
theoretically, either will work for now, but the dynamic option will be more resilient to future changes to Powershell.
PR coming with recommended solution of dynamic list.
original code (doesn't work on 7.4.X)
amended dynamic code (works on 7.X)(tested on 7.2 7.3 and 7.4)
Screenshots
Environment
Additional context
we have a series of internal powershell modules that use the testing provided in help.tsts.ps1
the automated tests that run on our various agents cause these tests to fail if the powershell version is 7.4
while we can control the agent PS version, this is getting in the way of some development work where we have less control over the specific powershell versions. additionally the default devcontainer runs with powershell:latest , causing this model to fail as well
the fix proposed won't fix our prior deployed modules we will need to amend them, however it will prevent future modules experiencing the same issue
The text was updated successfully, but these errors were encountered: