[8.x] Relocating module @kbn/slo-plugin (#204265) (#204456)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Relocating module `@kbn/slo-plugin`
(#204265)](https://github.com/elastic/kibana/pull/204265)

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

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

<!--BACKPORT
[{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2024-12-16T16:35:31Z","message":"Relocating
module `@kbn/slo-plugin` (#204265)\n\n## Summary\r\n\r\nPR has been
generated with script `node scripts/relocate
--team\r\n\"@elastic/obs-ux-management-team\"`\r\n\r\nRelocating module
`@kbn/slo-plugin`\r\n\r\nWe are facing emotion issues that we need to
fix !!\r\n\r\nWe need to figure out why app is broken after relocating
with
following\r\nerror\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/0e9de89c-7044-4099-bb05-c5ebf21f77c4)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Kevin Delemme
<kevin.delemme@elastic.co>","sha":"984a059e67c774243adc77f6291a45eda9e8fd12","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor"],"number":204265,"url":"https://github.com/elastic/kibana/pull/204265","mergeCommit":{"message":"Relocating
module `@kbn/slo-plugin` (#204265)\n\n## Summary\r\n\r\nPR has been
generated with script `node scripts/relocate
--team\r\n\"@elastic/obs-ux-management-team\"`\r\n\r\nRelocating module
`@kbn/slo-plugin`\r\n\r\nWe are facing emotion issues that we need to
fix !!\r\n\r\nWe need to figure out why app is broken after relocating
with
following\r\nerror\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/0e9de89c-7044-4099-bb05-c5ebf21f77c4)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Kevin Delemme
<kevin.delemme@elastic.co>","sha":"984a059e67c774243adc77f6291a45eda9e8fd12"}},"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/204265","number":204265,"mergeCommit":{"message":"Relocating
module `@kbn/slo-plugin` (#204265)\n\n## Summary\r\n\r\nPR has been
generated with script `node scripts/relocate
--team\r\n\"@elastic/obs-ux-management-team\"`\r\n\r\nRelocating module
`@kbn/slo-plugin`\r\n\r\nWe are facing emotion issues that we need to
fix !!\r\n\r\nWe need to figure out why app is broken after relocating
with
following\r\nerror\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/0e9de89c-7044-4099-bb05-c5ebf21f77c4)\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Kevin Delemme
<kevin.delemme@elastic.co>","sha":"984a059e67c774243adc77f6291a45eda9e8fd12"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Shahzad 2024-12-17 13:37:58 +01:00 committed by GitHub
parent 40d7004ec0
commit 0a5e9da063
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
681 changed files with 113 additions and 105 deletions

View file

@ -20,7 +20,7 @@ disabled:
- x-pack/solutions/observability/plugins/synthetics/e2e/synthetics/synthetics_run.ts
- x-pack/solutions/observability/plugins/exploratory_view/e2e/synthetics_run.ts
- x-pack/solutions/observability/plugins/ux/e2e/synthetics_run.ts
- x-pack/plugins/observability_solution/slo/e2e/synthetics_run.ts
- x-pack/solutions/observability/plugins/slo/e2e/synthetics_run.ts
defaultQueue: 'n2-4-spot'
enabled:

View file

@ -14,7 +14,7 @@ steps:
- check_oas_snapshot
timeout_in_minutes: 30
artifact_paths:
- 'x-pack/plugins/observability_solution/slo/e2e/.journeys/**/*'
- 'x-pack/solutions/observability/plugins/slo/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'

View file

@ -14,4 +14,4 @@ echo "--- SLO @elastic/synthetics Tests"
cd "$XPACK_DIR"
node plugins/observability_solution/slo/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}
node solutions/observability/plugins/slo/scripts/e2e.js --kibana-install-dir "$KIBANA_BUILD_LOCATION" ${GREP:+--grep \"${GREP}\"}

View file

@ -918,7 +918,7 @@ module.exports = {
'x-pack/solutions/observability/plugins/observability/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/exploratory_view/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/ux/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability_solution/slo/**/*.{js,mjs,ts,tsx}',
'x-pack/solutions/observability/plugins/slo/**/*.{js,mjs,ts,tsx}',
'x-pack/packages/observability/**/*.{js,mjs,ts,tsx}',
],
rules: {
@ -938,7 +938,7 @@ module.exports = {
'x-pack/plugins/observability_solution/apm/**/*.stories.*',
'x-pack/solutions/observability/plugins/observability/**/*.stories.*',
'x-pack/solutions/observability/plugins/exploratory_view/**/*.stories.*',
'x-pack/plugins/observability_solution/slo/**/*.stories.*',
'x-pack/solutions/observability/plugins/slo/**/*.stories.*',
'x-pack/packages/observability/**/*.{js,mjs,ts,tsx}',
],
rules: {

2
.github/CODEOWNERS vendored
View file

@ -913,7 +913,7 @@ packages/shared-ux/storybook/mock @elastic/appex-sharedux
packages/shared-ux/modal/tabbed @elastic/appex-sharedux
packages/shared-ux/table_persist @elastic/appex-sharedux
packages/kbn-shared-ux-utility @elastic/appex-sharedux
x-pack/plugins/observability_solution/slo @elastic/obs-ux-management-team
x-pack/solutions/observability/plugins/slo @elastic/obs-ux-management-team
x-pack/platform/packages/shared/kbn-slo-schema @elastic/obs-ux-management-team
x-pack/platform/plugins/private/snapshot_restore @elastic/kibana-management
packages/kbn-some-dev-log @elastic/kibana-operations

View file

@ -20,7 +20,7 @@
- 'x-pack/test/fleet_api_integration/**/*.*'
- 'Team:obs-ux-management':
- 'x-pack/solutions/observability/plugins/observability/**/*.*'
- 'x-pack/plugins/observability_solution/slo/**/*.*'
- 'x-pack/solutions/observability/plugins/slo/**/*.*'
- 'x-pack/solutions/observability/plugins/synthetics/**/*.*'
- 'x-pack/solutions/observability/plugins/exploratory_view/**/*.*'
- 'Team:Obs AI Assistant':

View file

@ -894,7 +894,7 @@ This plugin is only enabled when the application is built for serverless project
|Session View is meant to provide a visualization into what is going on in a particular Linux environment where the agent is running. It looks likes a terminal emulator; however, it is a tool for introspecting process activity and understanding user and service behaviour in your Linux servers and infrastructure. It is a time-ordered series of process executions displayed in a tree over time.
|{kib-repo}blob/{branch}/x-pack/plugins/observability_solution/slo/README.md[slo]
|{kib-repo}blob/{branch}/x-pack/solutions/observability/plugins/slo/README.md[slo]
|A Kibana plugin

View file

@ -111,7 +111,7 @@ actions:
# Infra metric threshold rule (metrics.alert.threshold)
- $ref: '../../x-pack/plugins/observability_solution/infra/server/lib/alerting/docs/params_property_infra_metric_threshold.yaml'
# SLO burn rate (slo.rules.burnRate)
- $ref: '../../x-pack/plugins/observability_solution/slo/server/lib/rules/slo_burn_rate/docs/params_property_slo_burn_rate.yaml'
- $ref: '../../x-pack/solutions/observability/plugins/slo/server/lib/rules/slo_burn_rate/docs/params_property_slo_burn_rate.yaml'
# Synthetics uptime TLS rule (xpack.uptime.alerts.tls)
- $ref: '../../x-pack/solutions/observability/plugins/uptime/server/legacy_uptime/lib/alerts/docs/params_property_synthetics_uptime_tls.yaml'
# Uptime monitor status rule (xpack.uptime.alerts.monitorStatus)

View file

@ -24,7 +24,7 @@ const { REPO_ROOT } = require('@kbn/repo-info');
// Observability Solution
`${REPO_ROOT}/x-pack/plugins/observability_solution/apm/docs/openapi/apm/bundled.yaml`,
`${REPO_ROOT}/x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml`,
`${REPO_ROOT}/x-pack/solutions/observability/plugins/slo/docs/openapi/slo/bundled.yaml`,
// Security solution
`${REPO_ROOT}/x-pack/plugins/security_solution/docs/openapi/ess/*.schema.yaml`,

View file

@ -0,0 +1,8 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

View file

@ -925,7 +925,7 @@
"@kbn/shared-ux-tabbed-modal": "link:packages/shared-ux/modal/tabbed",
"@kbn/shared-ux-table-persist": "link:packages/shared-ux/table_persist",
"@kbn/shared-ux-utility": "link:packages/kbn-shared-ux-utility",
"@kbn/slo-plugin": "link:x-pack/plugins/observability_solution/slo",
"@kbn/slo-plugin": "link:x-pack/solutions/observability/plugins/slo",
"@kbn/slo-schema": "link:x-pack/platform/packages/shared/kbn-slo-schema",
"@kbn/snapshot-restore-plugin": "link:x-pack/platform/plugins/private/snapshot_restore",
"@kbn/sort-predicates": "link:packages/kbn-sort-predicates",

View file

@ -15,7 +15,7 @@ module.exports = {
USES_STYLED_COMPONENTS: [
/packages[\/\\]kbn-ui-shared-deps-(npm|src)[\/\\]/,
/src[\/\\]plugins[\/\\](kibana_react)[\/\\]/,
/x-pack[\/\\]solutions[\/\\]observability[\/\\]plugins[\/\\]/,
/x-pack[\/\\]solutions[\/\\]observability[\/\\]plugins[\/\\](exploratory_view|investigate|investigate_app|observability|observability_ai_assistant_app|observability_ai_assistant_management|observability_solution|serverless_observability|streams|streams_app|synthetics|uptime|ux|infra)[\/\\]/,
/x-pack[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|fleet|observability_solution\/infra|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/,
/x-pack[\/\\]solutions[\/\\]security[\/\\]plugins[\/\\](observability_solution\/apm|beats_management|fleet|observability_solution\/infra|lists|observability_solution\/observability|observability_solution\/observability_shared|observability_solution\/exploratory_view|security_solution|timelines|observability_solution\/synthetics|observability_solution\/ux|observability_solution\/uptime)[\/\\]/,
/x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/,

View file

@ -57,7 +57,7 @@ export const storybookAliases = {
observability_ai_assistant_app:
'x-pack/solutions/observability/plugins/observability_ai_assistant_app/.storybook',
observability_shared: 'x-pack/plugins/observability_solution/observability_shared/.storybook',
observability_slo: 'x-pack/plugins/observability_solution/slo/.storybook',
observability_slo: 'x-pack/solutions/observability/plugins/slo/.storybook',
presentation: 'src/plugins/presentation_util/storybook',
random_sampling: 'x-pack/packages/kbn-random-sampling/.storybook',
esql_editor: 'src/platform/packages/private/kbn-esql-editor/.storybook',
@ -65,7 +65,7 @@ export const storybookAliases = {
security_solution_packages: 'x-pack/solutions/security/packages/storybook/config',
serverless: 'packages/serverless/storybook/config',
shared_ux: 'packages/shared-ux/storybook/config',
slo: 'x-pack/plugins/observability_solution/slo/.storybook',
slo: 'x-pack/solutions/observability/plugins/slo/.storybook',
threat_intelligence: 'x-pack/solutions/security/plugins/threat_intelligence/.storybook',
triggers_actions_ui: 'x-pack/plugins/triggers_actions_ui/.storybook',
ui_actions_enhanced: 'src/plugins/ui_actions_enhanced/.storybook',

View file

@ -1820,8 +1820,8 @@
"@kbn/shared-ux-table-persist/*": ["packages/shared-ux/table_persist/*"],
"@kbn/shared-ux-utility": ["packages/kbn-shared-ux-utility"],
"@kbn/shared-ux-utility/*": ["packages/kbn-shared-ux-utility/*"],
"@kbn/slo-plugin": ["x-pack/plugins/observability_solution/slo"],
"@kbn/slo-plugin/*": ["x-pack/plugins/observability_solution/slo/*"],
"@kbn/slo-plugin": ["x-pack/solutions/observability/plugins/slo"],
"@kbn/slo-plugin/*": ["x-pack/solutions/observability/plugins/slo/*"],
"@kbn/slo-schema": ["x-pack/platform/packages/shared/kbn-slo-schema"],
"@kbn/slo-schema/*": ["x-pack/platform/packages/shared/kbn-slo-schema/*"],
"@kbn/snapshot-restore-plugin": ["x-pack/platform/plugins/private/snapshot_restore"],

View file

@ -153,7 +153,7 @@
"xpack.streams": [
"solutions/observability/plugins/streams_app"
],
"xpack.slo": "plugins/observability_solution/slo",
"xpack.slo": "solutions/observability/plugins/slo",
"xpack.snapshotRestore": "platform/plugins/private/snapshot_restore",
"xpack.spaces": "plugins/spaces",
"xpack.savedObjectsTagging": [

View file

@ -131,6 +131,82 @@
}
}
}
},
"slo": {
"properties": {
"slo": {
"properties": {
"total": {
"type": "long",
"_meta": {
"description": "The total number of slos in the cluster"
}
},
"by_status": {
"properties": {
"enabled": {
"type": "long",
"_meta": {
"description": "The number of enabled slos in the cluster"
}
},
"disabled": {
"type": "long",
"_meta": {
"description": "The number of disabled slos in the cluster"
}
}
}
},
"by_sli_type": {
"properties": {
"DYNAMIC_KEY": {
"type": "long",
"_meta": {
"description": "The number of slos by sli type in the cluster"
}
}
}
},
"by_rolling_duration": {
"properties": {
"DYNAMIC_KEY": {
"type": "long",
"_meta": {
"description": "The number of slos by rolling duration in the cluster"
}
}
}
},
"by_calendar_aligned_duration": {
"properties": {
"DYNAMIC_KEY": {
"type": "long",
"_meta": {
"description": "The number of slos by calendar aligned duration in the cluster"
}
}
}
},
"by_budgeting_method": {
"properties": {
"occurrences": {
"type": "long",
"_meta": {
"description": "The number of slos by timeslices budgeting method in the cluster"
}
},
"timeslices": {
"type": "long",
"_meta": {
"description": "The number of slos by occurrences budgeting method in the cluster"
}
}
}
}
}
}
}
}
}
}

View file

@ -19428,82 +19428,6 @@
}
}
},
"slo": {
"properties": {
"slo": {
"properties": {
"total": {
"type": "long",
"_meta": {
"description": "The total number of slos in the cluster"
}
},
"by_status": {
"properties": {
"enabled": {
"type": "long",
"_meta": {
"description": "The number of enabled slos in the cluster"
}
},
"disabled": {
"type": "long",
"_meta": {
"description": "The number of disabled slos in the cluster"
}
}
}
},
"by_sli_type": {
"properties": {
"DYNAMIC_KEY": {
"type": "long",
"_meta": {
"description": "The number of slos by sli type in the cluster"
}
}
}
},
"by_rolling_duration": {
"properties": {
"DYNAMIC_KEY": {
"type": "long",
"_meta": {
"description": "The number of slos by rolling duration in the cluster"
}
}
}
},
"by_calendar_aligned_duration": {
"properties": {
"DYNAMIC_KEY": {
"type": "long",
"_meta": {
"description": "The number of slos by calendar aligned duration in the cluster"
}
}
}
},
"by_budgeting_method": {
"properties": {
"occurrences": {
"type": "long",
"_meta": {
"description": "The number of slos by timeslices budgeting method in the cluster"
}
},
"timeslices": {
"type": "long",
"_meta": {
"description": "The number of slos by occurrences budgeting method in the cluster"
}
}
}
}
}
}
}
},
"spaces": {
"properties": {
"usesFeatureControls": {

View file

@ -8,7 +8,7 @@ Starting in 8.8, SLO is enabled by default. SLO is GA since 8.12
1. Data generation
> [!TIP]
> The following commands uses [kbn-data-forge](../../../../platform/packages/shared/kbn-data-forge/README.md) to generate some data for developping or testing SLOs
> The following commands uses [kbn-data-forge](../../../../../platform/packages/shared/kbn-data-forge/README.md) to generate some data for developping or testing SLOs
Basic command to generate 7 days of data with a couple of services:
```sh

View file

@ -14,7 +14,7 @@ A guide about the OpenApi specification can be found at [https://swagger.io/docs
## Tools
It is possible to manually validate the docs before bundling them with the following
command in the `x-pack/plugins/observability_solution/slo/docs/openapi/slo` folder:
command in the `x-pack/solutions/observability/plugins/slo/docs/openapi/slo` folder:
```bash
make validate

View file

@ -1,5 +1,5 @@
{
"extends": "../../../../../tsconfig.base.json",
"extends": "../../../../../../tsconfig.base.json",
"exclude": ["tmp", "target/**/*"],
"include": ["**/*"],
"compilerOptions": {

View file

@ -7,13 +7,13 @@
module.exports = {
preset: '@kbn/test',
rootDir: '../../../..',
roots: ['<rootDir>/x-pack/plugins/observability_solution/slo'],
setupFiles: ['<rootDir>/x-pack/plugins/observability_solution/slo/.storybook/jest_setup.js'],
rootDir: '../../../../..',
roots: ['<rootDir>/x-pack/solutions/observability/plugins/slo'],
setupFiles: ['<rootDir>/x-pack/solutions/observability/plugins/slo/.storybook/jest_setup.js'],
coverageDirectory:
'<rootDir>/target/kibana-coverage/jest/x-pack/plugins/observability_solution/slo',
'<rootDir>/target/kibana-coverage/jest/x-pack/solutions/observability/plugins/slo',
coverageReporters: ['text', 'html'],
collectCoverageFrom: [
'<rootDir>/x-pack/plugins/observability_solution/slo/{common,public,server}/**/*.{js,ts,tsx}',
'<rootDir>/x-pack/solutions/observability/plugins/slo/{common,public,server}/**/*.{js,ts,tsx}',
],
};

Some files were not shown because too many files have changed in this diff Show more