Skip to content

add retry for task zip download. - #1926

Merged
Tingluo Huang (TingluoHuang) merged 1 commit into
masterfrom
users/tihuang/taskretry
Nov 26, 2018
Merged

Tingluo Huang (TingluoHuang) merged 1 commit into
masterfrom
users/tihuang/taskretry

Conversation

@TingluoHuang

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/Agent.Worker/TaskManager.cs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/Agent.Worker/TaskManager.cs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i added RetryNetworkException and RetryStreamException L0s to make sure try works.

Comment thread src/Agent.Worker/TaskManager.cs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that ENV is mainly for L0 tests, since i don't want verify retries in L0 has to back off.

@TingluoHuang
Tingluo Huang (TingluoHuang) force-pushed the users/tihuang/taskretry branch 4 times, most recently from 50d8843 to 3a798c3 Compare November 10, 2018 02:42
Comment thread src/Agent.Worker/TaskManager.cs Outdated
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;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check Kusto

Comment thread src/Agent.Worker/TaskManager.cs Outdated
if (taskDownloadTimeout.Token.IsCancellationRequested)
{
// task download didn't finish within timeout
executionContext.Warning(StringUtil.Loc("TaskDownloadTimeout", task.Name, timeoutSeconds.ToString()));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need toString()

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.

2 participants