diff options
| author | Jonathan Amsterdam <jba@google.com> | 2021-02-18 07:00:57 -0500 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2021-02-18 15:40:47 +0000 |
| commit | a5554298f4ceac2833abe78e904b6cfc8a0259ad (patch) | |
| tree | d096788e7386c961d6fd936bdba1def4d02e5b44 /internal/queue/queue.go | |
| parent | a878260801285ae67025d4805d65d4f6e79298f6 (diff) | |
| download | go-x-pkgsite-a5554298f4ceac2833abe78e904b6cfc8a0259ad.tar.xz | |
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 <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Diffstat (limited to 'internal/queue/queue.go')
| -rw-r--r-- | internal/queue/queue.go | 5 |
1 files changed, 1 insertions, 4 deletions
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 |
