From 4cd8ba93e0b9d92d12261a0441fb15aec8fb7454 Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 30 Dec 2020 09:39:43 -0700 Subject: [PATCH 1/4] [logstash] remove "upgrade" functionality now that .logstash is a system index --- .../upgrade_failure.test.js.snap | 1138 ----------------- .../upgrade_failure_actions.test.js.snap | 32 - .../upgrade_failure_title.test.js.snap | 23 - .../components/upgrade_failure/constants.js | 34 - .../components/upgrade_failure/index.js | 7 - .../upgrade_failure/upgrade_failure.js | 43 - .../upgrade_failure/upgrade_failure.test.js | 55 - .../upgrade_failure_actions.js | 36 - .../upgrade_failure_actions.test.js | 42 - .../upgrade_failure/upgrade_failure_title.js | 28 - .../upgrade_failure_title.test.js | 21 - .../logstash/public/application/index.tsx | 4 - .../public/application/pipeline_edit_view.tsx | 37 +- .../plugins/logstash/public/services/index.js | 1 - .../logstash/public/services/upgrade/index.js | 7 - .../services/upgrade/upgrade_service.js | 22 - .../plugins/logstash/server/routes/index.ts | 3 - .../logstash/server/routes/upgrade/index.ts | 7 - .../logstash/server/routes/upgrade/upgrade.ts | 46 - 19 files changed, 1 insertion(+), 1585 deletions(-) delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure.test.js.snap delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure_actions.test.js.snap delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure_title.test.js.snap delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/constants.js delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/index.js delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure.js delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure.test.js delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_actions.js delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_actions.test.js delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_title.js delete mode 100644 x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_title.test.js delete mode 100755 x-pack/plugins/logstash/public/services/upgrade/index.js delete mode 100755 x-pack/plugins/logstash/public/services/upgrade/upgrade_service.js delete mode 100644 x-pack/plugins/logstash/server/routes/upgrade/index.ts delete mode 100644 x-pack/plugins/logstash/server/routes/upgrade/upgrade.ts diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure.test.js.snap b/x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure.test.js.snap deleted file mode 100644 index 63bb0c84d6711..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure.test.js.snap +++ /dev/null @@ -1,1138 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`UpgradeFailure component passes expected text for new pipeline 1`] = ` - -
- - -
- - } - body={ -

- Before you can add a pipeline, we need to upgrade your configuration. -

- } - title={ - - } - > -
- - - - - -
- -
- - - -
-
- -
- -

- Upgrade failed -

-
-
-
-
-
-
-
- -
- - -
-

- Before you can add a pipeline, we need to upgrade your configuration. -

-
-
- - - -
- - -
- - - -
- -
- - - - - -
-
- -
- - - -
-
-
-
-
-
- -
- - -
- -`; - -exports[`UpgradeFailure component passes expected text for not manual upgrade 1`] = ` - -
- - -
- - } - body={ -

- Before you can add a pipeline, we need to upgrade your configuration. -

- } - title={ - - } - > -
- - - - - -
- -
- - - -
-
- -
- -

- Time for an upgrade! -

-
-
-
-
-
-
-
- -
- - -
-

- Before you can add a pipeline, we need to upgrade your configuration. -

-
-
- - - -
- - -
- - - -
- -
- - - - - -
-
- -
- - - -
-
-
-
-
-
- -
- - -
- -`; - -exports[`UpgradeFailure component passes expected text for not new pipeline 1`] = ` - -
- - -
- - } - body={ -

- Before you can edit this pipeline, we need to upgrade your configuration. -

- } - title={ - - } - > -
- - - - - -
- -
- - - -
-
- -
- -

- Upgrade failed -

-
-
-
-
-
-
-
- -
- - -
-

- Before you can edit this pipeline, we need to upgrade your configuration. -

-
-
- - - -
- - -
- - - -
- -
- - - - - -
-
- -
- - - -
-
-
-
-
-
- -
- - -
- -`; - -exports[`UpgradeFailure component renders component as expected 1`] = ` -
- - - } - body={ -

- Before you can add a pipeline, we need to upgrade your configuration. -

- } - title={ - - } - /> -
-
-`; diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure_actions.test.js.snap b/x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure_actions.test.js.snap deleted file mode 100644 index 2be92ef29e71b..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure_actions.test.js.snap +++ /dev/null @@ -1,32 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`UpgradeFailureActions component renders component as expected 1`] = ` - - - - upgrade button text - - - - - - - - -`; diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure_title.test.js.snap b/x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure_title.test.js.snap deleted file mode 100644 index df4503b34c964..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/__snapshots__/upgrade_failure_title.test.js.snap +++ /dev/null @@ -1,23 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`UpgradeFailureTitle component renders component as expected 1`] = ` - - - - - - -

- the Title -

-
-
-
-`; diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/constants.js b/x-pack/plugins/logstash/public/application/components/upgrade_failure/constants.js deleted file mode 100644 index 99c727b3ad96a..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/constants.js +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import { i18n } from '@kbn/i18n'; - -export const UPGRADE_FAILURE = { - TITLE: { - IS_MANUAL_UPGRADE: i18n.translate('xpack.logstash.upgradeFailedTitle', { - defaultMessage: 'Upgrade failed', - }), - NOT_MANUAL_UPGRADE: i18n.translate('xpack.logstash.notManualUpgradeTitle', { - defaultMessage: 'Time for an upgrade!', - }), - }, - MESSAGE: { - IS_NEW_PIPELINE: i18n.translate('xpack.logstash.newPipelineMessage', { - defaultMessage: 'Before you can add a pipeline, we need to upgrade your configuration.', - }), - NOT_NEW_PIPELINE: i18n.translate('xpack.logstash.notNewPipelineMessage', { - defaultMessage: 'Before you can edit this pipeline, we need to upgrade your configuration.', - }), - }, - UPGRADE_BUTTON_TEXT: { - IS_MANUAL_UPGRADE: i18n.translate('xpack.logstash.manualUpgradeButtonLabel', { - defaultMessage: 'Try again', - }), - NOT_MANUAL_UPGRADE: i18n.translate('xpack.logstash.notManualUpgradeButtonLabel', { - defaultMessage: 'Upgrade', - }), - }, -}; diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/index.js b/x-pack/plugins/logstash/public/application/components/upgrade_failure/index.js deleted file mode 100644 index 0aa757bca5236..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/index.js +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export { UpgradeFailure } from './upgrade_failure'; diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure.js b/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure.js deleted file mode 100644 index 52eefe490d2ee..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure.js +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import React from 'react'; -import { EuiEmptyPrompt, EuiPageContent } from '@elastic/eui'; -import { UpgradeFailureTitle } from './upgrade_failure_title'; -import { UpgradeFailureActions } from './upgrade_failure_actions'; -import { UPGRADE_FAILURE } from './constants'; - -export function UpgradeFailure({ isNewPipeline, isManualUpgrade, onClose, onRetry }) { - const titleText = isManualUpgrade - ? UPGRADE_FAILURE.TITLE.IS_MANUAL_UPGRADE - : UPGRADE_FAILURE.TITLE.NOT_MANUAL_UPGRADE; - - const messageText = isNewPipeline - ? UPGRADE_FAILURE.MESSAGE.IS_NEW_PIPELINE - : UPGRADE_FAILURE.MESSAGE.NOT_NEW_PIPELINE; - - const upgradeButtonText = isManualUpgrade - ? UPGRADE_FAILURE.UPGRADE_BUTTON_TEXT.IS_MANUAL_UPGRADE - : UPGRADE_FAILURE.UPGRADE_BUTTON_TEXT.NOT_MANUAL_UPGRADE; - - return ( -
- - - } - title={} - body={

{messageText}

} - /> -
-
- ); -} diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure.test.js b/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure.test.js deleted file mode 100644 index fe93ddb22077c..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure.test.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import React from 'react'; -import { shallowWithIntl, mountWithIntl } from '@kbn/test/jest'; -import { UpgradeFailure } from './upgrade_failure'; - -describe('UpgradeFailure component', () => { - let props; - let onClose; - let onRetry; - - beforeEach(() => { - onClose = jest.fn(); - onRetry = jest.fn(); - - props = { - isManualUpgrade: true, - isNewPipeline: true, - onClose, - onRetry, - }; - }); - - it('renders component as expected', () => { - const wrapper = shallowWithIntl(); - expect(wrapper).toMatchSnapshot(); - }); - - it('passes expected text for new pipeline', () => { - const wrapper = mountWithIntl(); - expect(wrapper).toMatchSnapshot(); - }); - - it('passes expected text for not new pipeline', () => { - props.isNewPipeline = false; - const wrapper = mountWithIntl(); - expect(wrapper).toMatchSnapshot(); - }); - - it('passes expected text for not manual upgrade', () => { - props.isManualUpgrade = false; - const wrapper = mountWithIntl(); - expect(wrapper).toMatchSnapshot(); - }); - - it('propogates onClose and onRetry functions to child', () => { - const wrapper = mountWithIntl(); - expect(wrapper.find('UpgradeFailureActions').props().onClose).toEqual(onClose); - expect(wrapper.find('UpgradeFailureActions').props().onRetry).toEqual(onRetry); - }); -}); diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_actions.js b/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_actions.js deleted file mode 100644 index 7a3eaef45bb5b..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_actions.js +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import React from 'react'; -import PropTypes from 'prop-types'; -import { EuiButton, EuiButtonEmpty, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { FormattedMessage } from '@kbn/i18n/react'; - -export function UpgradeFailureActions({ onClose, onRetry, upgradeButtonText }) { - return ( - - - - {upgradeButtonText} - - - - - - - - - ); -} - -UpgradeFailureActions.propTypes = { - onClose: PropTypes.func.isRequired, - onRetry: PropTypes.func.isRequired, - upgradeButtonText: PropTypes.string.isRequired, -}; diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_actions.test.js b/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_actions.test.js deleted file mode 100644 index 603ab0ff543b8..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_actions.test.js +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import React from 'react'; -import { shallowWithIntl, mountWithIntl } from '@kbn/test/jest'; -import { UpgradeFailureActions } from './upgrade_failure_actions'; - -describe('UpgradeFailureActions component', () => { - let props; - let onClose; - let onRetry; - - beforeEach(() => { - onClose = jest.fn(); - onRetry = jest.fn(); - props = { - onClose, - onRetry, - upgradeButtonText: 'upgrade button text', - }; - }); - - it('renders component as expected', () => { - const wrapper = shallowWithIntl(); - expect(wrapper).toMatchSnapshot(); - }); - - it('calls onRetry on update click', () => { - const wrapper = mountWithIntl(); - wrapper.find('EuiButton').simulate('click'); - expect(onRetry).toHaveBeenCalledTimes(1); - }); - - it('calls onClose on "Go back" click', () => { - const wrapper = mountWithIntl(); - wrapper.find('EuiButtonEmpty').simulate('click'); - expect(onClose).toHaveBeenCalledTimes(1); - }); -}); diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_title.js b/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_title.js deleted file mode 100644 index 749c49ea2257e..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_title.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import React from 'react'; -import PropTypes from 'prop-types'; -import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiTitle } from '@elastic/eui'; - -export function UpgradeFailureTitle({ titleText }) { - return ( - - - - - - -

{titleText}

-
-
-
- ); -} - -UpgradeFailureTitle.propTypes = { - titleText: PropTypes.string.isRequired, -}; diff --git a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_title.test.js b/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_title.test.js deleted file mode 100644 index 7fd5ad8f732b2..0000000000000 --- a/x-pack/plugins/logstash/public/application/components/upgrade_failure/upgrade_failure_title.test.js +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -import React from 'react'; -import { shallow } from 'enzyme'; -import { UpgradeFailureTitle } from './upgrade_failure_title'; - -describe('UpgradeFailureTitle component', () => { - let props; - beforeEach(() => { - props = { titleText: 'the Title' }; - }); - - it('renders component as expected', () => { - const wrapper = shallow(); - expect(wrapper).toMatchSnapshot(); - }); -}); diff --git a/x-pack/plugins/logstash/public/application/index.tsx b/x-pack/plugins/logstash/public/application/index.tsx index 8d515ad6b3932..2cf1b0aaebd9f 100644 --- a/x-pack/plugins/logstash/public/application/index.tsx +++ b/x-pack/plugins/logstash/public/application/index.tsx @@ -17,7 +17,6 @@ import { MonitoringService, PipelineService, PipelinesService, - UpgradeService, // @ts-ignore } from '../services'; // @ts-ignore @@ -39,7 +38,6 @@ export const renderApp = async ( const monitoringService = new MonitoringService(core.http, isMonitoringEnabled, clusterService); const pipelinesService = new PipelinesService(core.http, monitoringService); const pipelineService = new PipelineService(core.http, pipelinesService); - const upgradeService = new UpgradeService(core.http); ReactDOM.render( @@ -77,7 +75,6 @@ export const renderApp = async ( logstashLicenseService={logstashLicenseService} pipelineService={pipelineService} toasts={core.notifications.toasts} - upgradeService={upgradeService} /> )} /> @@ -96,7 +93,6 @@ export const renderApp = async ( logstashLicenseService={logstashLicenseService} pipelineService={pipelineService} toasts={core.notifications.toasts} - upgradeService={upgradeService} id={match.params.id} /> )} diff --git a/x-pack/plugins/logstash/public/application/pipeline_edit_view.tsx b/x-pack/plugins/logstash/public/application/pipeline_edit_view.tsx index a36ef394f3327..3ad8927bcdafa 100644 --- a/x-pack/plugins/logstash/public/application/pipeline_edit_view.tsx +++ b/x-pack/plugins/logstash/public/application/pipeline_edit_view.tsx @@ -11,8 +11,6 @@ import { History } from 'history'; import { i18n } from '@kbn/i18n'; import { ToastsStart } from 'src/core/public'; -// @ts-ignore -import { UpgradeFailure } from './components/upgrade_failure'; // @ts-ignore import { PipelineEditor } from './components/pipeline_editor'; // @ts-ignore @@ -59,23 +57,9 @@ const usePipeline = ( return pipeline; }; -const useIsUpgraded = (upgradeService: any) => { - const [isUpgraded, setIsUpgraded] = useState(null); - const mounted = usePromise(); - - useLayoutEffect(() => { - mounted(upgradeService.executeUpgrade() as Promise).then((result) => - setIsUpgraded(result) - ); - }, [mounted, upgradeService]); - - return isUpgraded; -}; - interface EditProps { pipelineService: any; logstashLicenseService: any; - upgradeService: any; toasts: ToastsStart; history: History; setBreadcrumbs: ManagementAppMountParams['setBreadcrumbs']; @@ -87,24 +71,16 @@ interface EditProps { export const PipelineEditView: React.FC = ({ pipelineService, logstashLicenseService, - upgradeService, toasts, history, setBreadcrumbs, id, }) => { const params = new URLSearchParams(history.location.search); - const shouldRetry = params.get('retry') === 'true'; const shouldClone = params.get('clone') === ''; const pipeline = usePipeline(pipelineService, logstashLicenseService, toasts, shouldClone, id); - const isUpgraded = useIsUpgraded(upgradeService); - const onRetry = useCallback(() => { - const newParams = new URLSearchParams(history.location.search); - newParams.set('retry', 'true'); - history.replace({ search: newParams.toString() }); - }, [history]); const close = useCallback(() => { history.push('/'); }, [history]); @@ -115,7 +91,7 @@ export const PipelineEditView: React.FC = ({ [history] ); - if (!pipeline || isUpgraded === null) { + if (!pipeline) { return null; } @@ -126,17 +102,6 @@ export const PipelineEditView: React.FC = ({ : Breadcrumbs.getPipelineEditBreadcrumbs(pipeline.id) ); - if (!isUpgraded) { - return ( - - ); - } - return ( response.is_upgraded) - .catch((e) => { - throw e.message; - }); - } -} diff --git a/x-pack/plugins/logstash/server/routes/index.ts b/x-pack/plugins/logstash/server/routes/index.ts index 0c7183b409055..422afbf7d411e 100644 --- a/x-pack/plugins/logstash/server/routes/index.ts +++ b/x-pack/plugins/logstash/server/routes/index.ts @@ -12,7 +12,6 @@ import { registerPipelineSaveRoute, } from './pipeline'; import { registerPipelinesListRoute, registerPipelinesDeleteRoute } from './pipelines'; -import { registerUpgradeRoute } from './upgrade'; export function registerRoutes(router: IRouter, security?: SecurityPluginSetup) { registerClusterLoadRoute(router); @@ -23,6 +22,4 @@ export function registerRoutes(router: IRouter, security?: SecurityPluginSetup) registerPipelinesListRoute(router); registerPipelinesDeleteRoute(router); - - registerUpgradeRoute(router); } diff --git a/x-pack/plugins/logstash/server/routes/upgrade/index.ts b/x-pack/plugins/logstash/server/routes/upgrade/index.ts deleted file mode 100644 index 3a5b0868b446b..0000000000000 --- a/x-pack/plugins/logstash/server/routes/upgrade/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ - -export { registerUpgradeRoute } from './upgrade'; diff --git a/x-pack/plugins/logstash/server/routes/upgrade/upgrade.ts b/x-pack/plugins/logstash/server/routes/upgrade/upgrade.ts deleted file mode 100644 index 2bd2c0f89e190..0000000000000 --- a/x-pack/plugins/logstash/server/routes/upgrade/upgrade.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License; - * you may not use this file except in compliance with the Elastic License. - */ -import { IRouter } from 'src/core/server'; -import { wrapRouteWithLicenseCheck } from '../../../../licensing/server'; - -import { INDEX_NAMES } from '../../../common/constants'; -import { checkLicense } from '../../lib/check_license'; - -export function registerUpgradeRoute(router: IRouter) { - router.post( - { - path: '/api/logstash/upgrade', - validate: false, - }, - wrapRouteWithLicenseCheck( - checkLicense, - router.handleLegacyErrors(async (context, request, response) => { - const client = context.logstash!.esClient; - - const doesIndexExist = await client.callAsCurrentUser('indices.exists', { - index: INDEX_NAMES.PIPELINES, - }); - - // If index doesn't exist yet, there is no mapping to upgrade - if (doesIndexExist) { - await client.callAsCurrentUser('indices.putMapping', { - index: INDEX_NAMES.PIPELINES, - body: { - properties: { - pipeline_settings: { - dynamic: false, - type: 'object', - }, - }, - }, - }); - } - - return response.ok({ body: { is_upgraded: true } }); - }) - ) - ); -} From b5b1a1ae6bc79608c3080e33d603b536e62f791a Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 30 Dec 2020 08:56:00 -0700 Subject: [PATCH 2/4] temporarily run against the unverified snapshots --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 3b68cde206573..7fa056f5b10c6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,7 @@ #!/bin/groovy +env.KBN_ES_SNAPSHOT_USE_UNVERIFIED = 'true' + library 'kibana-pipeline-library' kibanaLibrary.load() From 55c402366bdb98a7dee0561b3a9e29036ff250bf Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 30 Dec 2020 10:04:45 -0700 Subject: [PATCH 3/4] remove unused translations --- x-pack/plugins/translations/translations/ja-JP.json | 7 ------- x-pack/plugins/translations/translations/zh-CN.json | 7 ------- 2 files changed, 14 deletions(-) diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index fda6b81c4af03..6411f39d19444 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -10907,11 +10907,6 @@ "xpack.logstash.managementSection.notPossibleToManagePipelinesMessage": "現在ライセンス情報が利用できないため Logstash パイプラインを使用できません。", "xpack.logstash.managementSection.pipelineCrudOperationsNotAllowedDescription": "ご使用の {licenseType} ライセンスは期限切れのため、Logstash パイプラインの編集、作成、削除ができません。", "xpack.logstash.managementSection.pipelinesTitle": "Logstashパイプライン", - "xpack.logstash.manualUpgradeButtonLabel": "再試行", - "xpack.logstash.newPipelineMessage": "パイプラインを追加する前に、構成をアップグレードする必要があります。", - "xpack.logstash.notManualUpgradeButtonLabel": "アップグレード", - "xpack.logstash.notManualUpgradeTitle": "アップグレードの時がやってきました!", - "xpack.logstash.notNewPipelineMessage": "このパイプラインを編集する前に、構成をアップグレードする必要があります。", "xpack.logstash.pipelineBatchDelayTooltip": "パイプラインイベントバッチを作成する際、それぞれのイベントでパイプラインワーカーにサイズの小さなバッチを送る前に何ミリ秒間待つかです。\n\nデフォルト値:50ms", "xpack.logstash.pipelineBatchSizeTooltip": "フィルターとアウトプットをを実行する前に各ワーカースレッドがインプットから収集するイベントの最低数です。基本的にバッチサイズが大きくなるほど効率が上がりますが、メモリーオーバーヘッドも大きくなります。このオプションを効率的に使用するには、LS_HEAP_SIZE 変数を設定して JVM のヒープサイズを増やす必要があるかもしれません。\n\nデフォルト値:125", "xpack.logstash.pipelineEditor.cancelButtonLabel": "キャンセル", @@ -10970,8 +10965,6 @@ "xpack.logstash.units.megabytesLabel": "メガバイト", "xpack.logstash.units.petabytesLabel": "ペタバイト", "xpack.logstash.units.terabytesLabel": "テラバイト", - "xpack.logstash.upgradeFailedTitle": "アップグレード失敗", - "xpack.logstash.upgradeFailureActions.goBackButtonLabel": "戻る", "xpack.logstash.upstreamPipelineArgumentMustContainAnIdPropertyErrorMessage": "upstreamPipeline 引数には id プロパティを含める必要があります", "xpack.logstash.workersTooltip": "パイプラインのフィルターとアウトプットステージを同時に実行するワーカーの数です。イベントが詰まってしまう場合や CPU が飽和状態ではない場合は、マシンの処理能力をより有効に活用するため、この数字を上げてみてください。\n\nデフォルト値:ホストの CPU コア数です", "xpack.maps.actionSelect.label": "アクション", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 609e09d0197af..9894500f19a53 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -10920,11 +10920,6 @@ "xpack.logstash.managementSection.notPossibleToManagePipelinesMessage": "您不能管理 Logstash 管道,因为许可信息当前不可用。", "xpack.logstash.managementSection.pipelineCrudOperationsNotAllowedDescription": "您不能编辑、创建或删除您的 Logstash 管道,因为您的{licenseType}许可已过期。", "xpack.logstash.managementSection.pipelinesTitle": "Logstash 管道", - "xpack.logstash.manualUpgradeButtonLabel": "重试", - "xpack.logstash.newPipelineMessage": "在您可以添加管道之前,我们需要升级您的配置。", - "xpack.logstash.notManualUpgradeButtonLabel": "升级", - "xpack.logstash.notManualUpgradeTitle": "是时候升级了!", - "xpack.logstash.notNewPipelineMessage": "在您可以编辑此管道之前,我们需要升级您的配置。", "xpack.logstash.pipelineBatchDelayTooltip": "创建管道事件批时,将过小的批分派给管道工作线程之前要等候每个事件的时长(毫秒)。\n\n默认值:50ms", "xpack.logstash.pipelineBatchSizeTooltip": "单个工作线程在尝试执行其筛选和输出之前可以从输入收集的最大事件数目。较大的批大小通常更有效,但代价是内存开销也较大。您可能需要通过设置 LS_HEAP_SIZE 变量来增大 JVM 堆大小,从而有效利用该选项。\n\n默认值:125", "xpack.logstash.pipelineEditor.cancelButtonLabel": "取消", @@ -10983,8 +10978,6 @@ "xpack.logstash.units.megabytesLabel": "兆字节", "xpack.logstash.units.petabytesLabel": "万兆字节", "xpack.logstash.units.terabytesLabel": "兆兆字节", - "xpack.logstash.upgradeFailedTitle": "升级失败", - "xpack.logstash.upgradeFailureActions.goBackButtonLabel": "返回", "xpack.logstash.upstreamPipelineArgumentMustContainAnIdPropertyErrorMessage": "upstreamPipeline 参数必须包含 id 属性", "xpack.logstash.workersTooltip": "并行执行管道的筛选和输出阶段的工作线程数目。如果您发现事件出现积压或 CPU 未饱和,请考虑增大此数值,以更好地利用机器处理能力。\n\n默认值:主机的 CPU 核心数", "xpack.maps.actionSelect.label": "操作", From 0065a1df3a228ef55bdfa9c6505212b6a9bc5c98 Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 30 Dec 2020 12:09:30 -0700 Subject: [PATCH 4/4] Revert "temporarily run against the unverified snapshots" This reverts commit b5b1a1ae6bc79608c3080e33d603b536e62f791a. --- Jenkinsfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7fa056f5b10c6..3b68cde206573 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,5 @@ #!/bin/groovy -env.KBN_ES_SNAPSHOT_USE_UNVERIFIED = 'true' - library 'kibana-pipeline-library' kibanaLibrary.load()