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

Builds failing due to restore failure of recently published packages #2327

Closed
vatsan-madhavan opened this issue Mar 24, 2019 · 4 comments
Closed

Comments

@vatsan-madhavan
Copy link
Member

I'm seeing builds fail (eg) due to NuGet/Home#3116.

Does the Arcade tools or the Sdk have configuration option to specify --no-cache during restore?
Could this be made the default until this bug is fixed by Nuget?

@vatsan-madhavan
Copy link
Member Author

vatsan-madhavan commented Mar 24, 2019

Just realized that I could do something like this in eng\configure-toolset.ps1:

# Make sure that Nuget restore doesn't hit the cache when running CI builds
# See https://github.com/NuGet/Home/issues/3116
if ($ci) {
    if (($properties -eq $null) -or (-not ($properties -icontains '/p:RestoreNoCache=true'))) {
        $properties = @('/p:RestoreNoCache=true') + $properties
    }
}

Even with this, the results are hit-and-miss.

Given this bug is likely to affect all repos at one time or another, perhaps something like this should be the default anyway?

@tmat
Copy link
Member

tmat commented Mar 24, 2019

It'd be simpler to set RestoreNoCache in Directory.Build.props.

Even with this, the results are hit-and-miss.

If restore fails even with this property set then how does it help setting it?

@vatsan-madhavan
Copy link
Member Author

We set it in dotnet-trusted a while back and it helped, and @rrelyea suggests that it is the workaround to the above problem. Perhaps it offers an improvement even if only an imperfect one.

If you can think of a more reliable solution, I’d be happy to adopt it.

@tmat
Copy link
Member

tmat commented Mar 25, 2019

If it helps then feel free to send a PR adding

<RestoreNoCache Condition="'$(ContinuousIntegrationBuild)' == 'true'">true</RestoreNoCache> to

https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Arcade.Sdk/tools/DefaultVersions.props#L28

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

No branches or pull requests

2 participants