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

Fixes Invoke-Parallel not disposing Runspaces, take 2 #38

Merged

Conversation

santisq
Copy link
Owner

@santisq santisq commented Jul 2, 2024

This PR fixes the issue where the cmdlet would not be correctly disposing runspaces in scenarios where a PipelineStoppedException was thrown (CTRL+C / Select-Object -First) and OperationCanceledException (Timeout reached).

@santisq santisq added the bug Something isn't working label Jul 2, 2024
@santisq santisq self-assigned this Jul 2, 2024
@santisq santisq linked an issue Jul 2, 2024 that may be closed by this pull request
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 3 lines in your changes missing coverage. Please review.

Project coverage is 93.40%. Comparing base (50270fb) to head (13ca3e5).

Files Patch % Lines
...ParallelPipeline/Commands/InvokeParallelCommand.cs 60.00% 2 Missing ⚠️
src/PSParallelPipeline/Worker.cs 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #38      +/-   ##
==========================================
+ Coverage   91.79%   93.40%   +1.61%     
==========================================
  Files          10       11       +1     
  Lines         536      546      +10     
  Branches       39       39              
==========================================
+ Hits          492      510      +18     
+ Misses         35       28       -7     
+ Partials        9        8       -1     
Flag Coverage Δ
PS-5.1 93.61% <94.44%> (+5.09%) ⬆️
PS-7_Linux 93.40% <94.44%> (+1.61%) ⬆️
PS-7_Windows 93.61% <94.44%> (+1.94%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@santisq santisq merged commit 04ce513 into main Jul 3, 2024
7 checks passed
@santisq santisq deleted the 37-invoke-parallel-not-correctly-disposing-runspaces-take-2 branch July 3, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invoke-Parallel not correctly disposing Runspaces. Take 2 😢
1 participant