mirror of
https://github.com/baserow/baserow.git
synced 2026-12-05 00:38:35 +00:00
* 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.