Skip to content

Remove duplicate remote server mediator code#16027

Merged
rjmholt merged 2 commits intoPowerShell:masterfrom
PaulHigin:fix-mediator-dup
Sep 1, 2021
Merged

Remove duplicate remote server mediator code#16027
rjmholt merged 2 commits intoPowerShell:masterfrom
PaulHigin:fix-mediator-dup

Conversation

@PaulHigin
Copy link
Copy Markdown
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 anmenaga and daxian-dbw August 31, 2021 20:40
Copy link
Copy Markdown
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-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
Copy Markdown

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.

5 participants