NuGet Deploy Failing

I am having a big problem trying to deploy nuget packages. I have a project that has a bunch of nuget packages and every single time I try to deploy them to either myget or nuget the process randomly fails. This is critically important for us. Can you please take a look into this and let us know what is going on?

  1. What errors are you getting?

    -Feodor

  2. Pushing Exceptionless.Log4net 2.0.1253 to the NuGet gallery (https://www.nuget.org)...
    ERROR: Failed to process request. 'An error occurred while updating the entries. See the inner exception for details.'.
    ERROR: The remote server returned an error: (500) Internal Server Error..
    nuget process exited with code 1

  3. Getting a bunch of different errors. It hardly ever succeeds.

  4. It seems to fail every single time going to nuget.org, but succeeds sometimes going to myget. If I redeploy going to myget though it seems to be able to resume, but doing that to nuget blows up saying that the package already exists.

  5. Looks like the problem on nuget.org side?

    -Feodor

  6. I don't think so. It's been an issue for a while for us, but we just haven't reported it until now. I think one thing is that you need to make sure your deploy script keeps going if nuget tells you that one of the packages is already there.

  7. NuGet deployment provider is simply a wrapper calling stock nuget.exe and redirecting output to real-time deployment/build console.

    Those lines prefixed with ERROR: is just nuget.exe output to StdErr. Looking at that specific error above I can recognize Entity Framework exception. As nuget.exe has nothing to do with EF and there is 500 server error the only explanation for that is the error occurred at nuget.org while adding package.

    What other errors like that do you get? I think we should report them to NuGet team.

  8. But I can send the same set of packages to nuget using myget's deploy functionality just fine. But I end up getting an error every time when I try to use your service. Also, again it is very important to be able to try and resume from where the deployment left off since nuget will fail if the package version has already been published. So if I am able to upload 2 packages and then the 3rd fails, I should be able to run the deployment again and have it finish the deployment. It seems like a pretty huge issue not being able to reliably deploy to nuget.

  9. I believe you should be looking for this error and treating it as a success and moving on to the next package.

    Pushing Exceptionless 2.0.1257 to the NuGet gallery (https://www.nuget.org)...
    ERROR: Failed to process request. 'A package with id 'Exceptionless' and version '2.0.1257' already exists and cannot be modified.'.
    ERROR: The remote server returned an error: (409) Conflict..
    nuget process exited with code 1

  10. After giving another thought to the problem I agree that we should do NuGet deployment process more reliable. Obviously, we can't be sure in 100% availability of nuget.org.

    Current implementation based on nuget.exe doesn't allow checking HTTP status codes and it will be changed with direct communication to nuget service.

    Right now I'm thinking about the following workflow:

    - Push package to a feed:
      - if response is 200 - everything was OK, finish
      - if response is 409 (conflict, package exists) - ignore and finish
      - if response is 500 error:
        Push package again:
        - if response is 200 - OK, finish
        - if response is 409 - we assume package was pushed on previous step and 500 error was "transient" - ignore and finish
        - if response is 500 - it's second time we get 500 error - terminate with error.
    

    All other responses like 404 (not found), 401 (unauthorized) terminates deployment immediately.

    Let me know what you think.

  11. That sounds great! I'm looking forward to this so that we can get rid of myget and just use your service to deploy.

  12. Actually, new "native" (without using nuget.exe) provider has been implemented. Take a look at the attached deployment log sample.

    Will deploy it later this week.

  13. Awesome! Looking forward to giving it a try. Will you post it here when it's deployed?

  14. Sure!

  15. Hi Eric,

    In case you missed AppVeyor update notification (which you can subscribe here: https://ci.appveyor.com/profile) - a new NuGet deployment provider was deployed.

  16. Just tried a deployment. I just can't seem to get a complete deployment to be successful. I have a lot of nuget packages, but it should still work. Just got this after it deployed 25 packages.

    Downloading artifact Build/Deploy/packages/Exceptionless.Web.Signed.2.0.1288.symbols.nupkg to temporary location...Cannot download artifact to temp location: NotFound

    Also, the whole deployment process seems to take a long time and it seems to mostly be the process of downloading the artifacts to temp location.

  17. I think it gives NotFound while downloading artifacts to temp location because the whole process takes longer than 10 minutes, but download links expire in 10 minutes. We'll fix that.

    Btw, while testing provider locally I noticed that package publishing to nuget.org takes quite a long time even for small packages (few K), so it's not just AppVeyor commitment to the deployment slowness.

    Maybe as a workaround for now you can setup several environments for publishing artifacts in groups. You can have multiple regexps in "Artifact" field separated by ";"

    -Feodor

  18. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:55 AM.

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

Recent Discussions