gnodet-bot commented on code in PR #26528:
URL: https://github.com/apache/camel/pull/26528#discussion_r4034517337


##########
.github/actions/incremental-build/incremental-build.sh:
##########
@@ -29,6 +29,12 @@
 # All sets of affected modules are merged and deduplicated before testing.
 
 set -euo pipefail
+# Ignore SIGPIPE to prevent spurious failures on long GitHub Actions jobs.
+# When the runner truncates stdout, commands like `sort` receive SIGPIPE and 
exit
+# with code 2.  Under `set -e` + `pipefail` this terminates the entire script 
even
+# though the Maven build already completed successfully.  Ignoring SIGPIPE 
avoids
+# the false-negative: the script exits with Maven's real return code instead.

Review Comment:
   💡 **Nit:** The comment conflates two different signal paths. "Commands like 
`sort` exit with code 2" describes the EPIPE path (SIG_IGN already set → 
`write()` returns `EPIPE` → program exits non-zero). Exit 141 (= 128+13) is the 
SIGPIPE-kill path. The actual trigger in this script is most likely `tail -500 
"$log"` in the failure-reporting block (line ~1047) writing to a 
runner-truncated stdout — not `sort`. Tightening the wording:
   
   ```suggestion
   # Ignore SIGPIPE to prevent spurious failures on long GitHub Actions jobs.
   # When the runner closes the script's stdout (log line limit reached), 
external
   # commands writing to it (e.g. `tail -500 "$log"` in the failure report 
block)
   # are killed by SIGPIPE (exit 141).  Ignoring SIGPIPE lets children inherit
   # SIG_IGN, exit via EPIPE instead, and preserves Maven's real return code.
   ```



-- 
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]

Reply via email to