Report a failing app command without the app-runner traceback - #583
Draft
leoschwarz wants to merge 2 commits into
Draft
Report a failing app command without the app-runner traceback#583leoschwarz wants to merge 2 commits into
leoschwarz wants to merge 2 commits into
Conversation
…eback A non-zero app command let subprocess.CalledProcessError escape to the interpreter's default hook, stacking ~10 frames of app-runner boilerplate under the app's own error output. Commands now raise CommandFailedError, a RuntimeError that use_client renders as one Error: line; the traceback stays available under BFABRICPY_LOG_LEVEL=DEBUG. Also fixes two presentation bugs found alongside it: setup_script_logging guarded itself with an inherited env var, so nested runner processes fell back to loguru's verbose DEBUG default, and captured output was emitted as one multi-line record leaving all but the first line unprefixed. Closes #231
`nox -s code_style` runs ruff lint only and CI checks no formatting, so nothing signals which formatter is authoritative — and `[tool.ruff]` carrying line-length/indent-width makes `ruff format` look sanctioned. It disagrees with black on ~15 files.
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.
Error: Command failed with exit code N: <command>lineinstead of ~10 frames of app-runner traceback stacked under the app's own output.
BFABRICPY_LOG_LEVEL=DEBUGstill shows the traceback.run workunitno longer prints a second traceback whenmake run-allfails.{level} {message}format at INFO —setup_script_loggingguarded itself with an env var that children inherited, so they skipped setupand fell back to loguru's verbose DEBUG default.
uvoutput is logged one record per line, so every line keeps its level prefix.Needs a
bfabric1.20.1 release first — the app-runner floor is bumped to>=1.20.1because thelogging fix lives in
bfabric.Closes #231
🤖 Prepared with assistance from Claude Opus 5 via Claude Code.