node-gitlab-2-github
node-gitlab-2-github copied to clipboard
Import failed with 500 in Github
Running the migration failed when a 500 error occurred adding a comment to a merge request.
Should 500 errors be retried to avoid having to reset from scratch?
Pull request #78 (source branch 'fix_eggs' does not exist => cannot migrate pull request, creating an issue instead.
Migrating pull request comments...
could not create GitHub issue comment!
RequestError [HttpError]: request to https://api.github.com/repos/python/importlib_metadata/issues/206/comments failed, reason: getaddrinfo ENOTFOUND api.github.com
at /Users/jaraco/code/public/node-gitlab-2-github/node_modules/@octokit/request/dist-src/fetch-wrapper.js:88:15
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
status: 500,
headers: {},
request: {
method: 'POST',
url: 'https://api.github.com/repos/python/importlib_metadata/issues/206/comments',
headers: {
accept: 'application/vnd.github.v3+json',
'user-agent': 'octokit-rest.js/18.0.0 octokit-core.js/3.1.0 Node.js/14.13.1 (macOS Catalina; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"body":"In GitLab by [@asottile](https://gitlab.com/asottile) on Jul 2, 2019, 11:27\\n\\n@jaraco thoughts on how I can improve this PR?"}',
request: { hook: [Function: bound bound register] }
}
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node node_modules/ts-node/dist/bin.js ./src/index.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jaraco/.npm/_logs/2020-10-22T15_56_58_678Z-debug.log
After a second attempt, the migration failed again with a similar 500 error, but this time after Pull request #83, so the issue seems to be intermittent and spurious.
Is there any way to avoid avoid crashing at this point and instead somehow skip or retry?
Here's the info from the debug log in the latest run, in case it's helpful:
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli '/usr/local/Cellar/node/14.13.1_1/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'start'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/jaraco/code/public/node-gitlab-2-github/node_modules/.bin:/Users/jaraco/.local/bin:/usr/local/opt/[email protected]/bin:/Applications/Firefox.app/Contents/MacOS:/Library/Frameworks/Python.framework/Versions/3.9/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/Users/jaraco/.local/homebrew/bin:/usr/local/heroku/bin:/Users/jaraco/Dropbox/bin/mac:/opt/cisco/anyconnect/bin:/Users/jaraco/Dropbox/bin/scripts:/Applications/Sublime Merge.app/Contents/SharedSupport/bin:/Applications/Sublime Text.app/Contents/SharedSupport/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Wireshark.app/Contents/MacOS:/Users/jaraco/.local/bin
9 verbose lifecycle [email protected]~start: CWD: /Users/jaraco/code/public/node-gitlab-2-github
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node node_modules/ts-node/dist/bin.js ./src/index.ts' ]
11 silly lifecycle [email protected]~start: Returned: code: 1 signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node node_modules/ts-node/dist/bin.js ./src/index.ts`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:314:20)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:314:20)
13 verbose stack at maybeClose (internal/child_process.js:1047:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/jaraco/code/public/node-gitlab-2-github
16 verbose Darwin 19.6.0
17 verbose argv "/usr/local/Cellar/node/14.13.1_1/bin/node" "/usr/local/bin/npm" "run" "start"
18 verbose node v14.13.1
19 verbose npm v6.14.8
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node node_modules/ts-node/dist/bin.js ./src/index.ts`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Wait a minute. I see 500 but I also see ENOTFOUND api.github.com. So maybe the 500 response is a lie and in fact the issue is that sometimes the name lookup fails.