-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Npm Registry Access Error (non-5xx) Raises Invalid Configuration Error #1341
Comments
What if they are truly errors though - i.e. configuration errors - and we just keep skipping the repository forever. Can we distinguish between real not found errors and temporary/server errors and take different action? |
Is a Does that have a different meaning than a 404? A preset package with a slight typo in the name: $ curl https://registry.npmjs.org/renovate-config-defaultt --verbose
...
< HTTP/2 404 |
I believe the reason I'm getting request errors is because of my earlier attempt to work around the issue in Setting the Setting an empty agent string using Curl seems to work correctly: $ curl -A '' https://registry.npmjs.org/renovate-config-default --verbose So it seems I'm not understanding what |
So I think it could be useful to detect 5xx errors and skip those (so not throw configuration error issues). After that, 4xx level errors can be handled on a per-case basis. For example, 451 which is related to legal issues, while 429 would just be to many requests. |
So maybe any 5xx from the registry would have a |
Looks like 5xx errors have been addressed as part of #1388. |
@destroyerofbuilds sorry I forgot to update this issue as it progressed. You are right, I now attempt to abort Renovation when presented with 5xx errors from the npm registry. As I have some doubts that we've ever seen 451 or 429 in practice, I'm keeping this at a pri3 priority. |
Recently we encountered an issue where our npm registry proxy went down, preventing Renovate from fetching packages. That led to quite a few erroneously auto-closed PRs. We added additional logging to always print the full error object out so that we can get a better sense of what error is thrown in various failure scenarios. |
@destroyerofbuilds I just searched my logs for messages of {
"name": "@types/node",
"level": 40,
"repository": "ikatyang/tslint-plugin-ikatyang",
"packageFile": "package.json",
"depType": "devDependencies",
"err": {
"name": "ParseError",
"host": "registry.npmjs.org",
"hostname": "registry.npmjs.org",
"method": "GET",
"path": "/@types%2Fnode",
"protocol": "https:",
"url": "https://registry.npmjs.org/@types%2Fnode",
"statusCode": 200,
"statusMessage": "OK"
},
"msg": "Unknown npm lookup error",
"time": "2018-01-14T22:11:55.106Z"
} It's thrown if |
We did a quick test, though low fidelity, in which we provided an invalid registry endpoint, and the error object returned by It's likely d774a14 will cover our particular case. Thank you @rarkins. |
I noticed that when Renovate was unable to successfully query an npm registry proxy for package metadata, it caused Renovate to assume that a given preset was invalid. That led to Renovate raising configuration error issues with multiple repositories.
Here's what I saw in the logs:
The configuration errors weren't really errors.
Could npm access issues simply cause renovate to skip over renovating that repo?
The text was updated successfully, but these errors were encountered: