Repository navigation
feat: send spark error output to STDERR - #10598
Open
paulbalandan wants to merge 1 commit into
Open
paulbalandan wants to merge 1 commit into
paulbalandan wants to merge 1 commit into
Conversation
paulbalandan
force-pushed
the
cli-errors-to-stderr
branch
from
October 5, 2026 14:52
de70473 to
24f3cea
Compare
paulbalandan
force-pushed
the
cli-errors-to-stderr
branch
from
October 5, 2026 14:58
24f3cea to
75b5521
Compare
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
HTTP command error rendering, STDOUT newline preservation, and test-state cleanup need correction.
Review effort: Balanced
Findings: 1
Open (3)
What changed in this PR
Routes Spark exception output to STDERR, keeping errors separate from piped STDOUT.
Changes:
- Adds scoped redirection with STDERR-aware color detection.
- Adds error-stream tests.
- Documents behavior and logging migration.
Base branch was not supplied; develop compatibility policy was assumed. Validation was limited to source inspection; automated checks remain with CI.
| File | Description |
|---|---|
| user_guide_src/source/installation/upgrade_480.rst | Explains logging migration. |
| user_guide_src/source/cli/cli_modern_commands.rst | Documents STDERR rendering. |
| user_guide_src/source/cli/cli_commands.rst | Documents STDERR error output. |
| user_guide_src/source/changelogs/v4.8.0.rst | Records the behavior change. |
| tests/system/Debug/ExceptionHandlerTest.php | Checks exception output routing. |
| tests/system/CLI/CLITest.php | Tests redirection and colors. |
| tests/system/CLI/BaseCommandTest.php | Checks STDERR error rendering. |
| tests/system/CLI/AbstractCommandTest.php | Checks STDERR throwable rendering. |
| system/Debug/ExceptionHandler.php | Redirects CLI exception rendering. |
| system/CLI/CLI.php | Adds scoped stream redirection. |
| system/CLI/BaseCommand.php | Redirects command error views. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
paulbalandan
force-pushed
the
cli-errors-to-stderr
branch
2 times, most recently
from
October 6, 2026 07:19
2c1af2c to
44d1e6f
Compare
paulbalandan
force-pushed
the
cli-errors-to-stderr
branch
from
October 6, 2026 08:48
44d1e6f to
4ca12e6
Compare
michalsn
approved these changes
Oct 6, 2026
This branch has not been deployed
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.


Description
Uncaught exceptions in spark, and errors shown with
BaseCommand::showError()orAbstractCommand::renderThrowable()(asmigrateanddb:seeddo), are now printed to STDERR instead of STDOUT, so they no longer mix with output piped to another program or captured by a script. The exit code is unchanged. This also prepares for a--quietflag, which can then silence STDOUT without hiding errors.The redirect happens in the exception handler rather than in the CLI error views. The views are copied into every app, so editing them would only reach new projects. Color support is checked against STDERR while redirecting, so
2> err.logdoes not collect ANSI codes when STDOUT is a terminal.Scripts that redirect only STDOUT to a log file will no longer capture errors there. The upgrading guide covers this.
Checklist: