From a788abd584debcbcdc246fb549f31ad8ea55b092 Mon Sep 17 00:00:00 2001 From: Anthony Floeder Date: Thu, 9 Apr 2026 11:44:32 -0500 Subject: [PATCH] Fix nnf_cmd exit code and update submodule pointers Preserve the exit code of release-all.sh through the pipe in nnf_cmd by returning PIPESTATUS[0]. Previously, all invocations exited 0 because the pipe's exit code was that of 'cat', not release-all.sh. Also advance submodule pointers to their current master HEADs: - lustre-fs-operator: 7ebec7d -> c59379b (PR #125 update-vendor) - nnf-dm: 42a3d3a4 -> c959e3b5 (PR #360 update-vendor + others) - nnf-integration-test: b967cc0 -> 3e52df1 (PR #160 update-vendor + #159) - nnf-sos: 8749851d -> bcb00b92 (PR #604 update-vendor + others) Also restore the ONE-command-per-turn rule to release.agent.md and remove trailing blank lines from RELEASE-PLAN.md. Signed-off-by: Anthony Floeder --- .github/agents/release.agent.md | 1 + lustre-fs-operator | 2 +- nnf-dm | 2 +- nnf-integration-test | 2 +- nnf-sos | 2 +- tools/release-all/RELEASE-PLAN.md | 4 ++-- tools/release-all/setup-release-env.sh | 5 ++++- 7 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/agents/release.agent.md b/.github/agents/release.agent.md index b60af6a..8c3ab7b 100644 --- a/.github/agents/release.agent.md +++ b/.github/agents/release.agent.md @@ -18,6 +18,7 @@ Before starting any release work, read these files completely: ## Core Rules - **ALWAYS wait for explicit user approval before proceeding to the next step.** After every step, state what you did, whether it succeeded, and the evidence. **WAIT for the user.** +- **ONE command per turn.** Run the command for ONE repo, show the full output, state PASS or FAIL with evidence, then STOP. Do not run the next repo's command until the user explicitly says to proceed. This applies even when the plan shows a `for` loop — execute the loop body manually, one repo per turn. - **ALWAYS run commands in a terminal** so the user can see them. - **ALWAYS append `2>&1 | cat`** to every `release-all.sh` and `gh` command — no exceptions. - **ONE repo at a time.** Execute one phase per repo sequentially. **NEVER parallelize** across repos. diff --git a/lustre-fs-operator b/lustre-fs-operator index 7ebec7d..c59379b 160000 --- a/lustre-fs-operator +++ b/lustre-fs-operator @@ -1 +1 @@ -Subproject commit 7ebec7d6a4db230f53136c0a90d2cce46568eb2e +Subproject commit c59379bba6df432d8a6f63c802d310c897058bbc diff --git a/nnf-dm b/nnf-dm index 42a3d3a..c959e3b 160000 --- a/nnf-dm +++ b/nnf-dm @@ -1 +1 @@ -Subproject commit 42a3d3a4efd0e8389e5104d19ad2c668de1baff9 +Subproject commit c959e3b573fe13136d55c734cedd41ac637da1a1 diff --git a/nnf-integration-test b/nnf-integration-test index b967cc0..3e52df1 160000 --- a/nnf-integration-test +++ b/nnf-integration-test @@ -1 +1 @@ -Subproject commit b967cc079bb702f75661a228b52f28feb856603d +Subproject commit 3e52df1dcef63e1954d6ca26c6b6895a6cc048e9 diff --git a/nnf-sos b/nnf-sos index 8749851..bcb00b9 160000 --- a/nnf-sos +++ b/nnf-sos @@ -1 +1 @@ -Subproject commit 8749851dbc78c934d5f59302b3837a114a778fdd +Subproject commit bcb00b928378bc0eea29be6590ae7adfb09578d3 diff --git a/tools/release-all/RELEASE-PLAN.md b/tools/release-all/RELEASE-PLAN.md index 44639c3..66af28c 100644 --- a/tools/release-all/RELEASE-PLAN.md +++ b/tools/release-all/RELEASE-PLAN.md @@ -102,6 +102,8 @@ Source the release environment helper to auto-compute versions, detect the relea source ./setup-release-env.sh -B patch # or -B minor / -B major ``` +> **Important:** Never pipe this `source` command (e.g. `source ... | cat`). Piping runs `source` in a subshell, which means the exported variables and function definitions (`nnf_cmd`, etc.) are lost to the calling shell. If you need to capture output, redirect to a file or run without the pipe. + This exports `$PREVIOUS_RELEASE`, `$NNF_RELEASE`, `$RELEASE_TYPE`, and `$RELEASE_REVIEWERS`, and defines helper functions `nnf_cmd`, `nnf_create_pr`, `nnf_add_reviewers`, and `nnf_gh_repo`. Confirm the printed summary with the user before proceeding. List repos: @@ -270,8 +272,6 @@ The `-i` flag displays image version changes inline. Use `-d` to display the ful Check each repo for correct tag, release notes, and artifacts (`manifests.tar` + `manifests-kind.tar` on `nnf-deploy`). - - --- ### Relevant files diff --git a/tools/release-all/setup-release-env.sh b/tools/release-all/setup-release-env.sh index b0cfe1f..e1ff34f 100755 --- a/tools/release-all/setup-release-env.sh +++ b/tools/release-all/setup-release-env.sh @@ -78,9 +78,12 @@ fi # Usage: nnf_cmd nnf_cmd() { local phase="$1" repo="$2" - local args=() + local args=() _rc [[ "$repo" == "nnf_sos" ]] && args+=("-M") ./release-all.sh -B "$RELEASE_TYPE" -P "$phase" -R "$repo" "${args[@]}" 2>&1 | cat + # bash uses PIPESTATUS[0]; zsh uses pipestatus[1] (lowercase, 1-indexed) + _rc=${PIPESTATUS[0]:-${pipestatus[1]}} + return "${_rc:-0}" } # --- Helper: create-pr + capture PR number -----------------------------------