You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "zhengruifeng (via GitHub)" <gi...@apache.org> on 2026/05/27 08:18:39 UTC
[PR] [MINOR][INFRA] Prevent merging Epic/Umbrella PRs in merge script [spark]
zhengruifeng opened a new pull request, #56137:
URL: https://github.com/apache/spark/pull/56137
### What changes were proposed in this pull request?
Add a fail-hard check in `dev/merge_spark_pr.py`: after fetching the JIRA summary for each `SPARK-NNNN` referenced in the PR title, abort the merge if the issue type is `Epic` or `Umbrella`. The committer is told to file a Sub-task under the parent (via `dev/create_spark_jira.py "<title>" -c <component> -p <ID>`) and reference that Sub-task in the PR title instead.
### Why are the changes needed?
When the merge script completes a merge, it transitions the linked JIRA(s) to **Resolved** and stamps a **Fix Version** on them.
PRs frequently end up referencing the wrong ticket - it is common for a contributor to drop the parent Epic/Umbrella ID into the title when they meant to create or reference a Sub-task. When that slips past the committer, the script silently auto-closes the Epic/Umbrella with a Fix Version, leaving the parent ticket in an incorrect **Resolved** state with a Fix Version it should not have. Cleaning that up later (reopening the Epic, removing the stray Fix Version, retransitioning) is manual and easy to forget.
Failing the merge before that transition happens forces a quick title fix (or a Sub-task creation) at merge time, and keeps Epic/Umbrella status accurate.
Drafting this for discussion before filing a JIRA - happy to file one and update the title if reviewers prefer that to ` + "`[MINOR]`" + `.
### Does this PR introduce _any_ user-facing change?
No. Committer tooling only.
### How was this patch tested?
- ` + "`python3 -m py_compile dev/merge_spark_pr.py`" + ` succeeds.
- Existing doctests still pass: ` + "`python3 -m doctest dev/merge_spark_pr.py`" + ` - 57/57.
- The new check only runs when ` + "`asf_jira`" + ` is initialized, leaving the no-JIRA path unchanged, and the per-ID fetch-error path is preserved.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.7)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57097][INFRA] Prevent merging Epic/Umbrella PRs in merge script [spark]
Posted by "cloud-fan (via GitHub)" <gi...@apache.org>.
cloud-fan commented on code in PR #56137:
URL: https://github.com/apache/spark/pull/56137#discussion_r3310658184
##########
dev/merge_spark_pr.py:
##########
@@ -1260,11 +1260,30 @@ def main():
if asf_jira is not None:
jira_ids = re.findall("SPARK-[0-9]{4,5}", title)
+ # Epic / Umbrella tickets group related work and must not be resolved by a single PR.
+ # Collect every offender so the committer sees the full list in one shot rather than
+ # discovering them one-by-one across repeated merge attempts.
+ blocking_issue_types = {"Epic", "Umbrella"}
+ blockers = []
for jira_id in jira_ids:
try:
- print_jira_issue_summary(asf_jira.issue(jira_id))
+ issue = asf_jira.issue(jira_id)
except Exception:
print_error("Unable to fetch summary of %s" % jira_id)
+ continue
+ print_jira_issue_summary(issue)
+ issuetype = issue.fields.issuetype.name
+ if issuetype in blocking_issue_types:
+ blockers.append((jira_id, issuetype))
Review Comment:
The issue type collected here is discarded — `ids_str` only uses the JIRA ID. Two cleaner options:
- Drop the tuple if you don't need the type:
```python
blockers.append(jira_id)
...
ids_str = ", ".join(blockers)
```
- Or surface the type in the error so the committer can see at a glance which IDs are Epic vs. Umbrella:
```python
ids_str = ", ".join("%s (%s)" % (jid, t) for jid, t in blockers)
```
producing `Linked JIRA(s) SPARK-1234 (Umbrella), SPARK-5678 (Epic) are umbrella or epic tickets...`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57097][INFRA] Prevent merging Epic/Umbrella PRs in merge script [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #56137:
URL: https://github.com/apache/spark/pull/56137#issuecomment-4561469866
thanks all, merged to master
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57097][INFRA] Prevent merging Epic/Umbrella PRs in merge script [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #56137:
URL: https://github.com/apache/spark/pull/56137#issuecomment-4553476079
use this PR to merge itself (a umbrella) fails with:
```bash
(spark-dev-313) ➜ spark git:(merge-script-block-umbrella-epic-dev3) dev/merge_spark_pr.py
git rev-parse --abbrev-ref HEAD
Which pull request would you like to merge? (e.g. 34): 56137
=== JIRA SPARK-57097 ===
Summary Prevent merging Epic/Umbrella PRs in merge script
Assignee None
Status Open
Url https://issues.apache.org/jira/browse/SPARK-57097
Affected ['4.3.0']
Cannot merge PR #56137. The following linked JIRA(s) are umbrella or epic tickets and must not be resolved by a single PR: SPARK-57097. File Sub-task(s) under SPARK-57097 and update the PR title to reference the Sub-task(s) instead.
Restoring head pointer to merge-script-block-umbrella-epic-dev3
git checkout merge-script-block-umbrella-epic-dev3
Already on 'merge-script-block-umbrella-epic-dev3'
git branch
Restoring head pointer to merge-script-block-umbrella-epic-dev3
git checkout merge-script-block-umbrella-epic-dev3
Already on 'merge-script-block-umbrella-epic-dev3'
git branch
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
Re: [PR] [SPARK-57097][INFRA] Prevent merging Epic/Umbrella PRs in merge script [spark]
Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #56137: [SPARK-57097][INFRA] Prevent merging Epic/Umbrella PRs in merge script
URL: https://github.com/apache/spark/pull/56137
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org