Nuget install unreliability

william's Avatar

william

07 Aug, 2015 06:09 AM

Each of our commits runs a matrix of 10 sub-builds and every 2nd or 3rd commit is showing as failing because just one of the sub-builds will randomly fail with the following error:

nuget install pcre -Verbosity detailed -Version 8.33.0.1 -OutputDirectory C:\pcre
GET https://www.nuget.org/api/v2/Packages(Id='pcre',Version='8.33.0.1')
System.InvalidOperationException: Unable to find version '8.33.0.1' of package 'pcre'.
   at NuGet.PackageRepositoryHelper.ResolvePackage(IPackageRepository sourceRepository, IPackageRepository localRepository, IPackageConstraintProvider constraintProvider, String packageId, SemanticVersion version, Boolean allowPrereleaseVersions)
   at NuGet.PackageManager.InstallPackage(String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
   at NuGet.Commands.InstallCommand.InstallPackage(IFileSystem fileSystem, String packageId, SemanticVersion version)
   at NuGet.Commands.InstallCommand.ExecuteCommand()
   at NuGet.Commands.Command.Execute()
   at NuGet.Program.Main(String[] args)
Command exited with code 1

Clearly it works most of the time but this kind of unreliability means that about half of our commits are showing as failing which is useless for a CI system. Is this a known issue or is there any workaround? Is it down to network instability?

Also is it possible to add in a feature to build just one of the sub-builds in the matrix instead of all of them? That way we can re-build just the one failed build and leave the other nine as is.

  1. Support Staff 1 Posted by Feodor Fitsner on 07 Aug, 2015 06:18 AM

    Feodor Fitsner's Avatar

    This is not a networking issue - we've been seeing these errors from our two data centers and Azure.

    This is a known issue on nuget.org side (index propagation): http://help.appveyor.com/discussions/problems/2730-cant-build-aspne...

    There is a solution (workaround) though that works: http://www.appveyor.com/docs/nuget#restore-with-retries

  2. 2 Posted by william on 13 Aug, 2015 06:40 PM

    william's Avatar

    I am using a 'nuget install' rather than 'nuget update', so I've copied the nuget-restore.cmd script and tweaked resulting in https://github.com/swig/swig/blob/master/Tools/nuget-install.cmd. In hindsight, it may have been better to put in a script that will take any nuget command and perhaps that would be a better more general solution for your docs. Anyway, many thanks Feodor. I havn't seen it needing to do the retry since putting it in though! Typical, the random failures have gone away!

  3. william closed this discussion on 13 Aug, 2015 06:40 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac