-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ftr] remove digdug, use chromedriver directly #11558
[ftr] remove digdug, use chromedriver directly #11558
Conversation
6da72e8
to
22f0c8d
Compare
why? - digdug is meant to be used by intern, and expects a certain lifecycle that the FTR has tried and continuously fails to mimic - rather than continue trying to force digdug into the stack, just spawn chromedriver ourselves. We know how to handle it - cleans up verbose remote logging while we're in there, since selenium-standalone-server went with digdug, which was previously doing the verbose logging - deprecate config.servers.webdriver - add config.chromedriver.url - if url at config.chromedriver.url points to a server that responds to http requests use it as the chromedriver instance, enables running chrome in a VM or container - if pings to config.chromedriver.url fail a local chromedriver is started
22f0c8d
to
3143aa9
Compare
Confirmed that tests run fine, and that Chrome and chromedriver are killed after failed test, passing tests, and interrupt (Ctrl+C). |
When there is no kibana/es server running, the tests start and fail, but chromedriver does not get killed. |
jenkins, test it result: tests all passed but publishing artifacts to s3 failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small spelling error and, if it's possible, killing chromedriver when there's a client request error, like:
│ Client request error: connect ECONNREFUSED 127.0.0.1:5620
│ Error: connect ECONNREFUSED 127.0.0.1:5620
│ at Object.exports._errnoException (util.js:1022:11)
│ at exports._exceptionWithHostPort (util.js:1045:20)
│ at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1087:14)
Besides, LGTM!
I also confirmed that a separate instance of chromedriver running will get picked up and used by the ftr.
|
||
proc.on('exit', (code) => { | ||
if (!api.isStopped() || code > 0) { | ||
api.emit('error', new Error(`Chromedriver exitted with code ${code}`)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exited
'clean:screenshots', | ||
'functionalTestRunner' | ||
]); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
this._url = url; | ||
this._state = undefined; | ||
this._callCustomStart = () => start(this); | ||
this._callCustomStop = () => stop(this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these two lines, do you need to pass this
as an argument? i don't think it's used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind, i see it now. this
is passed in as api
in the factory methods.
}, | ||
|
||
async stop() { | ||
await fcb(cb => treeKill(proc.pid, undefined, cb)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++ this is awesome. i didn't know about fromCallback
in bluebird. but, why are you passing undefined
as the 2nd arg? does it do SIGKILL
by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it does SIGINT by default... I'm just passing undefined so it will use it's default.
* Create an instance of the ChromedriverApi for a url. | ||
* | ||
* @param {ToolingLog} log | ||
* @param {Lifecycle} lifecycle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nope
50bff62
to
8db3d65
Compare
* [ftr] remove digdug, use chromedriver directly why? - digdug is meant to be used by intern, and expects a certain lifecycle that the FTR has tried and continuously fails to mimic - rather than continue trying to force digdug into the stack, just spawn chromedriver ourselves. We know how to handle it - cleans up verbose remote logging while we're in there, since selenium-standalone-server went with digdug, which was previously doing the verbose logging - deprecate config.servers.webdriver - add config.chromedriver.url - if url at config.chromedriver.url points to a server that responds to http requests use it as the chromedriver instance, enables running chrome in a VM or container - if pings to config.chromedriver.url fail a local chromedriver is started * address review requests (cherry picked from commit f76bef4)
5.5/5.x: 0ee55f7 |
why?
servers.webdriver
ftr configchromedriver.url
ftr configchromedriver.url
points to a server that responds to pings, use it as the chromedriver instance, enables running chrome in a VM or containerchromedriver.url
fail a local chromedriver is started