A store that says its connection is finished is retried anyway, for ever #243
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
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#243
Loading…
Add table
Add a link
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?
#216 gave plugins a way to say that the other side has done with a connection —
postulo.plugins.api.ConnectionUnusable— and notifiers honour it:notifications/service.py:36catches it, switches the connection off, shows the reason andforgets the credential that is known not to work. A browser that has withdrawn its
subscription therefore stops being pushed to.
Stores do not.
documents/archiving.py:127catches bareException, so a store raisingConnectionUnusablerecords an ordinary failed attempt whose message happens to beginConnectionUnusable:, and the copy is retried on the usual growing wait. Nothing switchesthe connection off and nothing tells the person, so a Paperless instance that has revoked
its token, or a WebDAV share that no longer exists, goes on being dialled — once per
document, for every document, until somebody notices the failed badges.
This is why postulo-paperless#2 stopped short of raising it: raising it today changes
nothing except the words in the sentence a person reads, so the plugin would have been
promising something the core does not keep.
Proposal
send_copycatchesConnectionUnusablebefore the bareException, and does for a storewhat the notifier does:
connection.retire(reason), the copy marked failed with theplugin's own sentence rather than a class name, and no further attempts.
decide whether they go to declined or stay waiting until the connection is allowed
again, and say which on the document.
plugins/models.py, the sync pass): a calendar thatanswers 401 for ever is the same shape of problem.
ConnectionUnusableretires the connection and stops, besidethe notifier test that already exists.
Found while fixing postulo-paperless#2, 2026-09-16.