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

NuGet restore failed if one source is down even all packages are in cache #6145

Closed
zhili1208 opened this issue Nov 6, 2017 · 9 comments
Closed
Assignees
Labels
Functionality:Restore Priority:2 Issues for the current backlog. Resolution:NotRepro We are not able to reproduce this problem. Better steps would be helpful.
Milestone

Comments

@zhili1208
Copy link
Contributor

the scenario is:

one enabled source is down and all package which need to be restored are in cache.

NuGet restore still fail due to one source is down.

@zhili1208 zhili1208 added 0 - Backlog Functionality:Restore Priority:1 High priority issues that must be resolved in the current sprint. labels Nov 6, 2017
@anangaur
Copy link
Member

anangaur commented Nov 6, 2017

Historical issues with sources: #4949

@emgarten
Copy link
Member

If all packages are in the global packages folder and there are zero misses, and zero floating versions then NuGet will not attempt to go online. We should have nuget.exe tests that verify there are zero network calls.

If NuGet does need to resolve a package then it will check the sources, and in that case is needs to contact all sources to get a coherent result.

So I'm unsure that this is a real issue unless this refers only to the http cache.

@emgarten
Copy link
Member

emgarten commented Nov 29, 2017

Steps

  1. Open NuGet solution
  2. Restore
  3. Disconnect network
  4. Restore (should pass)

Try also using -Force or removing the obj folders to ensure it still does not go online.

@emgarten emgarten added this to the Backlog milestone Nov 29, 2017
@emgarten
Copy link
Member

We could improve this overall by ignoring source failures until we are sure the package doesn't exist.

@anangaur
Copy link
Member

@emgarten, we should do the same for floating versions. May be issue warnings in this case?

@emgarten
Copy link
Member

I'm not sure that it is safe to ignore failed sources when floating, but it could work as a warning with the option to make it an error.

@anangaur
Copy link
Member

Yep. In addition, we could put the ignore failing sources under an option. Like we do for NuGet command line.

@emgarten emgarten added Priority:2 Issues for the current backlog. and removed Priority:1 High priority issues that must be resolved in the current sprint. labels Nov 30, 2017
@jainaashish
Copy link

I just checked it If all packages are in the global packages folder and there are zero misses, and zero floating versions then NuGet doesn't tries to go to online. It works fine.

About ignoring failed sources, then we already have a separate workitem for that - #5643

@jainaashish jainaashish added Resolution:NotRepro We are not able to reproduce this problem. Better steps would be helpful. and removed 0 - Backlog Triage:Investigate labels Dec 13, 2017
@jainaashish jainaashish modified the milestones: Backlog, 4.6 Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Restore Priority:2 Issues for the current backlog. Resolution:NotRepro We are not able to reproduce this problem. Better steps would be helpful.
Projects
None yet
Development

No branches or pull requests

4 participants