[Reporting] Log the chromium child process PID#44947
[Reporting] Log the chromium child process PID#44947tsullivan wants to merge 3 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/kibana-stack-services |
| ignoreHTTPSErrors: true, | ||
| args: chromiumArgs, | ||
| env: { | ||
| TZ: browserTimezone, |
There was a problem hiding this comment.
browserTimezone wasn't getting passed
| logger, | ||
| browserConfig, | ||
| queueTimeout | ||
| ): HeadlessChromiumDriverFactory { |
There was a problem hiding this comment.
oops, this isn't a TS file
| viewport, | ||
| verboseLogging: this.logger.isVerbose, | ||
| disableSandbox: this.browserConfig.disableSandbox, | ||
| proxyConfig: this.browserConfig.proxy, |
There was a problem hiding this comment.
This might have been hiding a bug. If it is meant to match the Reporting Settings, then it should be proxy: https://www.elastic.co/guide/en/kibana/current/reporting-settings-kb.html#reporting-chromium-settings
| } as LaunchOptions) | ||
| .then((browser: Browser) => { | ||
| const childProcess: ChildProcess = browser.process(); | ||
| logger.debug(`Test browser process launched with PID: ${childProcess.pid}`); |
There was a problem hiding this comment.
This is 1/2 of the actual changes. Everything else is due to increase strictness of Typescript
| } as LaunchOptions); | ||
|
|
||
| // log the child process PID | ||
| const childProcess: ChildProcess = browser.process(); |
There was a problem hiding this comment.
This is 2/2 of the actual changes. Everything else is due to increase strictness of Typescript
💚 Build Succeeded |
| flags.push('--no-sandbox'); | ||
| } | ||
|
|
||
| // Dead code? |
There was a problem hiding this comment.
Looks like a bug to wrap this in a conditional. I think we want the logging flags hardcoded to "on":
|
I don't think we need the enhancement of browser process PID logged. Closing this and will re-open with just the Typescript improvements |
|
The browser PID can be introduced in this PR: #45483 |
Summary
While testing methods for getting the
stdinandstdoutstreams from Puppeteer's child Chromium process, it occurred to me that, although that it hard, it is easy to get the PID of that process. Such a thing was previously thought to be hard. That's probably due to the relative new-ness of thebrowser.process()method.Theoretically, this could be a step for having a very nice Monitoring of Reporting solution.
This also replaces some
anytype defs that were in place forHeadlessChromiumDriverobjects.Release Note (Enhancement): Added debug-level logging of the headless browser process ID that is spawned to take screenshots of Kibana for PDF and PNG reports.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] This was checked for cross-browser compatibility, including a check against IE11[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n support[ ] Documentation was added for features that require explanation or tutorials[ ] Unit or functional tests were updated or added to match the most common scenarios[ ] This was checked for keyboard-only and screenreader accessibility