Skip to content

Commit 6946e54

Browse files
committed
Give fetching a longer timeout in the HO client
Other long operations like create also have longer timeouts, most of the time it takes to create a device is spent fetching its artifacts. Bug: b/460559803
1 parent c8edcaf commit 6946e54

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/libhoclient/host_orchestrator_client.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,11 @@ func (c *HostOrchestratorClientImpl) FetchArtifacts(req *hoapi.FetchArtifactsReq
400400
}
401401

402402
res := &hoapi.FetchArtifactsResponse{}
403-
if err := c.waitForOperation(op.Name, &res); err != nil {
403+
if err := c.waitForOperationOpts(op.Name, &res, RetryOptions{
404+
StatusCodes: []int{http.StatusServiceUnavailable, http.StatusGatewayTimeout},
405+
RetryDelay: 30 * time.Second,
406+
MaxWait: 10 * time.Minute,
407+
}); err != nil {
404408
return nil, err
405409
}
406410
return res, nil

0 commit comments

Comments
 (0)