Skip to content

Handle exceptions during pipe connection wait in WindowsPipeRunner#821

Merged
Vasu1105 merged 2 commits intomainfrom
CHEF-19255-escape-windows-pipe-connection-issues
Jan 20, 2026
Merged

Handle exceptions during pipe connection wait in WindowsPipeRunner#821
Vasu1105 merged 2 commits intomainfrom
CHEF-19255-escape-windows-pipe-connection-issues

Conversation

@sathish-progress
Copy link
Contributor

@sathish-progress sathish-progress commented Jan 19, 2026

This pull request adds improved error handling and more robust test coverage for the named pipe communication logic in the local transport. The main focus is on making the pipe server more resilient to connection errors and ensuring that the client code can recover from transient failures or broken pipes.

Description

Error Handling Improvements:

  • Added a try/catch block around $pipeServer.WaitForConnection() in the PowerShell script to ensure the process exits cleanly if waiting for a connection fails, preventing the server from hanging indefinitely.

Test Coverage Enhancements:

  • Added tests for the acquire_pipe method to verify retry behavior when the pipe is not immediately available, when opening the pipe fails transiently, and when all retries are exhausted.
  • Added tests for run_command to ensure it retries with a new pipe when an Errno::EPIPE occurs and raises a PipeError if pipe recovery fails.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New content (non-breaking change)
  • Breaking change (a content change which would break existing functionality or processes)

Checklist:

  • I have read the CONTRIBUTING document.

Signed-off-by: Sathish Babu <sbabu@progress.com>
…sPipeRunner

Signed-off-by: Sathish Babu <sbabu@progress.com>
@Vasu1105 Vasu1105 merged commit 6e62866 into main Jan 20, 2026
30 of 31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants