Skip to content

Commit f74bcad

Browse files
authored
Carry RC-N-1 checkboxes forward into RC-N testing issue (#65644)
When cutting a follow-up RC, items that testers already verified on the previous RC should be pre-checked so they do not retest unchanged fixes. Add a step to the airflow-ctl release doc that takes a diff of checked boxes between the previous and current RC's testing-status issues and pre-checks the matching items in the new issue (matching works across v3-2-test backport PRs that reference the original main PR number on the same line). Caught while running 0.1.4rc3 — 7 items from rc2 carried over; without the carry-over, all of those testers would have had to re-verify.
1 parent c1281c6 commit f74bcad

1 file changed

Lines changed: 70 additions & 0 deletions

File tree

dev/README_RELEASE_AIRFLOWCTL.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,76 @@ Keep the URL returned by the command — you will reference it in the voting
819819
email (next section) and in the `Close the testing status issue` step at
820820
the end of the release.
821821

822+
### Carry over checked boxes from the previous RC
823+
824+
When cutting a follow-up RC (e.g. `rc3` after `rc2` was voted down), the
825+
items that testers already verified on the previous RC should be
826+
pre-checked in the new issue — otherwise testers waste time retesting
827+
unchanged fixes, and cross-RC progress is harder to see. Carry the
828+
state over like this:
829+
830+
```shell script
831+
# PREVIOUS_RC_ISSUE is the previous-RC testing-status issue number
832+
# NEW_RC_ISSUE is the issue you just opened above
833+
PREVIOUS_RC_ISSUE=65497
834+
NEW_RC_ISSUE=65643
835+
836+
python3 <<PY
837+
import json, re, subprocess
838+
839+
def body(n):
840+
return json.loads(subprocess.check_output(
841+
["gh", "issue", "view", str(n), "--repo", "apache/airflow", "--json", "body"]
842+
))["body"]
843+
844+
prev = body(${PREVIOUS_RC_ISSUE})
845+
new = body(${NEW_RC_ISSUE})
846+
847+
# PR numbers checked in the previous RC
848+
prev_checked = set()
849+
for line in prev.splitlines():
850+
if re.match(r'^- \[[xX]\] ', line):
851+
prev_checked.update(re.findall(r'#(\d+)', line))
852+
853+
# For each unchecked line in the new RC, pre-check it if any PR number on
854+
# that line was already verified in the previous RC. Backport lines like
855+
# "[v3-2-test] X (#orig) (#backport)" match on either number.
856+
pre_checked = []
857+
out = []
858+
for line in new.splitlines():
859+
m = re.match(r'^- \[ \] (.*)', line)
860+
if m and set(re.findall(r'#(\d+)', m.group(1))) & prev_checked:
861+
out.append(f"- [x] {m.group(1)}")
862+
pre_checked.append(m.group(1).split('](')[0].lstrip('['))
863+
else:
864+
out.append(line)
865+
866+
with open("/tmp/rc-body-carried-over.md", "w") as f:
867+
f.write("\n".join(out))
868+
print(f"Pre-checked {len(pre_checked)} items carried over from #${PREVIOUS_RC_ISSUE}:")
869+
for t in pre_checked:
870+
print(f" ✓ {t[:100]}")
871+
PY
872+
873+
gh issue edit ${NEW_RC_ISSUE} --repo apache/airflow \
874+
--body-file /tmp/rc-body-carried-over.md
875+
876+
# Post a comment explaining what was carried over, so contributors who
877+
# signed the items off last time are not pinged to retest.
878+
gh issue comment ${NEW_RC_ISSUE} --repo apache/airflow --body \
879+
"Pre-checked N items that were already verified on the previous RC \
880+
(#${PREVIOUS_RC_ISSUE}) and are present in this RC unchanged — direct \
881+
cherry-picks or \`[v3-2-test]\` backports of the same fix. Items left \
882+
unchecked are either new in this RC or were not verified on the previous \
883+
one."
884+
```
885+
886+
Review the diff after the edit — occasionally a v3-2-test backport PR
887+
number does not appear on the same line as the original main-branch PR
888+
(e.g. when the original was squashed to hide its number), in which case
889+
the carry-over misses it and the release manager must check the box
890+
manually.
891+
822892
## Prepare voting email for airflow-ctl release candidate
823893

824894
Make sure the packages are in https://dist.apache.org/repos/dist/dev/airflow/airflow-ctl/

0 commit comments

Comments
 (0)