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
{{ message }}
Repository navigation
CI: XAML style / sync-gen drift comment is skipped when diff exceeds 400 lines #23187
The XAML Style Check and WinAppSDK Sync Generator Check workflows are supposed to post a PR comment when drift is detected, with instructions to apply the fix. However, when the drift exceeds ~400 lines, the Detect drift step itself fails with exit code 141, which causes the subsequent Post drift comment, Upload patch artifact, and Fail if drift detected steps to be skipped (their if: steps.drift.outputs.drift == 'true' condition is never satisfied because the step did not complete).
The Detect drift step runs under bash --noprofile --norc -e -o pipefail and contains:
git -c color.ui=always diff --cached | head -n 400
When the diff is larger than 400 lines, head closes its stdin after reading 400 lines. git diff continues writing, gets SIGPIPE on the next write, and exits 141. With pipefail the pipeline returns 141, and set -e aborts the step.
The same line exists in winappsdk-sync-check.yml and is just as vulnerable; it has not tripped yet because past drifts have stayed under 400 lines.
Fix
Append || true to the truncated-diff pipeline so SIGPIPE from head closing early does not abort the step.
Activity
fix(ci): Tolerate SIGPIPE in drift-detection diff truncation