gh pr checks reports a re-queued check run with the previous run's conclusion and exits 0
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 88/100
Hướng nghiên cứu
Bắt đầu tại pkg/cmd/pr/checks/aggregate.go ở eliminateDuplicates, sau đó đọc các trường hợp TestEliminateDuplicates hiện có. Tái hiện kịch bản lần chạy đã hoàn tất cùng với lần chạy lại được xếp hàng như mô tả trong issue và xác minh rằng lệnh báo check được xếp hàng là đang chờ xử lý với mã thoát 8 thay vì kết luận trước đó và mã thoát 0.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
gh pr checks reports a re-queued check run with the conclusion of the run it replaced, and exits 0, while the new run is still queued.
eliminateDuplicates in pkg/cmd/pr/checks/aggregate.go keeps the newest entry per check by sorting on StartedAt descending. A check run that has not started yet has no startedAt, so its StartedAt is the zero time, which sorts as the oldest entry. The completed run it supersedes wins the deduplication and its conclusion is reported.
Affected version
Built from trunk at 0d121e8c (2026-09-05); the logic is unchanged in the current release.
Steps to reproduce the behavior
- On a PR with a completed check run, re-run that check so a new run is queued but has not started.
- Run
gh pr checks <pr>while the new run is queued. - The old run's conclusion is shown and the command exits 0.
Expected vs actual behavior
Expected: the re-queued run is reported as pending and the command exits 8 (pending). Actual: the previous run's pass is shown and the exit code is 0.
Logs
A driver that feeds eliminateDuplicates a completed run and a queued re-run of the same check (queued run: startedAt unset) returns the completed run:
build pass
error: <nil>
With the queued entry ranked first (a stable sort that puts zero StartedAt values ahead, then newest first) the same input returns:
build pending
error: PendingError
A fix with that ordering and a table case in TestEliminateDuplicates is ready; happy to open the PR if this is labelled help wanted.
- Ngôn ngữ chính
- Go
- Star
- 46.3k
- Fork
- 9.1k
- Merge trung bình
- 1 ngày 7 giờ
- Pull request đã merge (30 ngày)
- 76
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 cli/cli
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
more-info-needed needs-triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
-
bug gh-pr priority-2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
bug gh-auth priority-3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
enhancement gh-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 60/100
github/gh-aw-mcpg#13748 ·
-
agentic-workflows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
googleapis/librarian#7670 · 2 bình luận ·