-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use named pipe to decrease local Windows runtime (#220)
* Use named pipe to decrease local Windows runtime This uses PowerShell to spawn a process that listens on a named pipe for Base64 encoded commands and executes them. This drastically decreases the total runtime when running locally on Windows by using a single PowerShell session to execute commands instead of spawning a new session for each command. Huge thanks to @sdelano for the initial idea! * Modify named pipe creation to use unique name * Remove `$ProgressPreference = 'SilentlyContinue'` * Modify code to persist pipe usage * Removed pipe argument (default is In/Out) * Privatize pipe related functions * Add fallback to not used pipe if creation fails * Move Windows local command logic to separate class * Revert file code format * Change `@platform` to `@os` for consistency * Split Windows runners and create a `GenericRunner` * Add test for Windows named pipe usage * Tweak `GenericRunner` and default `run_command` * Remove `Local::` from `CommandWrapper` * Fix test for Windows named pipe * Make changes to integrate @jquick's cacheing magic * Remove unneeded logic for opening an existing pipe A pipe is opened only once per object, multiple processes shouldn't share the same pipe because it could be terminated by the other process. * Add comments explaining pipe check tests * Change `Shellout` to `ShellOut` * Change `stubs` to `expects` where appropriate * Modify pipe tests * Move/Modify Unit tests and add Integration tests * Fix local tests when running with others. * Minor style changes * Remove extra newline between `let`s * Modify TransportHelper to accept platform options Signed-off-by: Jerry Aldrich <jerryaldrichiii@gmail.com> Signed-off-by: Jared Quick <jquick@chef.io>
- Loading branch information
1 parent
5a0cff3
commit 9b8fc69
Showing
4 changed files
with
214 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters