wp-env: Improve run command execution speed#50007
Merged
noahtallen merged 4 commits intotrunkfrom Apr 27, 2023
Merged
Conversation
|
Size Change: 0 B Total Size: 1.37 MB ℹ️ View Unchanged
|
westonruter
reviewed
Apr 22, 2023
ObliviousHarmony
approved these changes
Apr 22, 2023
Contributor
ObliviousHarmony
left a comment
There was a problem hiding this comment.
This does what it says on the tin @noahtallen.
How would you feel about sleep infinity instead of the tail? I think it might eat less CPU cycles because it's on a permanent interrupt?
As an aside, once #49962 is merged, we can actually do this in the CLI container's Dockerfile:
CMD [ "sleep", "infinity" ]
Depending on which of these is merged first, we can make a change accordingly?
Member
Author
Seems like a good idea! I copied the |
e37d1e2 to
c11312a
Compare
This was referenced May 5, 2023
pento
pushed a commit
to WordPress/wordpress-develop
that referenced
this pull request
Jun 13, 2025
…tive usage, and argument handling. * Start `cli` container when running `env:start`. This greatly speeds up calls to WP-CLI since the container is already running rather than having to start up for each call. * Facilitate calls to `env:cli` in non-interactive context (non-TTY) to allow piping content into commands or use in shell scripts. * Fix passing arguments to WP-CLI from `env:cli` so that arguments with spaces are passed as expected. * Fix JSHint issues. This aligns the wordpress-develop environment closer to wp-env. See WordPress/gutenberg#50007. Props westonruter, jorbin, SirLouen, sandeepdahiya. Fixes #63564. git-svn-id: https://develop.svn.wordpress.org/trunk@60308 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith
pushed a commit
to WordPress/WordPress
that referenced
this pull request
Jun 13, 2025
…tive usage, and argument handling. * Start `cli` container when running `env:start`. This greatly speeds up calls to WP-CLI since the container is already running rather than having to start up for each call. * Facilitate calls to `env:cli` in non-interactive context (non-TTY) to allow piping content into commands or use in shell scripts. * Fix passing arguments to WP-CLI from `env:cli` so that arguments with spaces are passed as expected. * Fix JSHint issues. This aligns the wordpress-develop environment closer to wp-env. See WordPress/gutenberg#50007. Props westonruter, jorbin, SirLouen, sandeepdahiya. Fixes #63564. Built from https://develop.svn.wordpress.org/trunk@60308 git-svn-id: http://core.svn.wordpress.org/trunk@59644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot
pushed a commit
to gilzow/wordpress-performance
that referenced
this pull request
Jun 13, 2025
…tive usage, and argument handling. * Start `cli` container when running `env:start`. This greatly speeds up calls to WP-CLI since the container is already running rather than having to start up for each call. * Facilitate calls to `env:cli` in non-interactive context (non-TTY) to allow piping content into commands or use in shell scripts. * Fix passing arguments to WP-CLI from `env:cli` so that arguments with spaces are passed as expected. * Fix JSHint issues. This aligns the wordpress-develop environment closer to wp-env. See WordPress/gutenberg#50007. Props westonruter, jorbin, SirLouen, sandeepdahiya. Fixes #63564. Built from https://develop.svn.wordpress.org/trunk@60308 git-svn-id: https://core.svn.wordpress.org/trunk@59644 1a063a9b-81f0-0310-95a4-ce76da25c4cd
jonnynews
pushed a commit
to spacedmonkey/wordpress-develop
that referenced
this pull request
Jun 22, 2025
…tive usage, and argument handling. * Start `cli` container when running `env:start`. This greatly speeds up calls to WP-CLI since the container is already running rather than having to start up for each call. * Facilitate calls to `env:cli` in non-interactive context (non-TTY) to allow piping content into commands or use in shell scripts. * Fix passing arguments to WP-CLI from `env:cli` so that arguments with spaces are passed as expected. * Fix JSHint issues. This aligns the wordpress-develop environment closer to wp-env. See WordPress/gutenberg#50007. Props westonruter, jorbin, SirLouen, sandeepdahiya. Fixes #63564. git-svn-id: https://develop.svn.wordpress.org/trunk@60308 602fd350-edb4-49c9-b593-d223f7449a82
pento
pushed a commit
to WordPress/wordpress-develop
that referenced
this pull request
Jul 7, 2025
…tive usage, and argument handling. * Start `cli` container when running `env:start`. This greatly speeds up calls to WP-CLI since the container is already running rather than having to start up for each call. * Facilitate calls to `env:cli` in non-interactive context (non-TTY) to allow piping content into commands or use in shell scripts. * Fix passing arguments to WP-CLI from `env:cli` so that arguments with spaces are passed as expected. * Fix JSHint issues. This aligns the wordpress-develop environment closer to wp-env. See WordPress/gutenberg#50007. Reviewed by audrasjb. Merges [60308] to the 6.8 branch, minus the change to `.github/workflows/reusable-test-local-docker-environment-v1.yml` which was made irrelevant in [60092]. Props westonruter, jorbin, SirLouen, sandeepdahiya. Fixes #63564. git-svn-id: https://develop.svn.wordpress.org/branches/6.8@60432 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith
pushed a commit
to markjaquith/WordPress
that referenced
this pull request
Jul 7, 2025
…tive usage, and argument handling. * Start `cli` container when running `env:start`. This greatly speeds up calls to WP-CLI since the container is already running rather than having to start up for each call. * Facilitate calls to `env:cli` in non-interactive context (non-TTY) to allow piping content into commands or use in shell scripts. * Fix passing arguments to WP-CLI from `env:cli` so that arguments with spaces are passed as expected. * Fix JSHint issues. This aligns the wordpress-develop environment closer to wp-env. See WordPress/gutenberg#50007. Reviewed by audrasjb. Merges [60308] to the 6.8 branch, minus the change to `.github/workflows/reusable-test-local-docker-environment-v1.yml` which was made irrelevant in [60092]. Props westonruter, jorbin, SirLouen, sandeepdahiya. Fixes #63564. Built from https://develop.svn.wordpress.org/branches/6.8@60432 git-svn-id: http://core.svn.wordpress.org/branches/6.8@59768 1a063a9b-81f0-0310-95a4-ce76da25c4cd
jonnynews
pushed a commit
to spacedmonkey/wordpress-develop
that referenced
this pull request
Sep 24, 2025
…tive usage, and argument handling. * Start `cli` container when running `env:start`. This greatly speeds up calls to WP-CLI since the container is already running rather than having to start up for each call. * Facilitate calls to `env:cli` in non-interactive context (non-TTY) to allow piping content into commands or use in shell scripts. * Fix passing arguments to WP-CLI from `env:cli` so that arguments with spaces are passed as expected. * Fix JSHint issues. This aligns the wordpress-develop environment closer to wp-env. See WordPress/gutenberg#50007. Props westonruter, jorbin, SirLouen, sandeepdahiya. Fixes #63564. git-svn-id: https://develop.svn.wordpress.org/trunk@60308 602fd350-edb4-49c9-b593-d223f7449a82
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Resolves #49168 -- makes
wp-env runa lot faster by executing commands against existing services rather than starting new services from scratch. (And makes wp-env cli persist)Why?
Faster is better :)
How?
Changes from using
docker-compose runtodocker-compose exec. Run creates new containers from scratch each time. We also make more services persistent. This means that the startup cost happens during wp-env run, but not during subsequent executions.Testing Instructions
npx wp-env run cli ...and other permutations of wp-env run locally.