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

win_updates - Improve batch runner #495

Merged

Conversation

jborean93
Copy link
Collaborator

SUMMARY

Improve the batch runner bootstrapper that is used in win_updates to run the update code inside a batch process. This is done by starting an ephemeral process through the task scheduler that is unrelated to PowerShell and using a new API to spawn a new PowerShell process as a child of that ephemeral task. Unlike the ephemeral task process, the newly spawned process exposes the stdio handles allowing the module to have better visibility on failures and to send information to run than before.

Fixes: #448

ISSUE TYPE
  • Bugfix Pull Request
  • Feature Pull Request
COMPONENT NAME

win_updates
module_utils/Process.cs

Improve the batch runner bootstrapper that is used in win_updates to run
the update code inside a batch process. This is done by starting an
ephemeral process through the task scheduler that is unrelated to
PowerShell and using a new API to spawn a new PowerShell process as a
child of that ephemeral task. Unlike the ephemeral task process, the
newly spawned process exposes the stdio handles allowing the module to
have better visibility on failures and to send information to run than
before.
@jborean93 jborean93 merged commit 16d2359 into ansible-collections:main Apr 5, 2023
@jborean93 jborean93 deleted the win_updates-batch-debug branch April 5, 2023 19:55
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.

win_updates.ps1 | Failed to invoke batch script: Task failed to connect to pipe
1 participant