Skip to content
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

Remove duplicate remote server mediator code #16027

Merged
merged 2 commits into from Sep 1, 2021
Merged

Remove duplicate remote server mediator code #16027

merged 2 commits into from Sep 1, 2021

Conversation

PaulHigin
Copy link
Contributor

@PaulHigin PaulHigin commented Aug 31, 2021

PR Summary

This PR removes duplicate server mediator classes, and refactors code to use a single mediator for StdIO based connections.
It also fixes parameter arguments so that configuration name is passed in correctly.

PR Context

There used to be two separate server mediator derivations, one each for OutOfProc and SSH transports. They both use StdIO for communication, but SSH had special code to deal with .NET implementation inconsistencies. But .NET addressed the issues and now both class derivations operate identically. So this PR creates a single StdIOProcessMediator class for both uses.

I also found a bug where the 'configurationName' parameter was not passed in correctly for HyperV mediators. I fixed the issues, but it turns out that the code path is not being used for PowerShellDirect VM connections, but I am not sure about container connections.
Actually, neither of these code paths are used because currently PowerShellDirect only works with WindowsPowerShell.

PR Checklist

@ghost ghost assigned rjmholt Aug 31, 2021
@PaulHigin PaulHigin requested review from SteveL-MSFT and removed request for daxian-dbw and anmenaga August 31, 2021 20:40
Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one suggestion

@rjmholt rjmholt merged commit 946341b into PowerShell:master Sep 1, 2021
xtqqczze pushed a commit to xtqqczze/PowerShell that referenced this pull request Sep 2, 2021
@adityapatwardhan adityapatwardhan added Backport-7.2.x-Done CL-Engine Indicates that a PR should be marked as an engine change in the Change Log labels Sep 15, 2021
@adityapatwardhan adityapatwardhan added this to the 7.2.0-preview.10 milestone Sep 15, 2021
@ghost
Copy link

ghost commented Dec 16, 2021

🎉v7.3.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport-7.2.x-Done CL-Engine Indicates that a PR should be marked as an engine change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants