Server settings → Plugins: uploading, cancelling or confirming a package deletes every other session's waiting package #485
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#485
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, reading the plugin upload and confirmation flow.Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atcore/server_views.py:1331-1335(_upload),core/server_views.py:1363-1367(_cancel),core/server_views.py:1392-1394(thefinallyof_confirm) andcore/server_views.py:927-933(_pending_dir()).An uploaded wheel waits in one scratch directory shared by the whole instance,
plugins_dir()/.pending, under a name made from a token kept in the uploader's session. Uploading, cancelling and confirming each remove that whole directory rather than the session's own file, so one administrator's action throws away the package another administrator is still reviewing.core/server_views.py:1330-1334,PluginActionView._upload, which runsshutil.rmtree(scratch, ignore_errors=True)before writingscratch / f"{token}.whl";core/server_views.py:1362-1366,_cancel, andcore/server_views.py:1391-1393, thefinallyof_confirm, both of which runshutil.rmtree(_pending_dir(), ignore_errors=True). The directory is defined by_pending_dir()atcore/server_views.py:926-932._canceland_confirm,(_pending_dir() / f"{token}.whl").unlink(missing_ok=True)for the session's token; in_upload, remove the session's previous pending file, if any, instead of the directory. Keep a sweep for abandoned files, but by age (for example anything older than a day) rather than by wiping the directory.Done when
tests/test_server_settings.pyor the file that holds them) uploads a package as one administrator, uploads and cancels another as a second administrator in a separate client, and then confirms the first one successfully. It fails today.