-
Notifications
You must be signed in to change notification settings - Fork 52
Experimental PowerShell discover extension #1071
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
base: main
Are you sure you want to change the base?
Conversation
With PR #1025 around, it might be worthwhile to rename the directories. |
623d593
to
5b7502f
Compare
5b7502f
to
991f7ce
Compare
…jsreyn/operation-methods into implement-powershell-discover
6337045
to
f15195a
Compare
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.
A few questions and requests:
- Do I correctly understand that this extension only for resources implemented in PowerShell and excluding Windows PowerShell? If so, do we need a second extension for discovering those resources, or can we handle that in this one? I'm not sure I see an immediate reason for why we can't handle both here, given the manifest has to indicate whether the resource is invoked with
powershell
orpwsh
. - Can we slightly restructure this script to define (currently empty)
param
block and put the implementation into theprocess
block? That can help with organization and testing later on. - The current implementation can't run in Windows PowerShell, I think, given the use of
ForEach-Object -Parallel
- but we can still discover resources in Windows PowerShell modules.
|
…jsreyn/operation-methods into implement-powershell-discover
The WG discussed this and agree to not have WinPS support initially until there is a customer need |
@SteveL-MSFT - by any chance, if you have time to review this one, I would appreciate it. |
PR Summary
Implements an optimized approach to discovering PowerShell resources using .NET with parallel processing and direct result synchronization.
The previous approach using Get-ChildItem had unnecessary object overhead and required post-processing with
Where-Object
. The same is implied when using a thread-safe collection (ConcurrentBag), which adds unnecessary complexity.PR Context
Fix #913
Note
While I recognize the need for caching in the issue, I left it out for now, assuming we can increment it over time.