-
Notifications
You must be signed in to change notification settings - Fork 15
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
connection timeout on creating issues #15
Comments
We are getting this issue as well. Exactly. |
From what I can see the only thing that is calling aws from Maybe try to change // processImages.js
const processImages = async (content) => {
const imgRegExp = /!\[([^\]]+)\]\(([^\)]+)\)/
const imgMatchAll = new RegExp(imgRegExp, 'g')
if (config.s3Bucket) {
return Promise.all(
(content.match(imgMatchAll) || [])
.map(img => {
const [_, title, oldUrl] = img.match(imgRegExp)
return request({
method: 'GET',
encoding: null, // force a buffer
url: oldUrl,
transform: (body, response) => ({
headers: response.headers,
body,
})
})
// .then(console.log)
// .then(() => { process.exit(1) })
.then(response => uploadImage(config.s3Bucket, response.headers['content-type'])(response.body))
.then(newUrl => {
console.log('Uploaded image: ', newUrl)
return { oldUrl, newUrl }
}) Maybe that would fix the problem, after all, you managed to run the script for 5 pull requests as you mentioned. |
Any suggestion on why do I get this error after every 5 Pull request is created on create issues and create comments and how to resolve this:
/github-migration/node_modules/aws-sdk/lib/config.js:478
if (err) throw err;
^
TimeoutError: EC2 Metadata roleName request returned error
at Timeout.connectTimeout [as _onTimeout] (/github-migration/node_modules/aws-sdk/lib/http/node.js:69:15)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! migrate-github@1.0.0 createIssues:
node ./createIssues.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the migrate-github@1.0.0 createIssues 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:
The text was updated successfully, but these errors were encountered: