Skip to content

Commit

Permalink
[8.x] [ilm] Remove observability solution dependency on index lifecyc…
Browse files Browse the repository at this point in the history
…le management plugin bundle (#199383) (#199986)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ilm] Remove observability solution dependency on index lifecycle
management plugin bundle
(#199383)](#199383)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Matthew
Kime","email":"matt@mattki.me"},"sourceCommit":{"committedDate":"2024-11-11T02:18:49Z","message":"[ilm]
Remove observability solution dependency on index lifecycle management
plugin bundle (#199383)\n\nCreate package for observability solution's
dependencies from index\r\nlifecycle management. Previously it relied on
the plugin bundle but\r\nthats best avoided with our sustainable
architecture efforts.\r\n\r\nPart of
https://github.com/elastic/kibana-team/issues/1179\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d8055465071542e84059250aecc8f8fc81bf72f4","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:ILM","Team:Kibana
Management","release_note:skip","backport
missing","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management"],"number":199383,"url":"https://github.com/elastic/kibana/pull/199383","mergeCommit":{"message":"[ilm]
Remove observability solution dependency on index lifecycle management
plugin bundle (#199383)\n\nCreate package for observability solution's
dependencies from index\r\nlifecycle management. Previously it relied on
the plugin bundle but\r\nthats best avoided with our sustainable
architecture efforts.\r\n\r\nPart of
https://github.com/elastic/kibana-team/issues/1179\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d8055465071542e84059250aecc8f8fc81bf72f4"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/199383","number":199383,"mergeCommit":{"message":"[ilm]
Remove observability solution dependency on index lifecycle management
plugin bundle (#199383)\n\nCreate package for observability solution's
dependencies from index\r\nlifecycle management. Previously it relied on
the plugin bundle but\r\nthats best avoided with our sustainable
architecture efforts.\r\n\r\nPart of
https://github.com/elastic/kibana-team/issues/1179\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d8055465071542e84059250aecc8f8fc81bf72f4"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
mattkime and kibanamachine authored Nov 14, 2024
1 parent 58c23ab commit 5ac9227
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 8 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,7 @@
"@kbn/iframe-embedded-plugin": "link:x-pack/test/functional_embedded/plugins/iframe_embedded",
"@kbn/image-embeddable-plugin": "link:src/plugins/image_embeddable",
"@kbn/index-adapter": "link:packages/kbn-index-adapter",
"@kbn/index-lifecycle-management-common-shared": "link:x-pack/packages/index-lifecycle-management/index_lifecycle_management_common_shared",
"@kbn/index-lifecycle-management-plugin": "link:x-pack/plugins/index_lifecycle_management",
"@kbn/index-management-plugin": "link:x-pack/plugins/index_management",
"@kbn/index-management-shared-types": "link:x-pack/packages/index-management/index_management_shared_types",
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,8 @@
"@kbn/import-resolver/*": ["packages/kbn-import-resolver/*"],
"@kbn/index-adapter": ["packages/kbn-index-adapter"],
"@kbn/index-adapter/*": ["packages/kbn-index-adapter/*"],
"@kbn/index-lifecycle-management-common-shared": ["x-pack/packages/index-lifecycle-management/index_lifecycle_management_common_shared"],
"@kbn/index-lifecycle-management-common-shared/*": ["x-pack/packages/index-lifecycle-management/index_lifecycle_management_common_shared/*"],
"@kbn/index-lifecycle-management-plugin": ["x-pack/plugins/index_lifecycle_management"],
"@kbn/index-lifecycle-management-plugin/*": ["x-pack/plugins/index_lifecycle_management/*"],
"@kbn/index-management-plugin": ["x-pack/plugins/index_management"],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @kbn/index-lifecycle-management-common-shared

Contains types and functions used and exported by the index lifecycle management plugin. Primarily used to address dependency issues.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* 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.
*/

export const ILM_LOCATOR_ID = 'ILM_LOCATOR_ID';
export * from './src/policies';
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/index-lifecycle-management-common-shared",
"owner": "@elastic/kibana-management"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "@kbn/index-lifecycle-management-common-shared",
"private": true,
"version": "1.0.0",
"license": "Elastic License 2.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"extends": "../../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"jest",
"node",
"react"
]
},
"include": [
"**/*.ts",
"**/*.tsx"
],
"exclude": [
"target/**/*"
],
"kbn_references": [
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

export * from './api';

export * from './policies';
export * from '@kbn/index-lifecycle-management-common-shared';

/**
* These roles reflect how nodes are stratified into different data tiers.
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/index_lifecycle_management/public/locator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
import type { SerializableRecord } from '@kbn/utility-types';
import { ManagementAppLocator } from '@kbn/management-plugin/common';
import { LocatorDefinition } from '@kbn/share-plugin/public';
import { ILM_LOCATOR_ID } from '@kbn/index-lifecycle-management-common-shared';
import {
getPoliciesListPath,
getPolicyCreatePath,
getPolicyEditPath,
} from './application/services/navigation';
import { PLUGIN } from '../common/constants';

export const ILM_LOCATOR_ID = 'ILM_LOCATOR_ID';
export { ILM_LOCATOR_ID };

export interface IlmLocatorParams extends SerializableRecord {
page: 'policies_list' | 'policy_edit' | 'policy_create';
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/index_lifecycle_management/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@kbn/react-kibana-context-render",
"@kbn/unsaved-changes-prompt",
"@kbn/shared-ux-table-persist",
"@kbn/index-lifecycle-management-common-shared",
],
"exclude": [
"target/**/*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@
"kibanaUtils",
"observability",
"spaces",
"indexLifecycleManagement",
"unifiedDocViewer"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { PolicyFromES } from '@kbn/index-lifecycle-management-plugin/common/types';
import { PolicyFromES } from '@kbn/index-lifecycle-management-common-shared';
import { DataStream } from '@kbn/index-management-plugin/common';
import { CatIndicesResponse } from '@elastic/elasticsearch/lib/api/types';
import { apiService } from '../../../../../utils/api_service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import React from 'react';
import { EuiIconTip, EuiLink, EuiSkeletonText, EuiToolTip, EuiText } from '@elastic/eui';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { ILM_LOCATOR_ID } from '@kbn/index-lifecycle-management-plugin/public';
import { ILM_LOCATOR_ID } from '@kbn/index-lifecycle-management-common-shared';
import { useFetcher } from '@kbn/observability-shared-plugin/public';
import { i18n } from '@kbn/i18n';
import { useSyntheticsSettingsContext } from '../../contexts';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"@kbn/observability-plugin",
"@kbn/fleet-plugin",
"@kbn/unified-search-plugin",
"@kbn/index-lifecycle-management-plugin",
"@kbn/i18n",
"@kbn/core",
"@kbn/config-schema",
Expand Down Expand Up @@ -105,7 +104,8 @@
"@kbn/slo-plugin",
"@kbn/ebt-tools",
"@kbn/alerting-types",
"@kbn/core-chrome-browser"
"@kbn/core-chrome-browser",
"@kbn/index-lifecycle-management-common-shared"
],
"exclude": ["target/**/*"]
}
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5330,6 +5330,10 @@
version "0.0.0"
uid ""

"@kbn/index-lifecycle-management-common-shared@link:x-pack/packages/index-lifecycle-management/index_lifecycle_management_common_shared":
version "0.0.0"
uid ""

"@kbn/index-lifecycle-management-plugin@link:x-pack/plugins/index_lifecycle_management":
version "0.0.0"
uid ""
Expand Down

0 comments on commit 5ac9227

Please sign in to comment.