Skip to content

Runs and workspaces: delete through a trash folder under one profile lock #825

Backlog
0 of 3 issues completed
Backlog

Description

@harenome

Priority

P3

Components

app/nullius/execution.py (Delete launch), app/nullius/workspace.py (rename, delete, caches), app/nullius/judge/store.py, app/web/runs.py, app/web/workspaces.py

Today

Deleting a run or a workspace, and writing a workspace's caches, are several steps with nothing tying them together. A crash, a failed write, a request at the same time or a new run or workspace taking the old name can leave the wrong data removed or kept. Most open sub-issues of #770 come from this: #769 (delete half), #776, #798, #802, #809, #824.

Wanted

Within the model in docs/concepts.md (Concurrency and failures):

  • One profile lock (a file lock) for every workspace and judgement change, taken by web UIs and commands alike, held briefly, with what it changes re-read under it.
  • A workspace is identified by its UID and folder, not its name; forms carry the identity they showed.
  • Deleting a run or a workspace is one rename into .trash/<kind>/<name>.<token>/ with an intent recording what to clean. Cleanup is resumable and verified; the name stays taken until local cleanup is done.
  • Pending cleanup is shown on Launches and Workspaces and handled by nullius cleanup. Host copies are never removed automatically.

Delivered in three steps (sub-issues). The last ships as one release, since enabling part of the writers reopens the races.

Acceptance

Dependencies and related

#770, #810

Sub-issues

Sub-issues

0 of 3 Issues completed
Loading 3 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions