From da070b4eb2bed8bb42ec342d228782d15e7e5ad5 Mon Sep 17 00:00:00 2001 From: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 04:35:02 -0500 Subject: [PATCH 1/4] test(scripts): deflake confirm-fixed DRY_RUN assertion (SIGPIPE under pipefail) `printf '%s\n' "$output" | grep -q 'DRY-RUN'` races: grep -q exits on first match, printf gets EPIPE, and with `set -o pipefail` the whole condition is reported false even though every assertion held. Seen in build-and-test on #16149 ("printf: write error: Broken pipe"). Use a here-string so there is no writer to kill. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/fixed-test-confirm-fixed-sigpipe.md | 1 + src/scripts/test-issue-confirm-fixed.sh | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog.d/fixed-test-confirm-fixed-sigpipe.md 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..19a186914f --- /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`. 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" From a5b0a52843b240eb04995d98523792e9ad6cedd1 Mon Sep 17 00:00:00 2001 From: "hivecommons-hive[bot]" <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 09:35:37 +0000 Subject: [PATCH 2/4] changelog: fragment for #16151 Generated by changelog-fragment-guard from the PR title (#5675). Edit the wording freely, or replace this file with the no-changelog label if the change is not user-visible. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: hivecommons-hive[bot] <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/changed-16151.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/changed-16151.md diff --git a/changelog.d/changed-16151.md b/changelog.d/changed-16151.md new file mode 100644 index 0000000000..04917cb9ad --- /dev/null +++ b/changelog.d/changed-16151.md @@ -0,0 +1 @@ +- test(scripts): deflake confirm-fixed DRY_RUN assertion (SIGPIPE under pipefail) (#16151) From 5e63209b6de62c0850d1341384686cb15e654815 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 04:49:56 -0500 Subject: [PATCH 3/4] changelog: make the fragment a '- ' entry bullet and drop the duplicate Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- changelog.d/changed-16151.md | 1 - changelog.d/fixed-test-confirm-fixed-sigpipe.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 changelog.d/changed-16151.md diff --git a/changelog.d/changed-16151.md b/changelog.d/changed-16151.md deleted file mode 100644 index 04917cb9ad..0000000000 --- a/changelog.d/changed-16151.md +++ /dev/null @@ -1 +0,0 @@ -- test(scripts): deflake confirm-fixed DRY_RUN assertion (SIGPIPE under pipefail) (#16151) diff --git a/changelog.d/fixed-test-confirm-fixed-sigpipe.md b/changelog.d/fixed-test-confirm-fixed-sigpipe.md index 19a186914f..c2c2c0fd08 100644 --- a/changelog.d/fixed-test-confirm-fixed-sigpipe.md +++ b/changelog.d/fixed-test-confirm-fixed-sigpipe.md @@ -1 +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`. +- 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) From f3f4aa47c680f01012025f3609e40279eb758cba Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sun, 1 Nov 2026 05:14:10 -0500 Subject: [PATCH 4/4] governance: re-pin TRUSTED_SCRIPTS_TREE to the src/scripts tree this branch ships integration-governance.test.cjs runs verify() against the real HEAD:src/scripts tree; editing src/scripts/test-issue-confirm-fixed.sh changed that hash, so the pinned literal must follow it in the same change. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .github/scripts/integration-governance.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()) =>