Skip to content

Commit cecec1d

Browse files
committed
Improve release error handling and keep failures non-crashing
- catch subprocess command failures in release main flow - print concise fail messages with command and exit code - preserve non zero exit status while avoiding Python traceback noise - 2026-03-03 08:07:50
1 parent 37660a4 commit cecec1d

4 files changed

Lines changed: 44 additions & 23 deletions

File tree

docs/visual-previews/MultiCapture/ChannelEstimation/Ofdm-ChannelEstimation-Analysis-Min-Avg-Max.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/visual/MultiCapture/ChannelEstimation/Ofdm-ChannelEstimation-Analysis-Min-Avg-Max.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -574,17 +574,23 @@ pm.visualizer.set(template, constructVisualizerPayload());
574574

575575
````json
576576
{
577+
"system_description": {
578+
"HW_REV": "1.0",
579+
"VENDOR": "LANCity",
580+
"BOOTR": "NONE",
581+
"SW_REV": "1.0.0",
582+
"MODEL": "LCPET-3"
583+
},
577584
"status": 0,
578585
"message": "Analysis MIN_AVG_MAX completed for group 9d9d1827a80042ff",
579586
"device": {
580-
"mac_address": "b0:f5:30:83:69:c0",
587+
"mac_address": "aa:bb:cc:dd:ee:ff",
581588
"system_description": {
582-
"HW_REV": "0B",
583-
"VENDOR": "Hitron Technologies",
584-
"BOOTR": "2022.01-MXL-v-4.0.369",
585-
"SW_REV": "8.5.0.0.1b4",
586-
"MODEL": "CGNDP4",
587-
"is_empty": false
589+
"HW_REV": "1.0",
590+
"VENDOR": "LANCity",
591+
"BOOTR": "NONE",
592+
"SW_REV": "1.0.0",
593+
"MODEL": "LCPET-3"
588594
}
589595
},
590596
"data": {

tools/release/release.py

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ def run(cmd: list[str], check: bool = True) -> subprocess.CompletedProcess[str]:
2727
return result
2828

2929

30+
def format_cmd(cmd: list[str]) -> str:
31+
return " ".join(cmd)
32+
33+
3034
def tag_exists(tag: str) -> bool:
3135
result = run(["git", "rev-parse", "-q", "--verify", f"refs/tags/{tag}"], check=False)
3236
return result.returncode == 0
@@ -212,15 +216,20 @@ def main() -> None:
212216
ensure_branch_allowed()
213217
ensure_clean_worktree()
214218

215-
if not args.skip_checks:
216-
run_quality_gates(root)
219+
try:
220+
if not args.skip_checks:
221+
run_quality_gates(root)
217222

218-
release_version = resolve_release_version(root, args.version)
219-
print(f"Selected release version: {release_version}")
223+
release_version = resolve_release_version(root, args.version)
224+
print(f"Selected release version: {release_version}")
220225

221-
bump_version_files(root, release_version)
222-
create_release_commit_and_tag(release_version, not args.no_push)
223-
print(f"Release {release_version} complete.")
226+
bump_version_files(root, release_version)
227+
create_release_commit_and_tag(release_version, not args.no_push)
228+
print(f"Release {release_version} complete.")
229+
except subprocess.CalledProcessError as exc:
230+
print(f"[fail] command failed with exit code {exc.returncode}: {format_cmd(exc.cmd)}")
231+
print("[fail] release aborted")
232+
raise SystemExit(exc.returncode)
224233

225234

226235
if __name__ == "__main__":

visual/PyPNM/MultiCapture/ChannelEstimation/Ofdm-ChannelEstimation-Analysis-Min-Avg-Max.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
{
2+
"system_description": {
3+
"HW_REV": "1.0",
4+
"VENDOR": "LANCity",
5+
"BOOTR": "NONE",
6+
"SW_REV": "1.0.0",
7+
"MODEL": "LCPET-3"
8+
},
29
"status": 0,
310
"message": "Analysis MIN_AVG_MAX completed for group 9d9d1827a80042ff",
411
"device": {
5-
"mac_address": "b0:f5:30:83:69:c0",
12+
"mac_address": "aa:bb:cc:dd:ee:ff",
613
"system_description": {
7-
"HW_REV": "0B",
8-
"VENDOR": "Hitron Technologies",
9-
"BOOTR": "2022.01-MXL-v-4.0.369",
10-
"SW_REV": "8.5.0.0.1b4",
11-
"MODEL": "CGNDP4",
12-
"is_empty": false
14+
"HW_REV": "1.0",
15+
"VENDOR": "LANCity",
16+
"BOOTR": "NONE",
17+
"SW_REV": "1.0.0",
18+
"MODEL": "LCPET-3"
1319
}
1420
},
1521
"data": {
@@ -152072,4 +152078,4 @@
152072152078
}
152073152079
]
152074152080
}
152075-
}
152081+
}

0 commit comments

Comments
 (0)