From f2f159d6c190b966438289f8ebf4ff4f39e02616 Mon Sep 17 00:00:00 2001 From: Olivier 'reivilibre Date: Mon, 15 Jun 2026 12:29:49 +0100 Subject: [PATCH] Fix release script considering any workflow completion as successful. (#19843) When building the v1.155.0rc1, the release notification said the workflow was successful but it had actually failed. --------- Signed-off-by: Olivier 'reivilibre --- changelog.d/19843.misc | 1 + scripts-dev/release.py | 32 +++++++++++++++++++++----------- 2 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 changelog.d/19843.misc diff --git a/changelog.d/19843.misc b/changelog.d/19843.misc new file mode 100644 index 0000000000..633c11edb7 --- /dev/null +++ b/changelog.d/19843.misc @@ -0,0 +1 @@ +Fix release script considering any workflow completion as successful. \ No newline at end of file diff --git a/scripts-dev/release.py b/scripts-dev/release.py index f429f7e048..ea4fb0f142 100755 --- a/scripts-dev/release.py +++ b/scripts-dev/release.py @@ -611,18 +611,28 @@ def _wait_for_actions(gh_token: str | None) -> None: if len(resp["workflow_runs"]) == 0: continue - if all( - workflow["status"] != "in_progress" for workflow in resp["workflow_runs"] - ): - success = all( - workflow["status"] == "completed" for workflow in resp["workflow_runs"] - ) - if success: - _notify("Workflows successful. You can now continue the release.") - else: - _notify("Workflows failed.") - click.confirm("Continue anyway?", abort=True) + # Notify early if any workflow run has already failed. + failed_workflows = [ + workflow + for workflow in resp["workflow_runs"] + if workflow["status"] == "completed" and workflow["conclusion"] != "success" + ] + if failed_workflows: + for workflow in failed_workflows: + print( + f"Workflow run failed ({workflow['conclusion']}): {workflow['name']}" + ) + print(f" see {workflow['html_url']}") + _notify("A workflow run has failed.") + click.confirm("Continue anyway?", abort=True) + break + # If every run has completed successfully, we are done. + if all( + workflow["status"] == "completed" and workflow["conclusion"] == "success" + for workflow in resp["workflow_runs"] + ): + _notify("Workflows successful. You can now continue the release.") break