feat: enable custom timeout in get_httpx_client_kwargs - #1841
Open
hamarg wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a configurable request timeout to the shared httpx client configuration helper and exposes that timeout through the Orchestrator Attachments upload APIs, so callers can tune upload behavior for larger payloads or slower networks.
Changes:
- Add a
timeoutparameter toget_httpx_client_kwargs()and use it when building client kwargs. - Add a
timeoutparameter toAttachmentsService.upload()/upload_async()and thread it into the anonymous blob uploadhttpxclients. - Switch the async upload path to use
httpx.AsyncClientfor the non-authenticated blob upload branch.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/uipath-platform/src/uipath/platform/orchestrator/_attachments_service.py | Adds timeout to attachment upload APIs and passes it into the httpx client used for blob uploads. |
| packages/uipath-platform/src/uipath/platform/common/_http_config.py | Adds a configurable timeout argument to the shared httpx client kwargs helper. |
Suppressed comments (1)
packages/uipath-platform/src/uipath/platform/orchestrator/_attachments_service.py:710
timeoutisn’t applied to the authenticated blob upload path (RequiresAuth == True) in the async implementation either:request_async(...)is called withouttimeout, sotimeout=only affects the anonymous upload (httpx.AsyncClient(...)) branch.
await self.request_async(
"PUT", upload_uri, headers=headers, content=file_content
)
else:
async with httpx.AsyncClient(
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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.



Development Packages
uipath
uipath-platform