feat: make bootstrapper initialiser timeouts configurable (#874)#999
Merged
cybermaggedon merged 2 commits intoJun 30, 2026
Conversation
DefaultFlowStart and WorkspaceInit hardcoded the request timeouts for their flow-svc and IAM calls, leaving operators no way to tune them for high-latency environments (trustgraph-ai#874). Expose them as constructor parameters threaded through the existing initialiser `params:` mechanism, defaulting to the current values so behaviour is unchanged unless explicitly overridden: - DefaultFlowStart: list_timeout=10 (list-flows), start_timeout=30 (start-flow) - WorkspaceInit: iam_timeout=10 (create-workspace) Add unit tests for the defaults, override storage, and that configured values reach the underlying request calls.
Contributor License Agreement ✅All contributors have signed the CLA. Thank you! |
Contributor
Author
|
I have read the CLA Document and I hereby sign the CLA |
cybermaggedon
requested changes
Jun 29, 2026
cybermaggedon
left a comment
Contributor
There was a problem hiding this comment.
Thanks! Nicely scoped change, extra tests are appreciated!
corvus-0x
added a commit
to corvus-0x/trustgraph
that referenced
this pull request
Jun 29, 2026
Addresses review feedback on PR trustgraph-ai#999: add the explicit @pytest.mark.asyncio decorator to test_run_forwards_configured_timeouts so it does not rely on asyncio_mode=auto and stays consistent with the rest of the suite. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses review feedback on PR trustgraph-ai#999: add the explicit @pytest.mark.asyncio decorator to test_run_forwards_configured_timeouts so it does not rely on asyncio_mode=auto and stays consistent with the rest of the suite.
50fe637 to
f4cdab3
Compare
cybermaggedon
approved these changes
Jun 30, 2026
Contributor
|
Thanks for the quick update, much apprecated! |
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.
Summary
Addresses part of #874. The bootstrapper initialisers hardcoded the request timeouts for their flow-svc and IAM calls, so operators had no way to tune them for high-latency environments (e.g. cross-region Cassandra, overloaded message bus).
Per the issue's guidance ("pick one area to start with"), this PR covers the bootstrapper area only. The remaining areas (config client, librarian RAG fetch, gateway) are intentionally left for follow-up PRs to keep this change focused and easy to review.
Changes
Each timeout is now a constructor parameter, threaded through the existing initialiser
params:mechanism (bootstrapper/service.pyinstantiates each initialiser viacls(**entry.get("params", {}))). Defaults preserve the current values exactly, so behaviour is unchanged unless an operator explicitly overrides them.DefaultFlowStart—list_timeout(default 10, forlist-flows) andstart_timeout(default 30, forstart-flow). Kept as two separate params so each call's current value is preserved rather than collapsing both to a single timeout.WorkspaceInit—iam_timeout(default 10, for the IAMcreate-workspacerequest).Example operator override in an initialisers file:
Tests
Adds
tests/unit/test_bootstrap/with unit tests covering:request(..., timeout=...)calls (behavioural test forDefaultFlowStart, which guards the wiring against future regressions).Notes
descriptionare likewise unvalidated). Happy to add bounds-checking if preferred.