Closed bcoe closed 6 years ago
The error happens when the analysis document for react-cent
is being stored concurrently, thus resulting in a couchdb conflict error.
Gotcha, would it then result in conflicts on future indexer runs? Solution is to just delete the document from CouchDB?
I wonder what is causing react-cent
to be analyzed concurrently. Is this something that happen once or multiple times? Can you replicate consistently?
Aha, this is interesting:
{"pid":26167,"hostname":"elasticsearch-indexer-4-west.internal.npmjs.com","name":"npms-analyzer","level":50,"time":1510091237223,"msg":"Analysis of react-cent failed","err":{"message":"Response code 401 (Unauthorized)","stack":"HTTPError: Response code 401 (Unauthorized)\n at stream.catch.then.e (/mnt/deploys/npms-analyzer-consume/node_modules/got/index.js:119:13)\nFrom previous event:\n at EventEmitter.ee.on.res (/mnt/deploys/npms-analyzer-consume/node_modules/got/index.js:104:6)\n at emitOne (events.js:96:13)\n at EventEmitter.emit (events.js:188:7)\n at Immediate.setImmediate (/mnt/deploys/npms-analyzer-consume/node_modules/got/index.js:59:8)\n at runCallback (timers.js:637:20)\n at tryOnImmediate (timers.js:610:5)\n at processImmediate [as _immediateCallback] (timers.js:582:5)","host":"api.github.com","hostname":"api.github.com","method":"GET","path":"/repos/fortis/react-cent/stats/contributors","statusCode":401,"statusMessage":"Unauthorized"},"module":"analyze","v":1}
That's strange. That's not a API key rate limit exceed because the error code is 403.
seeing the issue, the problem is the deprecated field in package.json:
https://github.com/fortis/react-cent/blob/master/package.json#L28
this then causes the search result to not show up in npm which defaults to adding the search flag not:deprecated
we should probably omit this non-standard package.json field when indexing?
I was not counting on the deprecated being false
. Anyway, we can change this line https://github.com/npms-io/npms-analyzer/blob/master/lib/scoring/score.js#L209 to be deprecated: collected.metadata.deprecated ? true : null
@satazor awesome \o/ such a weird bug.
We seem to be having issues indexing one specific module,
react-cent
, with the conflict provided below.Any thoughts regarding what might cause this behavior?