You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "gnodet (via GitHub)" <gi...@apache.org> on 2026/09/17 06:08:24 UTC
[PR] CAMEL-24777: Ignore SIGPIPE in incremental-build.sh to prevent spurious CI failures [camel]
gnodet opened a new pull request, #26528:
URL: https://github.com/apache/camel/pull/26528
## Summary
Fix spurious CI failures caused by SIGPIPE breaking the incremental-build script on very long GitHub Actions jobs.
## Root Cause
The script sets `set -euo pipefail` at the top. On very long CI jobs, the GitHub Actions runner can truncate stdout. When that happens any command writing to stdout (e.g. `sort`, `grep`) receives SIGPIPE. GNU `sort` catches SIGPIPE and exits with code 2; under `set -e` + `pipefail` this terminates the entire script — even when the Maven build has already completed successfully — producing a false-negative CI result.
## Fix
Add `trap '' PIPE` immediately after `set -euo pipefail`. This causes Bash to ignore the SIGPIPE signal for the lifetime of the script. With SIGPIPE ignored, pipeline commands either exit 0 or rely on the `|| true` guards already in place throughout the script. The script then exits with Maven's actual return code.
## Test
This is a CI infrastructure fix; the failure only manifests on very long jobs where the runner truncates stdout. The change is one line in the CI script — no unit tests are applicable.
---
_Hermes Agent (Claude Sonnet 4.6) on behalf of Guillaume Nodet_
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24777: Ignore SIGPIPE in incremental-build.sh to prevent spurious CI failures [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #26528:
URL: https://github.com/apache/camel/pull/26528#issuecomment-5709772100
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: Apache Camel Committers, please review the following items:
* First-time contributors **require MANUAL approval** for the GitHub Actions to run
* You can use the command `/component-test (camel-)component-name1 (camel-)component-name2..` to request a test from the test bot although they are normally detected and executed by CI.
* You can label PRs using `skip-tests` and `test-dependents` to fine-tune the checks executed by this PR.
* Build and test logs are available in the summary page. **Only** [Apache Camel committers](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24777: Ignore SIGPIPE in incremental-build.sh to prevent spurious CI failures [camel]
Posted by "gnodet (via GitHub)" <gi...@apache.org>.
gnodet merged PR #26528:
URL: https://github.com/apache/camel/pull/26528
--
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-24777: Ignore SIGPIPE in incremental-build.sh to prevent spurious CI failures [camel]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org