Print WPCLI output (both stdout/stderr) to wp-cron-runner stream#36
Open
Print WPCLI output (both stdout/stderr) to wp-cron-runner stream#36
Conversation
|
@walthowd I'm not sure we want stdout in the logs? Seems very noisy potentially. |
Author
|
Followed up in Slack, the virtual pty gets you both but we can decouple if needed. Log stream doesn't not automatically go into ELK, we transform, filter and enrich with vector and could filter these out if needed. That would let Parker (via GOOP) consume them straight from K8s API if needed. But the more I think about this, I think just update the docs to say not supported for WP-CLI commands -- as ideally any PHP error there is send to the user via the VIP-CLI stream. |
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.
Re: @rinatkhaziev and @rebeccahum 's question - The wp-cron-runner invokes WP-CLI commands from within inside the container.
The virtual pty inside the golang program logs the output to a temporary file and then reads the log through the TCP stream back through vip-cli -- However the effective k8s/internal logging (and thus dashboard) logs are lost as WPCLI is not invoked through the
php-fpmsock/container. That batch PHP-FPM container is the only container used for the client dashboard logs.This commit will print the WP-CLI output (both stdout and stderr) to the log stream of the
wp-cron-runnercontainer and thus they will be available in ELK.However they will still not be shipped to customers unless Parker is modified to consume the
wp-cron-runnerlog stream from K8s. This log stream is already not designed to be customer facing so would need to be filtered (only look at lines beginning with WP-CLI output).Or -- we update our documentation that errors from WP CLI commands are not included in logs/log streams.