Skip to content

Comments

fix(python): add timeout parameter to FleetApi.start()#548

Closed
haosenwang1018 wants to merge 1 commit intogithub:mainfrom
haosenwang1018:fix/fleet-start-timeout
Closed

fix(python): add timeout parameter to FleetApi.start()#548
haosenwang1018 wants to merge 1 commit intogithub:mainfrom
haosenwang1018:fix/fleet-start-timeout

Conversation

@haosenwang1018
Copy link

Problem

FleetApi.start() inherits the default 30s timeout from JsonRpcClient.request(), but session.fleet.start is a blocking RPC that only responds once the fleet completes. Any workload taking more than 30s raises asyncio.TimeoutError (#539).

Fix

Add an explicit timeout keyword parameter to FleetApi.start() (default: 600s) and pass it through to self._client.request().

# Before
await session.rpc.fleet.start(params)  # always 30s timeout

# After
await session.rpc.fleet.start(params)  # 600s default
await session.rpc.fleet.start(params, timeout=1800)  # custom

Fixes #539

fleet.start is a long-running blocking RPC that only responds once the
fleet completes and the session goes idle. It inherits the default 30s
timeout from JsonRpcClient.request(), making it unusable for any
non-trivial workload (github#539).

Add an explicit timeout parameter (default 600s) and pass it through
to the underlying request() call.

Fixes github#539
@haosenwang1018 haosenwang1018 requested a review from a team as a code owner February 23, 2026 20:25
@Rasaboun
Copy link

It’s a good solution, but there is another problem fleet.start returns started = True after the fleet completes its tasks, not when the fleet is just deployed

@SteveSandersonMS
Copy link
Contributor

Thanks for the proposal here but this is generated code. We can't edit it directly. Changes will be lost. Instead, any changes need to be either in some wrapper API or in the underlying runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"FleetApi.start()" uses default 30s timeout but "fleet.start" RPC blocks until fleet completes

3 participants