From 0a1c0f22f016c156d6c4368395c7ac1145a6de1e Mon Sep 17 00:00:00 2001 From: CJ Cenizal Date: Thu, 7 Oct 2021 16:35:34 -0700 Subject: [PATCH] Remove. --- .../upgrade_assistant/common/constants.ts | 1 - .../public/application/app.tsx | 2 -- .../public/application/lib/api.ts | 9 -------- .../server/routes/cluster_upgrade_status.ts | 21 ------------------- .../server/routes/register_routes.ts | 2 -- 5 files changed, 35 deletions(-) delete mode 100644 x-pack/plugins/upgrade_assistant/server/routes/cluster_upgrade_status.ts diff --git a/x-pack/plugins/upgrade_assistant/common/constants.ts b/x-pack/plugins/upgrade_assistant/common/constants.ts index e9bc9b7b7f07d82..629e7a725efaa28 100644 --- a/x-pack/plugins/upgrade_assistant/common/constants.ts +++ b/x-pack/plugins/upgrade_assistant/common/constants.ts @@ -38,6 +38,5 @@ export const DEPRECATION_LOGS_SOURCE_ID = 'deprecation_logs'; export const DEPRECATION_LOGS_INDEX = '.logs-deprecation.elasticsearch-default'; export const DEPRECATION_LOGS_INDEX_PATTERN = '.logs-deprecation.elasticsearch-default'; -export const CLUSTER_UPGRADE_STATUS_POLL_INTERVAL_MS = 45000; export const CLOUD_BACKUP_STATUS_POLL_INTERVAL_MS = 60000; export const DEPRECATION_LOGS_COUNT_POLL_INTERVAL_MS = 15000; diff --git a/x-pack/plugins/upgrade_assistant/public/application/app.tsx b/x-pack/plugins/upgrade_assistant/public/application/app.tsx index fd082e35cd90dff..aa518e526c08258 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/app.tsx +++ b/x-pack/plugins/upgrade_assistant/public/application/app.tsx @@ -27,8 +27,6 @@ const App: React.FunctionComponent = () => { services: { api }, } = useAppContext(); - api.useClusterUpgradeStatus(); - const [clusterUpgradeState, setClusterUpradeState] = useState('isPreparingForUpgrade'); diff --git a/x-pack/plugins/upgrade_assistant/public/application/lib/api.ts b/x-pack/plugins/upgrade_assistant/public/application/lib/api.ts index b4f38d19c52904a..fa4e68a0256358d 100644 --- a/x-pack/plugins/upgrade_assistant/public/application/lib/api.ts +++ b/x-pack/plugins/upgrade_assistant/public/application/lib/api.ts @@ -15,7 +15,6 @@ import { } from '../../../common/types'; import { API_BASE_PATH, - CLUSTER_UPGRADE_STATUS_POLL_INTERVAL_MS, DEPRECATION_LOGS_COUNT_POLL_INTERVAL_MS, CLOUD_BACKUP_STATUS_POLL_INTERVAL_MS, } from '../../../common/constants'; @@ -72,14 +71,6 @@ export class ApiService { this.clusterUpgradeStateListeners.push(listener); } - public useClusterUpgradeStatus() { - return this.useRequest({ - path: `${API_BASE_PATH}/cluster_upgrade_status`, - method: 'get', - pollIntervalMs: CLUSTER_UPGRADE_STATUS_POLL_INTERVAL_MS, - }); - } - public useLoadCloudBackupStatus() { return this.useRequest({ path: `${API_BASE_PATH}/cloud_backup_status`, diff --git a/x-pack/plugins/upgrade_assistant/server/routes/cluster_upgrade_status.ts b/x-pack/plugins/upgrade_assistant/server/routes/cluster_upgrade_status.ts deleted file mode 100644 index 4ae1205d2daef4c..000000000000000 --- a/x-pack/plugins/upgrade_assistant/server/routes/cluster_upgrade_status.ts +++ /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 - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { API_BASE_PATH } from '../../common/constants'; -import { versionCheckHandlerWrapper } from '../lib/es_version_precheck'; -import { RouteDependencies } from '../types'; - -export function registerClusterUpgradeStatusRoutes({ router }: RouteDependencies) { - router.get( - { path: `${API_BASE_PATH}/cluster_upgrade_status`, validate: false }, - // We're just depending on the version check to return a 426. - // Otherwise we just return a 200. - versionCheckHandlerWrapper(async (context, request, response) => { - return response.ok(); - }) - ); -} diff --git a/x-pack/plugins/upgrade_assistant/server/routes/register_routes.ts b/x-pack/plugins/upgrade_assistant/server/routes/register_routes.ts index cd14b35cc386966..cc4be5404258361 100644 --- a/x-pack/plugins/upgrade_assistant/server/routes/register_routes.ts +++ b/x-pack/plugins/upgrade_assistant/server/routes/register_routes.ts @@ -9,7 +9,6 @@ import { RouteDependencies } from '../types'; import { registerAppRoutes } from './app'; import { registerCloudBackupStatusRoutes } from './cloud_backup_status'; -import { registerClusterUpgradeStatusRoutes } from './cluster_upgrade_status'; import { registerESDeprecationRoutes } from './es_deprecations'; import { registerDeprecationLoggingRoutes } from './deprecation_logging'; import { registerReindexIndicesRoutes, registerBatchReindexIndicesRoutes } from './reindex_indices'; @@ -22,7 +21,6 @@ import { registerUpgradeStatusRoute } from './status'; export function registerRoutes(dependencies: RouteDependencies, getWorker: () => ReindexWorker) { registerAppRoutes(dependencies); registerCloudBackupStatusRoutes(dependencies); - registerClusterUpgradeStatusRoutes(dependencies); registerESDeprecationRoutes(dependencies); registerDeprecationLoggingRoutes(dependencies); registerReindexIndicesRoutes(dependencies, getWorker);