-
Notifications
You must be signed in to change notification settings - Fork 8.1k
WIP: Deprecate workflow-related keywords (workflow, sequence, parallel, and inlinescript) #10318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Deprecate workflow-related keywords (workflow, sequence, parallel, and inlinescript) #10318
Conversation
|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-macos
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /Users/vsts/agent/2.155.1/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /Users/vsts/agent/2.155.1/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-windows
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\PowerShellGet\PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\PowerShellGet\PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-linux
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
@SteveL-MSFT The two Pester errors that occur on each platform happen because Since I can use Longer term, we could also update PowerShellGet to recognize parser errors about deprecated keywords. The parser error that is being generated by the parser in this PR is very specific, and clearly identifies when a keyword is deprecated. The keyword token also has a flag indicating that it is deprecated. In the case where a deprecated keyword is found, PowerShellGet could simply ignore that error since it shouldn't care. You can see both the descriptive error id and the keyword Please let me know how you would like to proceed. |
|
/cc @SteveL-MSFT |
|
If we do want these keywords deprecated, the simple solution for PowerShellGet is to check if a script/module has workflow in it before installing it, and prevent that installation from happening if that is the case in PowerShell 7+. That's logical, necessary, and the right thing to do. Users can still save the script, which does not do any parsing checks, and that is the most they would want to do in a version of PowerShell that doesn't support workflow anyway. They shouldn't be able to install a script that is incompatible even with -Force (why would I be able to install something I can't use -- installers prevent such things, and rightly so). Since that change should probably happen regardless, and since that change fixes these issues, we could move forward with little effort with that change plus splitting the tests in question into two, so that they test for success and failure when it comes to workflow. |
|
Today the cleanup is not critical and we could do not break PowerShellGet in the PR. Although we need an understanding of how to proceed in future |
|
For now, perhaps we should have an issue opened in PowerShellGet repo to produce an error if a script is incompatible. For this PR, we can wait on this since it's desirable, but not critical. |
|
Issue PowerShell/PowerShellGet#528 has been logged so that the issue can be fixed in PowerShellGet. |
|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-macos
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /Users/vsts/agent/2.155.1/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /Users/vsts/agent/2.155.1/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-linux
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-windows
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\PowerShellGet\PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\PowerShellGet\PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
I set WIP until we PowerShellGet issue will be resolved. |
|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-linux
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-windows
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\PowerShellGet\PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\PowerShellGet\PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-macos
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /Users/runner/runners/2.158.0/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /Users/runner/runners/2.158.0/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty
PaulHigin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me, as long as all tests continue to pass. Since these include a lot of parser/token changes I would like @daxian-dbw to also review them.
|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-linux
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /home/vsts/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-macos
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /Users/runner/runners/2.165.2/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, /Users/runner/runners/2.165.2/work/1/s/test/powershell/Modules/PowerShellGet/PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
|
||
| return completionResults; | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@KirkMunro, your last commit had 2 failures in PowerShell-CI-windows
PowerShellGet - Script tests (Admin).Should install a script correctly to the required location with AllUsers scope
Expected a value, but got $null or empty.
at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\PowerShellGet\PowerShellGet.Tests.ps1: line 234
234: $installedScriptInfo | Should -Not -BeNullOrEmptyPowerShellGet - Script tests.Should install a script correctly to the required location with default CurrentUser scope
Expected a value, but got $null or empty.
at <ScriptBlock>, D:\a\1\s\test\powershell\Modules\PowerShellGet\PowerShellGet.Tests.ps1: line 207
207: $installedScriptInfo | Should -Not -BeNullOrEmpty|
@KirkMunro Please fix CI issues and remove |
|
This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 15 days. It will be closed if no further activity occurs within 10 days of this comment. |
|
@adityapatwardhan Here are the problems with this PR:
That is why this was marked WIP: because it is dependent on an issue that I just discovered is missing. I'd like to know what happened to that issue, because issues should not be deleted. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@alerickson - Can you have a look why the issue in PowerShellGet disappeared? |
|
@adityapatwardhan @KirkMunro the name of the PSGet repository for versions below 3 is now called PowerShellGetv2, the issue is still there though: PowerShell/PowerShellGetv2/issues/528. We won't address non-security related issues in that repo, but I'll transfer the issue over to the new repo so we can check before installing scripts in v3. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
@KirkMunro I guess we will have to wait till the version of PSGet that fixes the issue is included in PowerShell release. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
|
Closing. See #10238 (comment). |
PR Summary
Cleanup of workflow code that has been deprecated. In particular:
workflowkeywordparallelkeyword (used for parallel activities in workflow)sequencekeyword (used for sequential activities in workflow)inlinescriptactivity (used for activities outside of workflow)The keywords in question have been preserved, but will now generate parser errors because they are deprecated.
PR Context
See issue #9570.
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.