Skip to content

pr-queue: background fsck widens the check-to-merge window; FSCK_KNOWN inside the cache (#459 follow-ups) #465

Closed

Description

@scuttletoby

Follow-up from the orchestrator's diff read of #459 (fix round ba0788a, merged as 7af1578). Minor.

  1. Wider window between check and merge-tree. update() now runs git fsck in the background right after its first fetch (check_later). The answer is used, and the cache is not checked again before same_change runs merge-tree, which can be minutes later, after the branch update and the wait for the new head. That is safe against objects planted by an earlier job (the threat the check is for). It is not safe if another process can write to the cache during the run, for example a second runner on the same host under the same user. Before this round the window was seconds. Decide: either say in the README that the cache must not be writable by other jobs while the queue runs (and check that our runner setups keep it so), or re-check only the objects merge-tree reads (git cat-file hash check of the two trees' reachable objects) right before merge-tree.
  2. FSCK_KNOWN lives inside the cache. A planted queue-fsck-known with the right lines makes the queue stop and ask a person. That fails closed (no merge), so it only blocks the queue. Say so in the README, or keep the file outside the cache.

Found by reading the code diff. No lens has run on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions