Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cancellation token and increase timeout for docker inspect fetchi… #502

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

smitpatel
Copy link
Contributor

@smitpatel smitpatel commented Oct 25, 2023

…ng env vars

Didn't add actual retry as other docker commands don't retry either right now.

Resolves #491

Also addresses PR feedback #429

Copy link
Member

@tlmii tlmii left a comment

Choose a reason for hiding this comment

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

👍 for the cancellationToken. A 30 second time out just seems awful but if that's what it takes to get the results from that call, then that's what it takes...

@@ -367,7 +367,7 @@ private async Task ComputeEnvironmentVariablesFromDocker(Container container)

(task, processDisposable) = ProcessUtil.Run(spec);

var exitCode = (await task.WaitAsync(TimeSpan.FromSeconds(5)).ConfigureAwait(false)).ExitCode;
var exitCode = (await task.WaitAsync(TimeSpan.FromSeconds(30), cancellationToken).ConfigureAwait(false)).ExitCode;
Copy link
Member

Choose a reason for hiding this comment

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

Docker really forcing us to true "eventual" consistency it looks like. That's unfortunate we'd need a timeout that long. But its not blocking so seems ok.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think my discussion with @karolz-ms it was indicated that docker can take long time. We wait for 10s to verify if docker is running in our startup. Since that is exception code path and this is not, I went with large amount. If we timeout here, we won't retry till cache is invalidated so just being overly generous. Non-blocking nature should help us avoid any impact of this.

@smitpatel smitpatel merged commit ce10001 into main Oct 25, 2023
4 checks passed
@smitpatel smitpatel deleted the smit/prfeedback branch October 25, 2023 20:33
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

docker inspect for container env vars should retry
2 participants