Fix Start-Benchmarking to put TargetPSVersion and TargetFramework in separate parameter sets#15508
Conversation
…k' in separate parameter sets
|
@anmenaga The CIs won't run for files under the path |
| [Parameter(ParameterSetName = 'Default')] | ||
| [Parameter(ParameterSetName = 'TargetPSVersion')] | ||
| [ValidatePattern( | ||
| '^7\.(0|1|2)\.\d+(-preview\.\d{1,2})?$', |
There was a problem hiding this comment.
Defining the pattern in this way requires that it be updated for every new minor (and/or major) PSVersion. This seems like there should be a better way; is there not a way the function can check the supplied version against an automatically-determined list of possible versions?
There was a problem hiding this comment.
Yeah, the current validation is not optimal. In fact, not just here, the powershell-perf.csproj also requires manual updates when we move to a new PS version or new .NET runtime, because it hardcodes the supported .NET frameworks, as well as the latest PS version corresponding to a specific .NET framework. It would be nice if we can avoid the need of manual updates to both perf.psm1 and powershell-perf.csproj. Anyways, that should be a separate PR 😄
There was a problem hiding this comment.
We could move this in a json config file.
|
🎉 Handy links: |
PR Summary
Fix
Start-Benchmarkingto putTargetPSVersionandTargetFrameworkin separate parameter setsFor a specific version of PowerShell SDK, we want to run benchmarks with it targeting the latest .NET runtime, so that we are comparing only the differences in the PowerShell implementation.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.