Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Make create-branch script more robust in case the jenkins job fails unexpectedly

Aperta
#52 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di neos/BuildEssentials

Tutte le issue di neos/BuildEssentials

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.