Export archives: without the optional scheduler none is ever deleted, though the page promises it #539
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#539
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, following the export archive from the button to whatever deletes it.Related to #247.
Checked again on 2026-10-01 against
mainat0a5cad587: still present. The code is now atnotifications/management/commands/send_due_reminders.py:202(the call toreap_archives()) and:205(pages.expire_unconfirmed()); the other locations have not moved.Every export now leaves a file: with or without a worker,
build_an_exportstores the zip as anExportArchive. Onlyreap_archives()deletes those, and only the scheduler calls it. The scheduler is optional and described as needed only for notifications, so an instance run the way the first install command runs it keeps every archive forever, while the export page tells the person it is deleted after a day.core/slow.py:35-67(build_an_export, which every export takes:core/views_export.py:55sends the errand, and with no worker it runs in the request) andcore/slow.py:70-83(reap_archives). Its only caller isnotifications/management/commands/send_due_reminders.py:200. The promise:templates/core/export.html:64-67("A built archive is kept for {{ hours }} hours and then deleted") andBackups-and-your-data.md:17-19("It is deleted a day later"). The scheduler behind a profile:docker/compose.yml:41-46, whose comment says it is "Only needed once somebody has set up a notification connection". The bare-metal steps say "There is no background worker to run" (Installing-Postulo.md:236).docker compose -f docker/compose.yml up -d(Installing-Postulo.md:9) and no notification connection, each Export my data writes a full copy of the account (every record and every document) undermedia/exports/<pk>/. After 24 hoursexport_archiverefuses to hand it over as expired, but the file stays on the disk and in every backup, one per export, for good.POSTULO_CAPTURE_PAGE_KEEP_DAYShas the same dependency:pages.expire_unconfirmed()(send_due_reminders.py:203) runs on the same pass.Configuration.md:433mentions that "the scheduler does the deleting", and nothing on the pages a person or an operator reads first says the scheduler is needed for it.export_overviewandexport_downloadand at most once an hour from a request, as well as on the scheduler's pass. Change the compose comment to say the scheduler also expires archives and captured pages, and add it to the bare-metal steps (the wording ofInstalling-Postulo.md:236is reported separately, with the rest of those steps).Done when
tests/test_export.pybuilds an archive, moves the clock pastPOSTULO_EXPORT_KEEP_HOURS, requests the export page without running the scheduler, and finds the file and the row gone; it fails today.