Skip to content

Conversation

@PaulHigin
Copy link
Contributor

PR Summary

This fixes session reconnect regression bug: #11150.

PR Context

Invoke-Command creates a disconnected job object to facilitate session re-connection, when WinRM abruptly disconnects the session due to network issues. The EndProcessing() block was disposing the disconnected job object so that a session reconnect could not occur.

Fix is to add the checks back in the code which prevents EndProcessing() from disposing the disconnected job, and added comments explaining why the code checks are there.

PR Checklist

@ghost ghost assigned TravisEz13 Dec 17, 2019
@PaulHigin PaulHigin added WG-Remoting PSRP issues with any transport layer Issue-Bug Issue has been identified as a bug in the product labels Dec 18, 2019
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.

Code change looks fine, possible to add a local loopback test?

@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Dec 18, 2019
@PaulHigin
Copy link
Contributor Author

@SteveL-MSFT

Regarding automated tests, the repro requires abruptly disconnecting a synchronous running Invoke-Command (Invoke-Command -AsJob does not exhibit the problem).

This is moderately easy to do interactively, but difficult for an automated CI test since it involves multiple processes and timing.

My concern is creating yet another fragile test that fails randomly, adding unnecessary misery to build engineers.

@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Dec 18, 2019
@PaulHigin
Copy link
Contributor Author

Actually, I thought about this some more and have found a simpler way to test this scenario. I feel the test should be reasonably reliable and will add it here. We can always remove the test if it turns out to be fragile.

@PaulHigin PaulHigin assigned anmenaga and unassigned TravisEz13 Dec 19, 2019
@anmenaga anmenaga added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Dec 20, 2019
@anmenaga anmenaga added this to the 7.1.0-preview.1 milestone Dec 20, 2019
@anmenaga anmenaga merged commit e81bd1d into PowerShell:master Dec 20, 2019
@PaulHigin PaulHigin deleted the fix-session-reconnect-regression branch December 20, 2019 20:32
@ghost
Copy link

ghost commented Mar 26, 2020

🎉v7.1.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

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log Issue-Bug Issue has been identified as a bug in the product WG-Remoting PSRP issues with any transport layer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants