-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Private registry error handling. #11724
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As mentioned , separate pull request for complete fix. I approve it.
@@ -86,6 +86,10 @@ def first_registry_with_dependency_details | |||
headers: auth_header_for(details["token"]) | |||
) | |||
response.status < 400 && JSON.parse(response.body) | |||
if response.status >= 400 | |||
raise DependencyFileNotResolvable, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you dig into where known_registries
is set? It should only be a private registry if a private registry is set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, I see that a fallback logic has been implemented by @jakecoffman (see line 102). That's why I requested his review on these changes.
I'm not sure how you came to that conclusion. The change I have in this section of code is #5840 where I wrote:
So I am in agreement that a private registry failure shouldn't end up calling the public registry. Maybe you should also have the other |
What are you trying to accomplish?
Currently, if the private registry returns an error, Dependabot falls back to the global registry to fetch dependencies. Based on the discussion with the team, in this PR, I am now throwing an error and informing the customer that there was an issue accessing the configured registry.
Anything you want to highlight for special attention from reviewers?
The PR is not yet complete.
How will you know you've accomplished your goal?
Checklist