Make create-branch script more robust in case the jenkins job fails unexpectedly
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- git, php
- Ambito
- build-system, ci-cd, release
Direzione di ricerca
Inizia ispezionando lo script create-branch e i log dei job Jenkins collegati di Flow e Neos, quindi traccia come vengono gestiti i controlli e i push dei branch remoti. Il lavoro è completato quando una nuova esecuzione può recuperare in sicurezza un job interrotto, rifiuta i branch con più di un commit imprevisto e segnala il comportamento rilevante della protezione dal force-push.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
While trying to create branches for 7.1 jenkins somehow failed me (for both Flow and Neos) and timed out in the middle of doing it's stuff.
See
https://jenkins.neos.io/job/flow-create-branch/20/console
https://jenkins.neos.io/blue/organizations/jenkins/neos-create-branch/detail/neos-create-branch/20/pipeline/
This lead to a couple of things:
- seemingly not all repos had the branches created
- not sure if all post-branch tasks were finished
- jobs are marked as failed, so whoever is looking will see big red dots
- restarting the jobs fails with a push error, because of history mismatch
- unless you have admin access to all potentially affected repositories and know how to "unprotect" branches, you can not progress
So what can we do to make this process easier to recover from in the future?
- check if remote branch already exists, if not proceed as normal
- if branch exists, check if the remote branch is more than 1 commit ahead (git rev-list HEAD..origin/{$branch}--count)
- if remote is more than 1 commit ahead, fail with "YOU CAN'T RESET AN EXISTING VERSION WITH CHANGES, BRO!"
- if it's less, just do --force push and go on, writing a notice level message of "RECREATING BRANCH, DID IT FAIL THE LAST TIME?!"
To check: does the jenkins job have force-push protection overriding rights (is it in the admin group)?
- Lingua principale
- PHP
- Stelle
- 9
- Fork
- 10
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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 neos/BuildEssentials
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
neos/BuildEssentials#54 · 3 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
neos/BuildEssentials#35 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
neos/BuildEssentials#29 · 1 commento ·
Tutte le issue di neos/BuildEssentials
Issue simili
-
Bug-Report
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
RSS-Bridge/rss-bridge#5158 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
octobercms/october#6150 ·
-
Syntax error with CONST-sAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
type/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
flarum/framework#5301 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Add TuneIn-DirMon in the bot listForse già presa @liviuconcioiu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
matomo-org/device-detector#8424 ·
I maintainer di solito rispondono entro 1 giorno