Give the webhook pass a time budget, and test the receiver limits #1050
No reviewers
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo!1050
Loading…
Reference in a new issue
No description provided.
Delete branch "365-scheduler-http-limits"
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?
Closes #365
Most of #365 was already fixed by #781 and #321:
postand the browser pushpush. A reply of any size, or one that inflates when decompressed, costs nothing, and no compression is asked for.webhook.TOTAL30 s,webpush.TOTAL_SECONDS20 s). That deadline covers the whole request, not each read, so a receiver sending one byte at a time cannot outlast it.What was left, and what this does:
notifications/webhooks.send_pendinggets a time budget (BUDGET, 60 s). It stops starting deliveries once the budget is spent, and the rest wait for the next pass, exactly asrun_syncs(budget=…)does. A delivery already under way is never cut off. Before this, a batch of 50 slow receivers could hold the pass for up to 50 × 30 s, delaying every account's reminders, copies and syncs. Now this part of the pass is bounded by the budget plus one delivery.tests/test_webhooks.py:Locally:
tests/test_webhooks.py,tests/test_hardening_781.pyandtests/test_syncs.pyall pass.🤖 Generated with Claude Code