You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What Renovate type are you using?
Self-hosted Gitlab
Describe the bug
While developing in renovate locally I found that our private docker registry redirects to Amazon S3 to download blobs. Our private registry private-registry.com:5000 is using the 5000 port and then tries to redirect to S3. I noticed that got tries to use the same port when making a request to the redirected url. But, the S3 resource doesn't use port 5000 and the request times out.
This looks like an issue already identified in got and is planned to be fixed in v10. sindresorhus/got#719
Following the suggestion there, adding delete options.port; to this got beforeRedirect hook fixes the issue for me, and I'm thinking of opening a PR to add it. Thoughts?
Did you see anything helpful in debug logs?
Notice: The "port": "5000" gotOption below
DEBUG: Timeout awaiting 'request' for 60000ms (repository=user/repo)
"err": {
"name": "TimeoutError",
"code": "ETIMEDOUT",
"host": "private-registry.com:5000",
"hostname": "<<redacted>>.s3.amazonaws.com",
"method": "GET",
"path": "<<redacted>>",
"protocol": "https:",
"url": "https://<<redacted>>.s3.amazonaws.com/<<redacted>>",
"gotOptions": {
"path": "<<redacted>>",
"protocol": "https:",
"slashes": true,
"auth": null,
"host": "private-registry.com:5000",
"port": "5000", <<< This is what I noticed
"hostname": "<<redacted>>.s3.amazonaws.com",
"hash": "",
"search": "<<redacted>>",
"query": null,
"pathname": "<<redacted>>",
"href": "https://<<redacted>>.s3.amazonaws.com/<<redacted>>",
"headers": {
"user-agent": "https://github.com/renovatebot/renovate",
"accept-encoding": "gzip, deflate"
},
"hooks": {
"beforeError": [],
"init": [],
"beforeRequest": [],
"beforeRedirect": [null],
"beforeRetry": [],
"afterResponse": []
},
"retry": {"methods": {}, "statusCodes": {}, "errorCodes": {}},
"decompress": true,
"throwHttpErrors": true,
"followRedirect": true,
"stream": false,
"form": false,
"json": false,
"cache": false,
"useElectronNet": false,
"method": "GET",
"gotTimeout": {"request": 60000}
},
"event": "request",
"message": "Timeout awaiting 'request' for 60000ms",
"stack": "TimeoutError: Timeout awaiting 'request' for 60000ms\n at ClientRequest.request.once.error (/Users/user/oss/renovate/node_modules/got/source/request-as-event-emitter.js:176:14)\n at Object.onceWrapper (events.js:273:13)\n at ClientRequest.emit (events.js:187:15)\n at ClientRequest.EventEmitter.emit (domain.js:441:20)\n at ClientRequest.origin.emit.args (/Users/user/oss/renovate/node_modules/@szmarczak/http-timer/source/index.js:37:11)\n at Immediate.timeoutHandler (/Users/user/oss/renovate/node_modules/got/source/utils/timed-out.js:63:11)\n at runCallback (timers.js:706:11)\n at tryOnImmediate (timers.js:676:5)\n at processImmediate (timers.js:658:5)\n at process.topLevelDomainCallback (domain.js:120:23)"
}```
**To Reproduce**
Steps to reproduce the behavior:
Renovate a dockerfile using a private registry having a port, but is backed by AWS S3.
**Expected behavior**
It should resolve the S3 resource and not encounter a timeout.
The text was updated successfully, but these errors were encountered:
fullstackzach
changed the title
When docker registry redirects to S3, it doesn't clear the port in the redirect
When docker registry redirects to S3, "got" doesn't clear the port in the redirect
Oct 6, 2019
I would like to check that the beforeRedirect hook doesn't break anything scenarios first. e.g. does it work to go from 80 -> 5000, 5000 -> 5000, and 5000 -> 80? If all three of those work, I'm ok with this workaround as a PR until we adopt got v10.
What Renovate type are you using?
Self-hosted Gitlab
Describe the bug
While developing in renovate locally I found that our private docker registry redirects to Amazon S3 to download blobs. Our private registry
private-registry.com:5000
is using the 5000 port and then tries to redirect to S3. I noticed thatgot
tries to use the same port when making a request to the redirected url. But, the S3 resource doesn't use port 5000 and the request times out.This looks like an issue already identified in got and is planned to be fixed in v10.
sindresorhus/got#719
Following the suggestion there, adding
delete options.port;
to thisgot beforeRedirect
hook fixes the issue for me, and I'm thinking of opening a PR to add it. Thoughts?Did you see anything helpful in debug logs?
Notice: The "port": "5000" gotOption below
The text was updated successfully, but these errors were encountered: