* fix: stop a trickled response body from outliving its deadline iter_content blocks inside urllib3 until a whole chunk arrives, so the deadline check never ran against a server sending a byte at a time. * feat: send an HTTP request under one deadline across redirects Requests gives every hop a fresh timeout and reads redirect bodies unbounded, so a redirecting endpoint could outlive the button's row lock. * fix: hang up an HTTP request whose headers outlast its deadline The per-hop timeout only bounds a single socket read, so a server trickling out a status line or headers could hold the connection open long past the deadline. * fix: hang up a connection that opens after the HTTP deadline The watchdog only shut down sockets already open when it fired, so a connection still resolving DNS or finishing a TLS handshake at that moment kept trickling headers past the deadline. * fix: bound the HTTP request action by one deadline Its lock budget now covers the worst case that deadline allows. * fix: send a button's external action outside a database transaction On a click the dispatch savepoint was the only transaction, held open for the whole network wait. * test: add a barrier stub e2e tests can hold requests on * test: hold the button concurrency e2e requests on a barrier They now wait until the backend's request has arrived instead of relying on a slow endpoint, and F2 proves both locks were held at once. * fix: report a TLS error while reading a response body as one * docs: say what the dispatch savepoint and the HTTP watchdog cover * test: pin the barrier stub image by digest * test: run the held-request e2e tests one after the other * fix: keep a redirect's body when it is the final response The redirect hook already read it, and reading again overwrote it with nothing. * fix: report a cut-off compressed body as a timeout A body read until close could not be hung up on, and a cut-off one surfaced as a decode error. * refactor: run HTTP deadlines on one watchdog thread A thread and eight classes per request, and a response held in a reference cycle, cost more than one shared watchdog. * fix: send the Slack action under the request deadline Its per-socket timeout let a slow endpoint hold the click past the row lock. * test: give the HTTP deadline tests room on a busy runner One second of margin was too little under -n auto; a regression still takes ten. * refactor: let the dispatch context choose to send outside the savepoint Sending outside the savepoint was inferred from in_atomic_block, which pytest-django's db fixture always reports True for, so only the transaction=True tests ever covered production behaviour. The dispatch context now says explicitly whether its caller sends outside a transaction of its own. * refactor: derive a database action's is_external from its service The action's own flag could drift from the service type it dispatches through, so it now reads that service type's flag instead of keeping a second copy. * refactor: remove the unused HTTP request function getter The HTTP and Slack services now send through send_http_request, so nothing calls get_http_request_function any more. * test: give each held-request e2e run its own barrier keys The chrome and firefox projects both run this file by default and were sharing the fixed "slow"/"slow-two" barrier keys and its reset, so a parallel run of one project could release or wipe the other's hold. * fix: keep the HTTP deadline watchdog running when a hang-up fails An unguarded hang_up() killing the one watchdog thread would silently stop deadline enforcement for the whole process. * docs: correct the dispatch flag and test comments The old wording pointed at the wrong transaction and repeated or narrated stale reasoning that no longer matches the code. * fix: keep a failed hang-up from logging the request's address Loguru prints frame locals beside a traceback, and a watched socket's repr names its peer. * test: stop the failing hang-up test racing its own deadline A send slower than its 0.3 s deadline on a busy runner timed out before the failing hang-up was in place. * fix: give every connect attempt only the time left to the deadline urllib3 and advocate try each resolved address with the timeout the hop started with, so four addresses that never answer took four timeouts. * test: start the barrier keys over before each held-request test A released key stays released, so the second test in a worker was answered at once and never held its lock. * fix: watch a proxied request's connections under its deadline Requests keeps a pool manager per proxy apart from the adapter's own, so its sockets were never watched and a trickling proxy held a request past its deadline. * docs: say what sending outside the savepoint relies on * fix: keep two HTTP timeouts outside a click and drop the audit hook Builder and automation keep the budget they had until #6117 settles theirs. send_http_request now reads the body itself, and connect attempts are bounded in the connect loops, so no process-wide audit hook is needed.
GitHub Workflows
Database Team PR Automation
File: database-projects-pr-workflow.yml
This workflow automatically updates the Database Team's GitHub Project board based on PR events.
How it works
The workflow triggers on PR events (opened, review requested, review submitted, merged, etc.) and automatically:
- Checks domain labels - Only processes PRs with labels starting with
database 🗄 - Adds PR to project - Ensures the PR is added to the Database Team project board
- Updates Status field - Sets the PR status based on its state:
In Progress- PR is a draftIn Review- PR is ready for reviewDone- PR has been merged
- Updates Review Status field - Sets the review status based on review state:
Awaiting- Set when:- PR switches from draft to ready for review
- There are pending review requests
- A reviewer who requested changes has been re-requested for review
- No reviewers have been requested yet and no approvals exist
Feedback- Changes have been requested by a reviewerMerge- No pending review requests and at least one approval exists
- Updates linked issues - Also updates the Status field (not Review Status) of any issues linked to the PR. This assumes a 1:1 relation between PRs and issues.
State transitions
Draft PR opened/converted to draft
→ Status: In Progress
→ Review Status: (cleared)
PR ready for review / review requested
→ Status: In Review
→ Review Status: Awaiting
Changes requested
→ Status: In Review
→ Review Status: Feedback
Changes requested reviewer re-requested for review
→ Status: In Review
→ Review Status: Awaiting
PR approved
→ Status: In Review
→ Review Status: Merge
PR merged
→ Status: Done
→ Review Status: (cleared)
Configuration
The workflow uses these environment variables (defined at the top of the file):
| Variable | Description |
|---|---|
PROJECT_NUMBER |
The GitHub Project number (currently 3) |
DOMAIN_LABELS |
Labels that trigger the workflow (domain::database, domain::core) |
STATUS_FIELD_NAME |
Name of the Status field in the project |
REVIEW_STATUS_FIELD_NAME |
Name of the Review Status field in the project |
Requirements
- A GitHub token with project write permissions stored as
DATABASE_PROJECT_WORKFLOW_TOKENsecret - The project must have
StatusandReview Statussingle-select fields with the expected options
Manual trigger
You can manually trigger the workflow for a specific PR using the "Run workflow" button in the Actions tab, providing the PR number.
Database Team Issue Automation
File: database-projects-issues-workflow.yml
This workflow automatically adds new issues to the Database Team's GitHub Project board.
How it works
The workflow triggers when an issue is opened or labeled, and:
- Checks domain labels - Only processes issues with labels starting with
domain::databaseordomain::core - Checks if already in project - Skips if the issue is already on the project board
- Adds issue to project - Adds the issue to the Database Team project board
- Sets Status to Todo - Sets the initial status to
Todo
Configuration
| Variable | Description |
|---|---|
PROJECT_NUMBER |
The GitHub Project number (currently 3) |
DOMAIN_LABELS |
Labels that trigger the workflow (domain::database, domain::core) |
STATUS_FIELD_NAME |
Name of the Status field in the project |
STATUS_TODO |
The initial status value for new issues (Todo) |
Requirements
- A GitHub token with project write permissions stored as
DATABASE_PROJECT_WORKFLOW_TOKENsecret - The project must have a
Statussingle-select field with aTodooption
Manual trigger
You can manually trigger the workflow for a specific issue using the "Run workflow" button in the Actions tab, providing the issue number.