Add changes for custom remote connections - #16923
Add changes for custom remote connections#16923Paul Higinbotham (PaulHigin) wants to merge 50 commits into
Conversation
|
Open PRs should not be assigned to milestone, so they are not assigned to the wrong milestone after they are merged. For backport consideration, use a |
|
I still have doubts that this is needed or that this is the right direction, as I don't see the analytics.
Is it worth taking any steps without understanding this? Perhaps they all want the same thing and we could join forces? I may be wrong, but I feel and what first comes to mind is that (1) gRPC is starting to dominate on both Unix and Windows, (2) it's time for some PSRP extensions. |
James Truher (JamesWTruher)
left a comment
There was a problem hiding this comment.
is there any additional validation we should be doing for these changes?
|
James Truher (@JamesWTruher) No new functionality was added so there is no need for new functional tests. Currently the only way I validate the new public APIs is via the example module I created (https://github.com/PaulHigin/SSHRemotingConnection). We could create new tests that takes a dependency on this module, but I feel it would not be that valuable for CI. I feel the best way to validate the new APIs is to have community members create their own custom connections and provide feedback.
|
|
Ilya (@iSazonov) I agree that it is time to take a critical look at PowerShell's current remoting system. But this change is a very narrow scope to allow third parties to create custom connections with the current remoting system. Granted, not very many customers will take advantage of this, but it is still important for some scenarios. Specifically, this will allow third parties to create a custom Linux/Mac -> Windows (WinRM) solution, without having to modify internal PowerShell engine code. And this is something that many customers have asked for, and which we don't currently support. |
one of the things that i've done are tests like: it "the type 'new.public.newexcitingtype' should be public" {
("new.public.newexcitingtype" -as [type]).Name | Should -Be newexcitingtype
}
|
Paul Higinbotham (@PaulHigin) Thanks for clarify! I hope we open new discussion to collect ideas and prepare experiments. |
* Add fix for process objects for processes that have exited. * Fix code factor * Fix typo * Add try/catch for possible race condition on exiting process.
|
James Truher (@JamesWTruher) That is an interesting idea but I don't see a lot of value in it. But I am thinking of creating a simpler named pipe custom module for testing. We already have support in our build for building test (module) binaries. |
|
I'm hoping to test this out at some point in the next few days, excited to see it's here. For testing it sounds like just replicating the |
Steve Lee (SteveL-MSFT)
left a comment
There was a problem hiding this comment.
Paul Higinbotham (@PaulHigin) it looks like you pulled in commits unrelated to this feature, can you fix this?
…n attempt timeout
…igin/PowerShell into custom_remote_connections2
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? 👍 :ok_hand: :thumbsdown: (Email) |
|
Closing this PR after adding new one with clean changes. |
PR Summary
This PR implements the Custom Remote Connections RFC:
https://github.com/PowerShell/PowerShell-RFC/blob/master/Archive/Draft/RFC0063-Custom-Remote-Connections.md
PR Context
These changes open up the internal PowerShell remoting API so that custom connections can be created as PowerShell modules. This PR does not introduce any new functions, and instead selectively makes some previously internal APIs public so that third parties can create custom remote connections without modifying PowerShell core engine code. See the above RFC for more details.
A new module repo has been created to serve as an example custom connection, by using the newly public API to create a named pipe custom remote connection. The module is also built in PowerShell CI to allow for testing.
This module will be transferred to the
PowerShellrepo at some point.https://github.com/PaulHigin/NamedPipeConnection
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.(which runs in a different PS Host).