Yicong-Huang opened a new pull request, #4846: URL: https://github.com/apache/texera/pull/4846
### What changes were proposed in this PR? Two changes to the direct backport pipeline. **1. Repair YAML so the workflow can actually start.** The inline `python3 -c '<source>'` block introduced for trailer-aware message composition put its Python source at column 0 inside a `run: |` block whose indentation indicator was set at column 10 by the preceding bash. YAML treats `import re, sys` as a top-level key and rejects the file. Every push to `main` since the change failed in 0 seconds with 0 jobs (e.g. [run 25271247473](https://github.com/apache/texera/actions/runs/25271247473)). Python source can't be re-indented to column 10 because Python rejects leading whitespace on top-level statements, so the script lives at `.github/scripts/compose-backport-message.py` and the workflow calls it with stdin + a SHA arg. Behavior is unchanged from #4696. **2. Surface backport status on the original commit + PR.** - On success: a commit comment on the original `main` commit naming the backport target branch and the new SHA. (GitHub auto-derives the branch badge next to a commit title from "branches that contain this commit"; cherry-picks produce a different SHA, so the release branch will never appear there. A commit comment is the closest practical equivalent — it surfaces the backport target on the same page.) Also a comment on the original PR with the same info. - On failure: a comment on the original PR linking to the failing matrix-leg job log (resolved via `listJobsForWorkflowRun` so the link drops the user directly onto the failure rather than the run summary). ### Any related issues, documentation, discussions? Fixes the regression introduced in #4696. ### How was this PR tested? ``` $ python3 -c "import yaml; yaml.safe_load(open('.github/workflows/direct-backport-push.yml'))" $ printf '...real squash message with Co-authored-by trailer...' \ | python3 .github/scripts/compose-backport-message.py <sha> \ | git interpret-trailers --parse Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> ``` Trailer block stays at the bottom; `(backported from commit X)` is inserted before it. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7, 1M context) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
