diff --git a/.github/scripts/integration-governance.cjs b/.github/scripts/integration-governance.cjs index fcc9b4c0e4..9ba2cfbd55 100644 --- a/.github/scripts/integration-governance.cjs +++ b/.github/scripts/integration-governance.cjs @@ -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()) => diff --git a/changelog.d/fixed-test-confirm-fixed-sigpipe.md b/changelog.d/fixed-test-confirm-fixed-sigpipe.md new file mode 100644 index 0000000000..c2c2c0fd08 --- /dev/null +++ b/changelog.d/fixed-test-confirm-fixed-sigpipe.md @@ -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) diff --git a/src/scripts/test-issue-confirm-fixed.sh b/src/scripts/test-issue-confirm-fixed.sh index 983aef0a0b..cac5147fab 100755 --- a/src/scripts/test-issue-confirm-fixed.sh +++ b/src/scripts/test-issue-confirm-fixed.sh @@ -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"