Skip to content

Retry restore - #5187

Merged
KevinRansom merged 3 commits into
dotnet:masterfrom
KevinRansom:retryrestore
Jun 14, 2018
Merged

KevinRansom merged 3 commits into
dotnet:masterfrom
KevinRansom:retryrestore

Conversation

@KevinRansom

Copy link
Copy Markdown
Contributor

Retry the restore

@forki

forki commented Jun 13, 2018

Copy link
Copy Markdown
Contributor

Cool

Comment thread fcs/build.fsx Outdated
info.WorkingDirectory <- FullName @"./.."
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
|> assertExitCodeZero
let executeProcess () =

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.

I think you should add a parameter "trials" and only retry 5 times

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 intended it to only retry 1 time. I figured that would be sufficient to eliminate the annoyance. And ... how is your vacation?

@forki

forki commented Jun 13, 2018 via email

Copy link
Copy Markdown
Contributor

@matthid

matthid commented Jun 13, 2018

Copy link
Copy Markdown
Contributor

@forki You mean retry until the stack overflows? ;)

@forki

forki commented Jun 13, 2018

Copy link
Copy Markdown
Contributor

Dude!

@KevinRansom

Copy link
Copy Markdown
Contributor Author

@forki, you guys are too funny :-)

@forki

forki commented Jun 13, 2018

Copy link
Copy Markdown
Contributor

fsprojects/Paket#3251
This is what @matthid is referring to. A bug in paket's retry logic that let stack overflow at -84 trials. Reported yesterday - fixed by same (C#) person today.

@KevinRansom

Copy link
Copy Markdown
Contributor Author

Let's see how this goes, if the failure still happens an annoying amount, we can retry multiple times, and perhaps try a delay and stuff.

@KevinRansom

Copy link
Copy Markdown
Contributor Author

@forki,that is too funny. Software is hard ....

@dsyme

dsyme commented Jun 13, 2018

Copy link
Copy Markdown
Contributor

I agree that retrying 5 times would be good, may as well do it now rather than later

Comment thread fcs/build.fsx Outdated
info.FileName <- FullName @"./../.nuget/NuGet.exe"
info.WorkingDirectory <- FullName @"./.."
info.Arguments <- sprintf "restore %s -PackagesDirectory \"%s\" -ConfigFile \"%s\"" (FullName p) (FullName "./../packages") (FullName "./../NuGet.Config")) TimeSpan.MaxValue
if result <> 0 && count > 1 then executeProcess (count - 1) else 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should read ... else result so that if the 5 tries are exhausted the last error code is returned.

@KevinRansom

Copy link
Copy Markdown
Contributor Author

@brettfo Oh yeah ….

@KevinRansom
KevinRansom merged commit 70dee19 into dotnet:master Jun 14, 2018
@KevinRansom
KevinRansom deleted the retryrestore branch June 14, 2018 04:04
@forki

forki commented Jun 14, 2018 via email

Copy link
Copy Markdown
Contributor

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.

5 participants