wombatu-kun commented on code in PR #20422:
URL: https://github.com/apache/hudi/pull/20422#discussion_r4356172648
##########
.github/workflows/validate_source.yml:
##########
@@ -48,10 +48,17 @@ jobs:
# Seconds of stdlib-only unit tests, so they run on every PR instead of
path-filtering
# on scripts/pr_compliance.py. The log goes to the runner temp dir: the
source checks below
- # copy and scan the workspace, and a stray test.log has no license
header.
+ # copy and scan the workspace, and a stray test.log has no license
header. A passing run
+ # stays quiet; a failing one prints the full log and names the failed
tests in the annotation.
- name: Test pr_compliance.py
if: ${{ !cancelled() && env.CHECK_PR_METADATA == 'true' }}
- run: python3 scripts/pr_compliance.py run-tests >
"$RUNNER_TEMP/test.log" || { echo "::error::pr_compliance.py $(cat
"$RUNNER_TEMP/test.log")" && exit 1; }
+ run: |
+ log="$RUNNER_TEMP/test.log"
+ if ! python3 scripts/pr_compliance.py run-tests > "$log"; then
+ cat "$log"
+ echo "::error::pr_compliance.py self-tests failed: $(sed -n 's/ -
FAILED$//p' "$log" | paste -sd ',' -)"
Review Comment:
nit: the annotation's list comes out empty when the run crashes before any
test prints `FAILED` (a traceback, or one of the script's own `exit()` calls),
and the `Swapped sections: {i}, {k}` names already contain a comma, so the
comma-joined list does not split cleanly. Could we join with `;` and fall back
to something like `see the step log` when nothing matched?
--
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]