Skip to content

Commit a376358

Browse files
strtgbbcursoragent
andcommitted
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 <cursoragent@cursor.com>
1 parent 3cc1dca commit a376358

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

.github/actions/create_workflow_report/create_workflow_report.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,12 +311,15 @@ def _find_rebase_baseline(branch_ref: str, cwd: str | None) -> str | None:
311311
"git",
312312
"log",
313313
branch_ref,
314-
"--reverse",
314+
"--first-parent",
315+
"-n",
316+
"1",
315317
"-i",
316318
"-E",
317319
"--grep=^Rebase CICD",
318320
"--grep=Merge pull request .*rebase-cicd",
319321
"--grep=Merge pull request .*from Altinity/rebase/",
322+
"--grep=Merge pull request .*from Altinity/bump/",
320323
"--format=%H",
321324
],
322325
cwd=cwd,
@@ -339,7 +342,7 @@ def get_prs_in_release_dataframe(
339342
) -> pd.DataFrame:
340343
f"""
341344
PRs merged into branch_ref that belong in the next release notes: after the latest GitHub
342-
Release tag on this history, or after the oldest rebase bootstrap if no such tag exists.
345+
Release tag on this history, or after the latest bootstrap merge if no such tag exists.
343346
Only merge commits whose subject has from <repo_owner>/ (e.g. from Altinity/) are included.
344347
Columns: pr_number, pr_name, labels. Omits PRs labeled cicd.
345348
"""
@@ -356,11 +359,11 @@ def get_prs_in_release_dataframe(
356359
check=False,
357360
)
358361

359-
baseline_ref, baseline_sha = _find_release_baseline(branch_ref, repo, cwd)
362+
_, baseline_sha = _find_release_baseline(branch_ref, repo, cwd)
360363
if not baseline_sha:
361-
# If no release tag, try to find rebase commit 200 commits back.
364+
# If no release tag, search recent history for the latest branch bootstrap merge.
362365
subprocess.run(
363-
["git", "fetch", "--deepen=200", "origin", branch_ref],
366+
["git", "fetch", "--deepen=500", "origin", branch_ref],
364367
cwd=cwd,
365368
capture_output=True,
366369
text=True,
@@ -1066,6 +1069,7 @@ def create_workflow_report(
10661069
"regression_fails": get_regression_fails(db_client, actions_run_url),
10671070
"docker_images_cves": [],
10681071
}
1072+
known_fails = {}
10691073

10701074
if pr_number == 0 and not mark_preview:
10711075
try:

0 commit comments

Comments
 (0)