Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/scripts/integration-governance.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const MAX_COMMITS = 1000;
const MAX_AUTHOR_BATCH = 50;
// This literal is inside the enrolled .github closure. A caller-supplied
// preparedBy.sourceSHA must never choose a new executable verifier tree.
const TRUSTED_SCRIPTS_TREE = 'c1b6e83ee24e5108657ef7f9b15865fd23f4ebce';
const TRUSTED_SCRIPTS_TREE = 'b1b6477108b28bda15e93735f2f6723568d0281d';
const SOURCE = 'https://github.com/kubernetes-sigs/kubebuilder-release-tools/tree/012269a88fa4c034a0acf1ba84c26b195c0dbab4';
const sha = value => crypto.createHash('sha256').update(value).digest('hex');
const git = (args, cwd = process.cwd()) =>
Expand Down
1 change: 1 addition & 0 deletions changelog.d/fixed-test-confirm-fixed-sigpipe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Deflaked `test-issue-confirm-fixed.sh`: the DRY_RUN assertion piped `printf` into `grep -q`, which raced SIGPIPE under `pipefail` and intermittently failed `build-and-test`. (#16151)
4 changes: 3 additions & 1 deletion src/scripts/test-issue-confirm-fixed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,9 @@ output=$(CALL_LOG="$CALL_LOG" BODY_LOG="$BODY_LOG" GH_BIN="$GH_STUB" DRY_RUN=1 \
CONFIRM_ISSUE_AUTHOR=reporter CONFIRM_COMMENTER=reporter CONFIRM_COMMENT_BODY="/fixed" \
bash "$SCRIPT" 2>&1)
rc=$?
if [ "$rc" -eq 0 ] && ! grep -qv '^GET ' "$CALL_LOG" && printf '%s\n' "$output" | grep -q 'DRY-RUN'; then
# grep -q exits on first match, so a printf pipe would race SIGPIPE under
# pipefail; use a here-string instead.
if [ "$rc" -eq 0 ] && ! grep -qv '^GET ' "$CALL_LOG" && grep -q 'DRY-RUN' <<<"$output"; then
pass "DRY_RUN=1 performs no writes"
else
bad "DRY_RUN=1 performed writes"
Expand Down
Loading