Repository navigation
Release v1.1.20 - #99
Conversation
[Medium impact] The new workflow APIs reach Python callers who author and run Roe workflows. The PR should not merge until waiting workflow runs have enough response time and cannot be replayed after an uncertain failure.
|
| resp = request_json( | ||
| self._raw, | ||
| workflows_runs_create, | ||
| workflow_id, | ||
| body=body, | ||
| organization_id=self._org_id, | ||
| ) |
There was a problem hiding this comment.
run(wait=True) lets the server wait for 60 seconds but keeps the client's default timeout at exactly 60 seconds. A run that reaches the full wait window can time out before its response arrives. RoeRetryTransport then retries the same POST up to three times, after the server may already have started the run.
Give this call enough time to receive the response and prevent an uncertain run request from being replayed without protection against duplicate runs.
Knowledge Base Used: Request transport and pagination
| def list( | ||
| self, | ||
| page: int | None = None, | ||
| page_size: int | None = None, | ||
| search: str | None = None, | ||
| ) -> PaginatedWorkflowList: |
There was a problem hiding this comment.
WorkflowsAPI.list() omits the documented agent_id filter. The API describes this filter as the way to find a workflow from its deprecated agent ID, but client.workflows.list(agent_id=...) raises TypeError. Callers must use the raw endpoint for this lookup.
Add the optional filter to openapi/wrappers.yml and regenerate the facade.
0fa82ae to
7c72661
Compare
| response_400_type_0 = WorkflowsCreateResponse400Type0.from_dict(data) | ||
|
|
||
|
|
||
|
|
||
| return response_400_type_0 |
There was a problem hiding this comment.
The parser accepts every error dictionary as WorkflowsCreateResponse400Type0, so definition errors containing detail and errors never reach WorkflowsCreateResponse400Type1. Raw endpoint callers get the wrong model, and code that reads .detail or .errors fails. The version-create and partial-update parsers have the same problem.
Try the structured error before the general field-error map, and preserve that order through generation.
RoeRetryTransport retried every httpx.TransportError for every method. A read timeout, a dropped connection, or a protocol error can happen after the server has received the request, so a POST was replayed up to max_retries times. With workflows.run(wait=True), the server holds the request for 60 seconds and the client times out at 60, so a long run reached a local test server four times: one call would start four runs. POST and PATCH now retry only ConnectError, ConnectTimeout and PoolTimeout, which are raised before any bytes are sent. Idempotent methods and the status-code retries are unchanged. This matches the other SDKs: the TypeScript retry middleware only retries on response status codes, and Go does not retry a request that hit its deadline. The module docstring's claim of alignment is corrected. The fix lives in src/roe/utils, outside the paths the roe-main fan-out regenerates, so later release PRs keep it. The test file is force-added like the rest of tests/, which .gitignore lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This PR updates the Python SDK for release
1.1.20.Generated from:
1-1-35f5f02b5949e4136ba6da76b68f632d65095a171