-
Notifications
You must be signed in to change notification settings - Fork 253
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
restore fails hard by default if one source is unavailable/invalid/down #5607
Comments
Today NuGet looks for availability of all the feeds when trying to install or add a new package and this is an existing issue we plan to look at. Its not necessary for the package to be present in all the feeds but they(feeds) should be accessible. So it would be good to check if the feeds are reachable. If not, its a known issue. Additional 2 questions if the feeds are already accessible:
|
I'm not sure I understand. Like I described above, it is my experience that the package has to be accessible in all feeds (example 2) - which I consider a bug NVM, I understand now. No, my private feed is not authenticated. As you can see from the logs, it responds with a 404, not a 401 which would normally be the case if there was authentication involved. Your question nr 2: Yes, it works fine if the package is present in all feeds. Like my logs above show, nuget does not work fine if there are multiple feeds and the package is only available in one of them. Also note that this issue was sent here from the dotnet/cli repo where I originally posted the issue. I have no idea if the bug is in nuget or in the dotnet cli, but it's my experience that "regular" nuget on .Net classic is much more forgiving than "dotnet add package" on .Net core. So if this is indeed a .net core cli issue and not a nuget issue, please let me know and I'll ask the cli maintainers to move it back. |
Another issue also worth noting is that the process in example number 2 is extremely slow caused by all the retries. I don't see the point in retrying a 404. The package isn't there. Move on. |
This seems weird. As mentioned before, we do have issues when any of the feeds in nuget.config is unreachable. #5033 refers to similar issue. I am adding this to the list of issues with authenticated or in general multi-feeds category of issues tracked by #4949 |
CC: @mishra14 |
cc: @emgarten as this is a restore issue/design choice. |
This is by design, the option to ignore failing sources on restore exists to allow using only the available sources. Ignoring failing sources by default is dangerous since a source could go down and a restore could pass and end up with different packages. For the add command I think having the same behavior as restore makes sense, it would be unexpected if add succeeded and then restore failed right after. |
@emgarten The issue reported here is need for the package to present on all the feeds which IMO shouldn't be the case and if it is, then this is a bug |
@trondhindenes do you have a repro project and feeds that demonstrate this? A package only needs to be in a single feed, but all feeds need to be available for restore. |
Yeah, I have looked into this a bit more. Will post repro steps/details when back in the office |
From @trondhindenes on July 15, 2017 23:16
Steps to reproduce
dotnet --version
: 1.0.4Given a nuget config with multiple feeds, the default (nuget.org) + another custom feed:
When trying to install a package which is present in the public feed, the install fails if not all feeds have the package or respond.:
output:
The process doesn't fail either, it just hangs there it seems.
In this example, the private feed is up, but doesn't have the package:
Expected behavior
Package install should succeed if at least one of the feeds is able to satisfy the request, regardless of the status of other feeds. In both of the examples above the package should get installed, maybe possible with a warning for unreachable feeds.
Actual behavior
see description
Environment data
Copied from original issue: dotnet/cli#7171
The text was updated successfully, but these errors were encountered: