workflow(release): surface subprocess output and improve error handling in backport operations - #4056
Merged
rickeylev merged 6 commits intoAug 15, 2026
Conversation
Subprocess failures during `process-backports` swallowed stderr and stdout details because top-level error handling only printed the exception message without notes or traceback. Print tracebacks on unexpected errors and add a `format_exception` helper to include attached PEP 678 notes.
Release operations rely on structured logs for diagnostics and debugging. Configure logging to stderr with line numbers in the release CLI entry point and replace print calls in process_backports with logger methods.
Branch checkouts and resets during error handling or dry runs in sync changelog were unlogged. Add info logging for resetting main and restoring the release branch.
…failure Define a custom CreatePrError exception raised when GitHub PR creation fails, capturing the command, error details, and formatted stdout/stderr blocks.
rickeylev
marked this pull request as ready for review
August 15, 2026 18:16
rickeylev
enabled auto-merge
August 15, 2026 18:16
Ensure runfiles.Create() result is not None before accessing Rlocation, resolving Pyrefly type checking errors in CI.
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.
When backporting changes or creating pull requests during release
automation, subprocess errors frequently hid command failure details
because stdout and stderr were not captured in the raised exceptions.
Additionally, process logging relied on raw print statements and
cleanup operations lacked diagnostic logs.
To improve debuggability and observability:
CreatePrError exceptions when PR creation fails.
block.