From 76c2c75f2c941344ef3ff8e862187adb7c57aef8 Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Sun, 24 Mar 2024 00:14:31 +0100 Subject: [PATCH] Fix release helper not considering workflow status (#6320) --- tools/release_helper.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/release_helper.py b/tools/release_helper.py index b6334823f..c69522834 100755 --- a/tools/release_helper.py +++ b/tools/release_helper.py @@ -753,7 +753,15 @@ def run_prepare_release_workflow(release_type: ReleaseType, version: str) -> Non break time.sleep(5) - subprocess.check_call(("gh", "run", "watch", str(run_id))) + try: + subprocess.check_call(("gh", "run", "watch", "--exit-status", str(run_id))) + except subprocess.CalledProcessError: + set_release_stage(ReleaseStage.CHANGELOG_REVIEWED) + raise click.ClickException( + "Github Actions workflow failed, run this command again" + " once you're ready to try running the 'Prepare Release' workflow again." + ) + rich.print("The automated pull requests have been created.\n") set_release_stage(ReleaseStage.PREPARE_RELEASE_RAN) rich.print(Markdown("# Step 6: Merge the automatically created PRs"))