[Feature Request] Allow Sub-PRs (one branch with commits grouped into Sub-PRs) instead of one-branch-per-Stacked-PR
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- git, github, go
- Ambito
- cli, developer-experience
Direzione di ricerca
Inizia mappando il modo in cui gh-stack rappresenta attualmente le PR impilate, gli intervalli di commit, le dipendenze e il comportamento di CI; l’issue non indica file, test o punti di ingresso. Definisci il modello dati Sub-PR e i confini del workflow prima dell’implementazione; il lavoro è da considerarsi completato quando il raggruppamento, la revisione, le dipendenze e il comportamento CI opzionale proposti funzionano senza richiedere un branch per ogni Sub-PR.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The problem
Based on my experience making a stack of 12 PRs to an open source repo , I have the following feature request.
It seems to me that a "PR Stack" has the primary goal:
- make big sets of changes easier to review by breaking them up
But it has the primary drawbacks:
- requires maintaining N branches locally, writing N pull request descriptions, creating N JIRAs/issue tickets (if your org requires a 1:1 mapping there, as many do), etc. which is a ton more paperwork
- increases the load on CI by up to O(N) where N is the number of stacked PRs (and same effect on QA if your org requires QA for each PR)
- requires rebasing all or part of the stack anytime there are changes below the top of the stack (my 12-stack required at least ten rebases and half of those were non-trivial, taking up to 30-45 minutes -- and I'm always the fastest/most adept git conflict resolving specialist wherever I work, and usually, the guy everyone always DMs to do their complicated resolutions... so if it was a problem for me, it's going to be a nightmare for most devs)
- thus... it adds pressure on the dev to get the whole stack approved as quickly as possible, since the longer it goes without merging to main, the more times you'll have to rebase it; this adds the anxiety and severe annoyance of having a "sword of Damocles" hanging over you
- ultimately it does not actually reduce the time to review a large set of changes, since the size of the set of changes being reviewed has not been reduced; if anything, it increases the time, and likely delays how soon the changes can merge vs. if it was just one branch
- if someone ELSE makes a stacked PR into your PR, now you have to rebase someone else's PR in order to catch up with main, and that's a recipe for disaster -- yet making a stacked PR into someone else's PR is probably the best use-case for this feature as it's much better alternative to a contentious code-review
- you can't create a tree structure of stacked PRs, even though there's no reason in git why you shouldn't be able to, and it would arguably simplify the rebasing in many cases if you structured the tree correctly
Proposed Fix
Rather than have "Stacked PRs", instead enhance the "commit range" feature of PRs to work like described below. Imagine that you have a large branch MyBigBranch with lots of changes, which some reviewer says is "too big" or whatever other excuse they have for not being able to be arsed to actually review it despite being paid six figures.
I propose that github would allow a Stacked-PR-like interface that lets you:
- designate certain sets of changes in the PR as "Sub-PRs" that can receive individual reviews and approval
- create a dependency tree of "Sub-PRs" so it's clear which parts can be made into separate branches for individual merging/cherry-picking if needed without breaking the build
- not require individual CI builds per Sub-PR unless specified
- create "Sub-PRs" by commit messages automatically: "[Sub-1] Changes to file system monitor" ... "[Sub-2] Changes to File Tree UX" ... etc.
- create dependency between Sub-PRs similarly: "[Sub-1.1] File System data model update" "[Sub-1.2] File System monitor tests" "[Sub-1.1.1] File System Data Model tests" etc.
Sub-PRs would have the same benefit to reviewers of breaking up the process into individually reviewable chunks without all the downsides of Stacked PRs hat I listed above and in my linked post.
- Lingua principale
- Go
- Stelle
- 1.5k
- Fork
- 73
- Merge medio
- 1g 8h
- PR unite (30g)
- 7
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/gh-stack
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
feature request topic: cli - general
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
feature request topic: auto-merge
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug topic: docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
-
feature request topic: cli - view
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Tutte le issue di github/gh-stack
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
kind/bug needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vllm-project/semantic-router#4024 · 1 commento ·