Skip to content

Commit a788abd

Browse files
committed
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 <anthony.floeder@hpe.com>
1 parent b8fe628 commit a788abd

7 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/agents/release.agent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Before starting any release work, read these files completely:
1818
## Core Rules
1919

2020
- **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.**
21+
- **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.
2122
- **ALWAYS run commands in a terminal** so the user can see them.
2223
- **ALWAYS append `2>&1 | cat`** to every `release-all.sh` and `gh` command — no exceptions.
2324
- **ONE repo at a time.** Execute one phase per repo sequentially. **NEVER parallelize** across repos.

nnf-dm

Submodule nnf-dm updated 135 files

nnf-integration-test

tools/release-all/RELEASE-PLAN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ Source the release environment helper to auto-compute versions, detect the relea
102102
source ./setup-release-env.sh -B patch # or -B minor / -B major
103103
```
104104

105+
> **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.
106+
105107
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.
106108

107109
List repos:
@@ -270,8 +272,6 @@ The `-i` flag displays image version changes inline. Use `-d` to display the ful
270272

271273
Check each repo for correct tag, release notes, and artifacts (`manifests.tar` + `manifests-kind.tar` on `nnf-deploy`).
272274

273-
274-
275275
---
276276

277277
### Relevant files

tools/release-all/setup-release-env.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,12 @@ fi
7878
# Usage: nnf_cmd <phase> <repo>
7979
nnf_cmd() {
8080
local phase="$1" repo="$2"
81-
local args=()
81+
local args=() _rc
8282
[[ "$repo" == "nnf_sos" ]] && args+=("-M")
8383
./release-all.sh -B "$RELEASE_TYPE" -P "$phase" -R "$repo" "${args[@]}" 2>&1 | cat
84+
# bash uses PIPESTATUS[0]; zsh uses pipestatus[1] (lowercase, 1-indexed)
85+
_rc=${PIPESTATUS[0]:-${pipestatus[1]}}
86+
return "${_rc:-0}"
8487
}
8588

8689
# --- Helper: create-pr + capture PR number -----------------------------------

0 commit comments

Comments
 (0)