You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pr-queue: keep every unreadable STATE (.bad), report it once, and make own_cache() never raise #934
Carried over from a consumer project's old copy of the merge queue (that copy is gone; the same code is in fork-ci/actions/pr-queue/pr_queue.py on fork main). Three minor findings from earlier lens reviews, checked against fork main.
Problem
A second unreadable STATE overwrites the first .bad.recover() does os.replace(state, state + '.bad') even when a .bad already exists, so the evidence of the first lost plan (which PR may have auto-merge OFF) is gone. Rare.
The .bad warning reaches only the log. After the one red run, every later run prints "WARNING: ... is an unreadable plan of an earlier run" only to the Actions log or journal. Nothing on GitHub says it, so "never silent" may not reach a person.
own_cache() can still raise. Its docstring says every failure "returns False ... never an exception", but os.makedirs(parent), os.listdir(parent) and the stale ref-lock os.remove (and the os.walk around it) still raise OSError (EACCES, EROFS, ENOSPC). It fails closed today (the fetch runs before the state write and the disarm), but the contract is wrong.
Wanted
Keep every .bad: a unique name (.bad-<time ns>) or keep the first and name the second; the warning lists all of them.
One visible report while a .bad exists (a notify command call or one issue/comment, not one per run), cleared when the file is gone. Opinion-level in the original review: decide if a log line plus the existing notify hook is enough.
Catch these errors in own_cache() and return False with the message, or narrow the docstring and the failure table. Test each raising call.
State question: what happens when the queue runs again with an old .bad from an older queue version, stops between the replace and the sync_dir, or meets a cache folder it cannot list?
Size: S. Area:fork-ci/actions/pr-queue. Critical (fork-ci/**, merge path; two independent reviewers). Related: #848.
Activity
fix(#934): pr-queue round 1: a cache without refs/queue fetches, ever…
fix(#934): pr-queue keeps every unreadable plan, reports each once, o…
fix(#934): pr-queue keeps every unreadable plan, reports each once, o…
fix(#934): pr-queue keeps every unreadable plan, reports each once, o…