Connections: a failing webhook shows as working again after the next event is queued #574
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#574
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 where a webhook connection'slast_errorandlast_ok_atare written, and confirmed with a probe on the snapshot.Checked again on 2026-10-01 against
mainat0a5cad587: still present.The webhook notifier's
sendonly queues a row, butnotifytreats anysendthat returns as a delivery and marks the connection as working. The real outcome is written later by the delivery pass, and the next queued event wipes it. So a receiver that answers 404, or has been down all day, shows on Connections as working whenever anything has happened since.notifications/service.py:71-92,_deliver:connection.record_test(True)at line 91 runs afterplugin.send(...)returns;plugins/webhook/__init__.py:193-197,WebhookNotifier.send, only callswebhooks.enqueue_for;notifications/webhooks.py:134-152,deliver, records the real answer withrecord_test. Separately,notifications/webhooks.py:128-129gives a row up onDestinationRefusedwithout writing anything on the connection.record_test(True)clearslast_errorand setslast_ok_atto now. In the probe,last_errorwas "The receiver answered 404." after the pass and''after one morenotify. A receiver whose address now resolves to a private network is given up on at every delivery and the connection never says so at all.delivers_later = TrueonWebhookNotifier, and have_delivercount it but skiprecord_test(True)for it, leaving the delivery pass as the only writer of the outcome. Indeliver, callconnection.record_test(False, str(refused))before giving up on a refused destination.Done when
tests/test_webhooks.pydelivers a row that gets a 404, then callsnotifyagain, and expects the connection'slast_errorto still name the 404.