Repository navigation
add retry for task zip download. - #1926
Conversation
There was a problem hiding this comment.
This is fine for now but it makes me wonder if this can't be generalized into a common code. A&O had a retry manager ... Something to think about if we want to add more outer retries in the code.
There was a problem hiding this comment.
How can we L0 test the retry and backoff logic to ensure there's not a bug? Ideally, we could mock the work and the backoff. Might be related to point on retry manager.
There was a problem hiding this comment.
i added RetryNetworkException and RetryStreamException L0s to make sure try works.
There was a problem hiding this comment.
It makes sense to have timeout envvar override above, but do we need a no backoff override? I would think the only risk is a task timing out for some unforseen issue and needing the one above - this seems like unnecessary overrides to manage.
There was a problem hiding this comment.
that ENV is mainly for L0 tests, since i don't want verify retries in L0 has to back off.
50d8843 to
3a798c3
Compare
| if (!int.TryParse(Environment.GetEnvironmentVariable("VSTS_TASK_DOWNLOAD_TIMEOUT") ?? string.Empty, out int timeoutSeconds)) | ||
| { | ||
| using (Stream result = await taskServer.GetTaskContentZipAsync(task.Id, version, executionContext.CancellationToken)) | ||
| timeoutSeconds = 10 * 60; |
There was a problem hiding this comment.
check Kusto
| if (taskDownloadTimeout.Token.IsCancellationRequested) | ||
| { | ||
| // task download didn't finish within timeout | ||
| executionContext.Warning(StringUtil.Loc("TaskDownloadTimeout", task.Name, timeoutSeconds.ToString())); |
There was a problem hiding this comment.
no need toString()
3a798c3 to
6359598
Compare
No description provided.