Skip to content

Commit 2093ca5

Browse files
committed
Workaround for pull requests stuck in conflict checking state
See comment and upstream issue go-gitea#23050 for details
1 parent 6801d50 commit 2093ca5

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

modules/queue/unique_queue_disk_channel.go

+15
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,21 @@ func (q *PersistableChannelUniqueQueue) Has(data Data) (bool, error) {
173173
if err != nil || has {
174174
return has, err
175175
}
176+
177+
// BLENDER: workaround for problem where on ungraceful shutdown, the persistent
178+
// queue on disk contains PRs to be checked for conflicts. On restart these will
179+
// be laoded into q.internal, but seemingly not start any work.
180+
//
181+
// At the same time InitializePullRequests will also add any PRs waiting for
182+
// conflict checking to q.channelQueue, which does start work but does not write
183+
// out its status because this Has() check returns true.
184+
//
185+
// Workaround is to just not check the persistent queue since it seems unnecessary
186+
// for this particular case.
187+
if q.Name() == "pr_patch_checker" {
188+
return false, nil
189+
}
190+
176191
q.lock.Lock()
177192
defer q.lock.Unlock()
178193
if q.internal == nil {

0 commit comments

Comments
 (0)