Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#52 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
git, php
Lĩnh vực
build-system, ci-cd, release

Hướng nghiên cứu

Bắt đầu bằng việc kiểm tra script create-branch và các log job Jenkins được liên kết của Flow và Neos, sau đó theo dõi cách các bước kiểm tra và push branch từ xa được xử lý. Hoàn tất khi một lần chạy lại có thể khôi phục an toàn một job bị gián đoạn, từ chối các branch có nhiều hơn một commit bất ngờ và báo cáo hành vi liên quan của cơ chế bảo vệ force-push.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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)?

Ngôn ngữ chính
PHP
Star
9
Fork
10
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của neos/BuildEssentials

Tất cả issue của neos/BuildEssentials

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.