[Reporting] clarify what phantom deprecation means (#26434) (#26640)

This commit is contained in:
Tim Sullivan 2018-12-04 16:02:50 -07:00 committed by GitHub
parent d51b57ad18
commit ed618e768c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 8 deletions

View file

@ -93,15 +93,20 @@ Defaults to `3000` (3 seconds).
`xpack.reporting.capture.browser.type`::
Specifies the browser to use to capture screenshots. Valid options are `phantom`
and `chromium`. When `chromium` is set, the settings specified in the <<reporting-chromium-settings, Chromium settings>>
are respected. This setting will be deprecated in 7.0, when Phantom support is removed.
Defaults to `chromium`.
are respected. Defaults to `chromium`.
[NOTE]
============
Starting in 7.0, Phantom support will be removed from Kibana, and `chromium`
will be the only valid option for the `xpack.reporting.capture.browser.type` setting.
============
[float]
[[reporting-chromium-settings]]
==== Chromium Settings
When `xpack.reporting.capture.browser.type` is set to `chromium` you can also specify the following settings.
When `xpack.reporting.capture.browser.type` is set to `chromium` (default) you can also specify the following settings.
`xpack.reporting.capture.browser.chromium.disableSandbox`::
Elastic recommends that you research the feasibility of enabling unprivileged user namespaces.

View file

@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { get } from 'lodash';
import { resolve } from 'path';
import { UI_SETTINGS_CUSTOM_PDF_LOGO } from './common/constants';
import { mirrorPluginStatus } from '../../server/lib/mirror_plugin_status';
@ -92,7 +93,7 @@ export const reporting = (kibana) => {
settleTime: Joi.number().integer().default(1000), //deprecated
concurrency: Joi.number().integer().default(appConfig.concurrency), //deprecated
browser: Joi.object({
type: Joi.any().valid('phantom', 'chromium').default(await getDefaultBrowser()), // TODO: remove support in 7.0
type: Joi.any().valid('phantom', 'chromium').default(await getDefaultBrowser()), // TODO: make chromium the only valid option in 7.0
autoDownload: Joi.boolean().when('$dev', {
is: true,
then: Joi.default(true),
@ -150,10 +151,6 @@ export const reporting = (kibana) => {
validateConfig(config, message => server.log(['reporting', 'warning'], message));
logConfiguration(config, message => server.log(['reporting', 'debug'], message));
if (config.get('xpack.reporting.capture.browser.type') === PHANTOM) {
server.log(['reporting', 'warning'], 'Phantom browser type for reporting will be deprecated starting in 7.0');
}
const { xpack_main: xpackMainPlugin } = server.plugins;
mirrorPluginStatus(xpackMainPlugin, this);
@ -177,6 +174,15 @@ export const reporting = (kibana) => {
deprecations: function ({ unused }) {
return [
(settings, log) => {
const isPhantom = get(settings, 'capture.browser.type') === PHANTOM;
if (isPhantom) {
log(
'Phantom browser support for Reporting will be removed and Chromium will be the only valid option starting in 7.0.0. ' +
'Use the default `chromium` value for `xpack.reporting.capture.browser.type` to dismiss this warning.'
);
}
},
unused("capture.concurrency"),
unused("capture.timeout"),
unused("capture.settleTime"),