From a5554298f4ceac2833abe78e904b6cfc8a0259ad Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Thu, 18 Feb 2021 07:00:57 -0500 Subject: internal/queue: remove CreateTask timeout Remove the a timeout on the CreateTask API call. It was causing failures on the production worker. A comment said this was a requirement of the Tasks API, but I couldn't find that in the docs. In any case, if it is, then presumably CreateTask will return an error. Also, add a stack to the returned error, for better error reporting. Change-Id: Id40e596cafade6d673c1787fe446bfdff1a8a62a Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/293609 Trust: Jonathan Amsterdam Run-TryBot: Jonathan Amsterdam TryBot-Result: kokoro Reviewed-by: Jamal Carvalho --- internal/queue/queue.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'internal/queue/queue.go') diff --git a/internal/queue/queue.go b/internal/queue/queue.go index 5890b11d..6cbf019a 100644 --- a/internal/queue/queue.go +++ b/internal/queue/queue.go @@ -115,10 +115,7 @@ func newGCP(cfg *config.Config, client *cloudtasks.Client, queueID string) (_ *G // version. It returns an error if there was an error hashing the task name, or // an error pushing the task to GCP. If the task was a duplicate, it returns (false, nil). func (q *GCP) ScheduleFetch(ctx context.Context, modulePath, version, suffix string, disableProxyFetch bool) (enqueued bool, err error) { - // the new taskqueue API requires a deadline of <= 30s - ctx, cancel := context.WithTimeout(ctx, 30*time.Second) - defer cancel() - defer derrors.Wrap(&err, "queue.ScheduleFetch(%q, %q, %q)", modulePath, version, suffix) + defer derrors.WrapStack(&err, "queue.ScheduleFetch(%q, %q, %q)", modulePath, version, suffix) req := q.newTaskRequest(modulePath, version, suffix, disableProxyFetch) enqueued = true -- cgit v1.3-5-g9baa