pr_checker: ignore superseded GitHub Actions check suites when a head SHA is reused
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- github-actions, javascript
Hướng nghiên cứu
Bắt đầu với lib/pr_checker.js: checkGitHubCI() lặp qua các suite được lib/queries/PRCommits.gql trả về. Sử dụng các ví dụ nodejs/node được liên kết để hiểu các lần chạy bị trùng lặp cho cùng một head SHA, sau đó xác minh rằng chỉ lần chạy mới nhất còn áp dụng cho mỗi workflow ảnh hưởng đến kết quả và các lần chạy cũ hơn đã bị thay thế không chặn việc chấp nhận.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
PRChecker.checkGitHubCI() can incorrectly report a PR as having failed GitHub CI when its current head commit has both:
- an older cancelled/failed GitHub Actions run; and
- a newer successful run of the same workflow.
This can happen when a PR branch is force-pushed away from a commit and later force-pushed back to exactly the same SHA. GitHub
keeps both sets of check suites attached to that commit.
This occurred on nodejs/node#64803, https://github.com/nodejs/node/pull/64601 whose current head SHA is:
ee1ca501264411a3e993d4ed487f833fb0ffa841
a23d7a9a84a190e3804f9b2fb200feb833f3114a
Timeline:
- An Actions run was started for this SHA:
https://github.com/nodejs/node/actions/runs/30359390795 - The PR branch was updated, causing that run to be cancelled by the workflow's
cancel-in-progressconfiguration. - The branch was subsequently force-pushed back to the same SHA:
https://github.com/nodejs/node/pull/64803#event-28598521231 - A new run for the same SHA completed successfully:
https://github.com/nodejs/node/actions/runs/30360481950 - The latest Jenkins CI also completed successfully:
https://ci.nodejs.org/job/node-test-pull-request/75495/
However, the commit queue reported one failed and 15 cancelled GitHub Actions jobs from the older, superseded runs:
https://github.com/nodejs/node/pull/64803#issuecomment-5226872042
The commit checks page contains both the old cancelled suites and the newer successful suites:
https://github.com/nodejs/node/commit/ee1ca501264411a3e993d4ed487f833fb0ffa841/checks
The reported macOS failure was also produced while the old workflow was being cancelled, rather than by a test failure:
https://github.com/nodejs/node/actions/runs/30359390795/job/90275679554
The GraphQL query retrieves up to 100 check suites associated with the current commit:
https://github.com/nodejs/node-core-utils/blob/v7.0.1/lib/queries/PRCommits.gql#L28-L44
checkGitHubCI() then iterates over every GitHub Actions suite and treats any non-successful historical suite as a current
failure:
https://github.com/nodejs/node-core-utils/blob/v7.0.1/lib/pr_checker.js#L461-L515
It does not identify whether an older suite has been superseded by a newer run of the same workflow.
As a result, an obsolete cancelled or failed run can permanently prevent the commit queue from accepting that SHA, even though
all current CI runs succeeded.
For each GitHub Actions workflow, only the latest applicable run for the current head SHA should determine the CI result. Older
runs superseded by a newer run of the same workflow should be ignored.
Refs: https://github.com/nodejs/node/pull/64601#issuecomment-5226071594
Refs: https://github.com/nodejs/node/pull/64803#issuecomment-5226872042
- Ngôn ngữ chính
- JavaScript
- Star
- 313
- Fork
- 137
- Merge trung bình
- 2 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 24
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nodejs/node-core-utils
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
nodejs/node-core-utils#664 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
nodejs/node-core-utils#1164 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
nodejs/node-core-utils#1160 · 3 bình luận ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
nodejs/node-core-utils#1063 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
nodejs/node-core-utils#967 · 4 bình luận ·
Tất cả issue của nodejs/node-core-utils
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
avniproject/avni-client#2135 ·
-
automated broken-link
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
babalae/bettergi-scripts-list#3674 ·
-
A-Release-Notes C-Editing D-Modest S-Ready-For-Implementation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
bevyengine/bevy-website#2595 ·