From 0b6cba5076094ee402fbc0ed4965e9065440ee6f Mon Sep 17 00:00:00 2001 From: strtgbb <146047128+strtgbb@users.noreply.github.com> Date: Thu, 2 Jul 2026 11:53:06 -0400 Subject: [PATCH] Fix release report fallback baseline and initialize `known_fails`. Increase history fetch from 200 to 500 to make sure tag is found. When no release tag exists, choose the latest bootstrap merge from first-parent history and match `Altinity/bump` subjects, and initialize `known_fails` to avoid an `UnboundLocalError` in report rendering. Co-authored-by: Cursor --- .../create_workflow_report.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/actions/create_workflow_report/create_workflow_report.py b/.github/actions/create_workflow_report/create_workflow_report.py index 2aadba55febd..0e233288e0c7 100755 --- a/.github/actions/create_workflow_report/create_workflow_report.py +++ b/.github/actions/create_workflow_report/create_workflow_report.py @@ -311,12 +311,15 @@ def _find_rebase_baseline(branch_ref: str, cwd: str | None) -> str | None: "git", "log", branch_ref, - "--reverse", + "--first-parent", + "-n", + "1", "-i", "-E", "--grep=^Rebase CICD", "--grep=Merge pull request .*rebase-cicd", "--grep=Merge pull request .*from Altinity/rebase/", + "--grep=Merge pull request .*from Altinity/bump/", "--format=%H", ], cwd=cwd, @@ -339,7 +342,7 @@ def get_prs_in_release_dataframe( ) -> pd.DataFrame: f""" PRs merged into branch_ref that belong in the next release notes: after the latest GitHub - Release tag on this history, or after the oldest rebase bootstrap if no such tag exists. + Release tag on this history, or after the latest bootstrap merge if no such tag exists. Only merge commits whose subject has from / (e.g. from Altinity/) are included. Columns: pr_number, pr_name, labels. Omits PRs labeled cicd. """ @@ -356,11 +359,11 @@ def get_prs_in_release_dataframe( check=False, ) - baseline_ref, baseline_sha = _find_release_baseline(branch_ref, repo, cwd) + _, baseline_sha = _find_release_baseline(branch_ref, repo, cwd) if not baseline_sha: - # If no release tag, try to find rebase commit 200 commits back. + # If no release tag, search recent history for the latest branch bootstrap merge. subprocess.run( - ["git", "fetch", "--deepen=200", "origin", branch_ref], + ["git", "fetch", "--deepen=500", "origin", branch_ref], cwd=cwd, capture_output=True, text=True, @@ -1066,6 +1069,7 @@ def create_workflow_report( "regression_fails": get_regression_fails(db_client, actions_run_url), "docker_images_cves": [], } + known_fails = {} if pr_number == 0 and not mark_preview: try: