Stack panel says a pull request is queued when it has no queue entry

Đang mở
#503 1 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ó
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
Sôi nổi
Công nghệ
github, go
Lĩnh vực
api, cli

Hướng nghiên cứu

Bắt đầu với trạng thái của bảng stack và các trường truy vấn của pullRequest là isInMergeQueue và mergeQueueEntry{ position }; tái hiện trường hợp hai PR bằng cách so sánh bảng với trang hàng đợi merge và phản hồi API. Được xem là hoàn tất khi một pull request phía trên không nằm trong hàng đợi không còn hiển thị nội dung cho biết đã được đưa vào hàng đợi hoặc hành động Remove from queue, trong khi các badge hiện có và đang đúng vẫn tiếp tục đúng.

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

Mô tả

Summary

On a stacked pull request that is not in the merge queue, the stack panel says it is, and offers to remove it. The badges in the same panel report the state correctly, so the panel contradicts itself.

Evidence

Stack main ← #101 ← #102. After Enqueue stack (2), only #101 is admitted. The page of #102 then shows:

  • the heading "Queued to merge…"
  • "This pull request is next up in the merge queue."
  • a "Remove from queue" button
  • badges #102 Ready and #101 Queued, which are correct
Image

The merge queue page for the same branch shows 1 Queued and lists only #101:

Image

The API agrees with the queue page, not with the heading:

mergeQueue(branch:"main").entries.totalCount = 1
mergeQueue(branch:"main").entries.nodes      = [{ position: 1, pullRequest: #101 }]

#101   isInMergeQueue true    position 1
#102   isInMergeQueue false   mergeQueueEntry null

#102 reported isInMergeQueue=false at every sample across the whole landing.

Expected

A stacked pull request with no queue entry should not be described as queued:

  • do not head the panel "Queued to merge…" on a pull request that is not queued;
  • do not say "This pull request is next up in the merge queue" when isInMergeQueue is false. If the intent is that this layer goes after the one below it, say that. It is a statement about the stack, not about queue membership;
  • do not offer "Remove from queue" for a pull request with no mergeQueueEntry. The button does not say whether it would remove the layer below, which would be destructive.

Actual

The heading, the sentence and the button all claim queue membership that the API denies, while the badges in the same panel report it correctly.

Environment

  • gh 2.100.0, gh stack v0.0.8
  • Trunk ruleset:
    merge_queue:   grouping_strategy HEADGREEN, merge_method REBASE,
                   max_entries_to_build 8, max_entries_to_merge 8,
                   min_entries_to_merge 1, min_entries_to_merge_wait_minutes 5,
                   check_response_timeout_minutes 40
    pull_request:  allowed_merge_methods ["rebase"], required_approving_review_count 1,
                   require_last_push_approval false, dismiss_stale_reviews_on_push false
    
  • delete_branch_on_merge: true, allow_auto_merge: false

Reproduction

  1. Protect a trunk with a merge queue. Run gh stack link <bottom> <top> and get both pull requests approved and green.
  2. Press Enqueue stack (2).
  3. Open the top pull request and compare its panel against the branch's merge queue page and against pullRequest{ isInMergeQueue mergeQueueEntry{ position } }.

Related

  • #174 — why the upper layer is out of the queue in the first place
  • #172 — "'Merge stack' appears to enqueue only the bottom PR"
  • #502 — the wording matters most there, because the rewrite forces a manual re-enqueue and this panel gives no sign of it
Ngôn ngữ chính
Go
Star
1.5k
Fork
73
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
7

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

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 github/gh-stack

Tất cả issue của github/gh-stack

Issue tương tự

Thêm issue về Go

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.