Repository navigation
fix(client): give CSV bulk calls a longer default timeout - #406
Merged
Merged
Conversation
CSV bulk endpoints now use DefaultBulkTimeout (600 seconds) until a client sets WithTimeout, instead of sharing the 30-second default meant for regular calls. Part 0 of profile-bulk measured 31.4 MB in 202 seconds, so the shorter default could cut off legitimate bulk downloads. WithTimeout still applies to every endpoint once set, including bulk, and the client tracks whether it was configured to decide between the two defaults. The documentation now notes that CSV bulk calls default to the longer timeout and the larger body cap until those options are set. Add a deadline-recording transport and a test confirming bulk calls get the bulk timeout while others get the standard one, and that WithTimeout overrides both.
Bulk CSV bodies such as `profile-bulk` part 0 (31.4 MB over 202 s) routinely exceeded the single 30 s transport timeout, so whole-market bulk calls failed their deadline before the body finished arriving. **Per-endpoint default timeout:** * Added `DEFAULT_BULK_TIMEOUT` (600 s) alongside `DEFAULT_TIMEOUT` (30 s), and gave `EndpointSpec` a `default_timeout` that `get_csv` sets to the bulk value. * The client timeout is now optional; while unset, each call uses its endpoint's default, and when set it still applies to every endpoint, bulk included. **Timeout plumbing:** * `PreparedRequest` now carries the resolved per-call deadline, which the reqwest executor applies, so `ReqwestExecutor::new` no longer takes a timeout. * The redirect chain threads the resolved timeout through every hop. **Tests and docs:** * Added Rust and Python tests covering the bulk default, the general default, and an explicit timeout overriding both for bulk routes. * Documented the two defaults and the override rule across libfmp and the Python binding.
Record the call deadline rule for CSV bulk descriptors in ADR 0035. The 30 s default timeout caused bulk calls to fail with a transport error mid-body (profile-bulk part 0 measured 31.4 MB in 202 s). Bulk descriptors now default to DEFAULT_BULK_TIMEOUT (600 s) while the client timeout is unset; an explicit client timeout still applies to every endpoint, bulk included. close #404
benbenbang
enabled auto-merge (rebase)
October 2, 2026 04:23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CSV bulk endpoints were sharing the 30-second default timeout meant for regular calls, which cut off legitimate whole-market downloads before the body finished arriving. Profile-bulk part 0, for example, measured 31.4 MB over 202 seconds and failed its deadline mid-body. This change gives bulk calls their own longer default while preserving explicit overrides.
close #404