-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Add Enable-ExperimentalFeature and Disable-ExperimentalFeature cmdlets
#8318
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
Add Enable-ExperimentalFeature and Disable-ExperimentalFeature cmdlets
#8318
Conversation
test/powershell/engine/ExperimentalFeature/EnableDisable-ExperimentalFeature.Tests.ps1
Outdated
Show resolved
Hide resolved
rjmholt
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.
Have left some small comments, but it all looks pretty good to me. We should also make sure we start the documentation process before merging this PR.
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/Modules/ModuleIntrinsics.cs
Outdated
Show resolved
Hide resolved
test/powershell/engine/ExperimentalFeature/EnableDisable-ExperimentalFeature.Tests.ps1
Outdated
Show resolved
Hide resolved
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
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.
We should write to file only if the features array changes.
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.
Seems like this should be a separate issue for WriteValueToFile(). Opened #8325
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.
Actually, I disagree. We can save even running WriteValueToFile() code, which involves opening the file and reading data, by simply keeping track of whether we actually have a change to record.
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.
Unless we are concerned with file contention. If so, then I assume the last write to should win, and it makes sense to ensure the file actually reflects the current config state.
808b72b to
c8743f3
Compare
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.
LGTM
|
Can we assign two |
|
@PowerShell/powershell-committee reviewed this as part of the RFC review and approves of the breaking change and current cmdlet design |
c8743f3 to
4ba6cbc
Compare
4ba6cbc to
6727dd7
Compare
|
Doc PR submitted and linked |
iSazonov
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.
We lost the comment perUserConfigFile -> _perUserConfigFile for private.
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
test/powershell/engine/ExperimentalFeature/Get-ExperimentalFeature.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/engine/ExperimentalFeature/Get-ExperimentalFeature.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/engine/ExperimentalFeature/Get-ExperimentalFeature.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/engine/ExperimentalFeature/Get-ExperimentalFeature.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/engine/ExperimentalFeature/Get-ExperimentalFeature.Tests.ps1
Outdated
Show resolved
Hide resolved
test/powershell/engine/ExperimentalFeature/Get-ExperimentalFeature.Tests.ps1
Outdated
Show resolved
Hide resolved
…ture.Tests.ps1 Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
…ture.Tests.ps1 Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
…ture.Tests.ps1 Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
…ture.Tests.ps1 Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
…ture.Tests.ps1 Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
…ture.Tests.ps1 Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
iSazonov
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.
@SteveL-MSFT You skipped two my comments for Should -BeFalse
…ture.Tests.ps1 Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
…ture.Tests.ps1 Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
|
@iSazonov it was hidden under GitHub collapsing it. Thanks for calling it out. Fixed. |
|
@SteveL-MSFT HelpUri do not pass tests. |
iSazonov
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.
It seems we need remove the cmdlets from release versions.
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/resources/ExperimentalFeatureStrings.resx
Show resolved
Hide resolved
…ableDisableExperimentalFeatureCommand.cs Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
src/System.Management.Automation/engine/ExperimentalFeature/GetExperimentalFeatureCommand.cs
Show resolved
Hide resolved
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Outdated
Show resolved
Hide resolved
....Management.Automation/engine/ExperimentalFeature/EnableDisableExperimentalFeatureCommand.cs
Show resolved
Hide resolved
test/powershell/engine/ExperimentalFeature/Get-ExperimentalFeature.Tests.ps1
Show resolved
Hide resolved
…ableDisableExperimentalFeatureCommand.cs Co-Authored-By: SteveL-MSFT <slee@microsoft.com>
|
@SteveL-MSFT One test for |
|
@daxian-dbw I forgot to update the tests to reflect that the cmdlet no longer outputs the feature object. Will update. |
PR Summary
Add
Enable-ExperimentalFeatureandDisable-ExperimentalFeaturecmdlets. Remove-ListAvailablefromGet-ExperimentalFeature(Breaking Change). Add ArgumentCompleter forGet-ExperimentalFeaturecmdlet. Refactor some existing Experimental Feature tests. MakeConfigScopepublic and renamedSystemWidetoAllUsers.Implements PowerShell/PowerShell-RFC#148
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests