github / github/gh-stack

Add merge queue CI optimisation

Aberta
#395 1 comentário 13 reações 0 responsáveis Ver no GitHub
feature request topic: merge queue
Linguagem predominante
Go
Estrelas
1.5k
Forks
70
Merge médio
1d 8h
PRs com merge (30d)
7

Descrição

## The problem

We use stacks a lot, and often mid stack PRs have some CI failures that are fixed above.

When I merge a stack of 5 PRs, I don't need to run CI in each of them, it's OK to skip 1-4 and only run CI in 5th. It saves A LOT of wasted runner minutes.

## Current state

You have this checkbox "Only merge non-failing pull requests":
Image

**Imagine we have added 5 stacked PRs to a merge queue, with CI like this**
PR 1 pass ✅
PR 2 pass ✅
PR 3 fail ❌
PR 4 pass ✅
PR 5 fail ❌

Checkbox set:
It will run CI on 5 pull requests, **merge 1-2**
Checkbox not set:
It will run CI on 5 pull requests, **merge 1-4**

## Proposal

It is greedy to _merge something_ now. I want it to _merge a queued atomic stack_ instead.

In order to make it work, you need another checkbox "merge a queued stack atomically and only run CI on the last PR", where it will only run CI on PR 5, and it **will not merge** 1-2 or 1-4 of I queued 1-5.

However, if I only added 1-2 or 1-4 to the merge queue - it will merge, because the last **queued** PR succeeded.

**For context:** it is not rare for us to hit a 50 PRs limit in a graphite, and 20 PRs stacks are very usual. Saving 20x runner minutes is a huge deal.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Nenhum arquivo ou teste é especificado. Comece localizando a implementação da merge queue e a opção existente “Only merge non-failing pull requests”; em seguida, acompanhe como os PRs empilhados são avaliados. O trabalho estará concluído quando uma pilha enfileirada puder executar CI apenas em seu último PR e fazer o merge atomicamente, enquanto uma fila parcial ainda fizer o merge quando seu último PR enfileirado tiver sucesso.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
github, go
Domínio
cli, devtools
Tipo de issue
Funcionalidade
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Ativa
Clareza
Razoavelmente clara
Facilidade para iniciantes
38/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.