You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The diff-fetching step pipes to `head -c 32000` under `pipefail` (explicit in `ai-pr-review.yml`, implicit via GitHub Actions' default bash invocation in `ai-pr-review-external.yml`). Once `head` has its 32000 bytes it closes the pipe, the upstream `gh pr diff`/`gh api compare` gets SIGPIPE on its next write, and `pipefail` turns that into a step failure (exit 141), even though the truncated file is exactly what's wanted. Happens on any PR whose diff exceeds 32000 bytes, e.g. #537.
The fix is correct. When head -c 32000 closes its stdin after reading 32000 bytes, gh gets SIGPIPE and exits non-zero, which was failing the pipeline. Adding || true suppresses that expected non-zero exit.
One thing to verify: the set -e / set -o pipefail behavior in GitHub Actions default shell (bash --noprofile --norc -eo pipefail). With pipefail, the pipeline exit code is the last non-zero from any command in the pipe. The || true applies to the whole pipeline, so it correctly swallows the SIGPIPE-caused failure from gh. This is the right fix.
📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)
See detailed reports in MegaLinter artifacts Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff
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
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.
The diff-fetching step pipes to `head -c 32000` under `pipefail` (explicit in `ai-pr-review.yml`, implicit via GitHub Actions' default bash invocation in `ai-pr-review-external.yml`). Once `head` has its 32000 bytes it closes the pipe, the upstream `gh pr diff`/`gh api compare` gets SIGPIPE on its next write, and `pipefail` turns that into a step failure (exit 141), even though the truncated file is exactly what's wanted. Happens on any PR whose diff exceeds 32000 bytes, e.g. #537.