kibana/packages
Kibana Machine 3692688d01
[8.7] [performance] enable journey run against cloud deployments (#156720) (#157122)
# Backport

This will backport the following commits from `main` to `8.7`:
- [[performance] enable journey run against cloud deployments
(#156720)](https://github.com/elastic/kibana/pull/156720)

<!--- Backport version: 8.9.7 -->

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

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2023-05-09T03:35:43Z","message":"[performance]
enable journey run against cloud deployments (#156720)\n\n##
Summary\r\n\r\nThis PR adds changes and instructions how to run existing
performance\r\njourneys against ESS instances.\r\n\r\nAs previously
discussed with @pheyos , there are few manual steps to be\r\ndone before
running the actual journey:\r\n1. Create cloud deployment and
re-configure it the way APM traces are\r\nreported the monitoring
cluster\r\n2. Check out the branch matching deployment version (main
->\r\n8.9.0-SNAPSHOT), create user with `superuser` role (we don't
test\r\nfunctional features, only performance metrics)\r\n\r\nThen you
can run the journey like a regular cloud test suite:\r\n```\r\nexport
TEST_KIBANA_URL=https://<username>:<password>@<kibana_url>\r\nexport
TEST_ES_URL=https://<username>:<password>@j<elasticsearch_url>:<port>\r\nexport
TEST_CLOUD=1\r\nnode scripts/functional_test_runner.js --config
x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts\r\n```\r\n\r\n<img
width=\"1357\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/10977896/236499836-2738fecb-a5a9-4e58-a10b-915b962af037.png\">\r\n\r\n---------\r\n\r\nCo-authored-by:
Jon
<jon@budzenski.me>","sha":"e55a92eab0ae28799b51238fb76efa6026673e6e","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","wg:performance","v8.7.2","v8.9.0","v8.8.1"],"number":156720,"url":"https://github.com/elastic/kibana/pull/156720","mergeCommit":{"message":"[performance]
enable journey run against cloud deployments (#156720)\n\n##
Summary\r\n\r\nThis PR adds changes and instructions how to run existing
performance\r\njourneys against ESS instances.\r\n\r\nAs previously
discussed with @pheyos , there are few manual steps to be\r\ndone before
running the actual journey:\r\n1. Create cloud deployment and
re-configure it the way APM traces are\r\nreported the monitoring
cluster\r\n2. Check out the branch matching deployment version (main
->\r\n8.9.0-SNAPSHOT), create user with `superuser` role (we don't
test\r\nfunctional features, only performance metrics)\r\n\r\nThen you
can run the journey like a regular cloud test suite:\r\n```\r\nexport
TEST_KIBANA_URL=https://<username>:<password>@<kibana_url>\r\nexport
TEST_ES_URL=https://<username>:<password>@j<elasticsearch_url>:<port>\r\nexport
TEST_CLOUD=1\r\nnode scripts/functional_test_runner.js --config
x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts\r\n```\r\n\r\n<img
width=\"1357\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/10977896/236499836-2738fecb-a5a9-4e58-a10b-915b962af037.png\">\r\n\r\n---------\r\n\r\nCo-authored-by:
Jon
<jon@budzenski.me>","sha":"e55a92eab0ae28799b51238fb76efa6026673e6e"}},"sourceBranch":"main","suggestedTargetBranches":["8.7","8.8"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156720","number":156720,"mergeCommit":{"message":"[performance]
enable journey run against cloud deployments (#156720)\n\n##
Summary\r\n\r\nThis PR adds changes and instructions how to run existing
performance\r\njourneys against ESS instances.\r\n\r\nAs previously
discussed with @pheyos , there are few manual steps to be\r\ndone before
running the actual journey:\r\n1. Create cloud deployment and
re-configure it the way APM traces are\r\nreported the monitoring
cluster\r\n2. Check out the branch matching deployment version (main
->\r\n8.9.0-SNAPSHOT), create user with `superuser` role (we don't
test\r\nfunctional features, only performance metrics)\r\n\r\nThen you
can run the journey like a regular cloud test suite:\r\n```\r\nexport
TEST_KIBANA_URL=https://<username>:<password>@<kibana_url>\r\nexport
TEST_ES_URL=https://<username>:<password>@j<elasticsearch_url>:<port>\r\nexport
TEST_CLOUD=1\r\nnode scripts/functional_test_runner.js --config
x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts\r\n```\r\n\r\n<img
width=\"1357\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/10977896/236499836-2738fecb-a5a9-4e58-a10b-915b962af037.png\">\r\n\r\n---------\r\n\r\nCo-authored-by:
Jon
<jon@budzenski.me>","sha":"e55a92eab0ae28799b51238fb76efa6026673e6e"}},{"branch":"8.8","label":"v8.8.1","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2023-05-08 21:43:31 -07:00
..
analytics [8.7] [FullStory] Update snippet (#153570) (#155138) 2023-04-18 05:10:38 -07:00
content-management [codeowners] rename global experience to @elastic/appex-sharedux 2023-01-18 10:02:49 -07:00
core [8.7] [Unified search] Fixes the comma delimeter copy paste on multifields (#153772) (#153918) 2023-03-29 02:11:19 -07:00
home [codeowners] rename global experience to @elastic/appex-sharedux 2023-01-18 10:02:49 -07:00
kbn-ace Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-alerts Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-alerts-ui-shared [RAM] Bring flapping status and settings in o11y (#150483) 2023-02-07 20:52:26 -07:00
kbn-ambient-common-types Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ambient-ftr-types Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ambient-storybook-types Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ambient-ui-types Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-analytics Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-apm-config-loader [8.7] Config loader: remove unecessary properties (#154902) (#155006) 2023-04-17 01:34:53 -07:00
kbn-apm-synthtrace [APM] Service metrics/continuous rollups follow-up work (#150266) 2023-02-07 15:29:47 +01:00
kbn-apm-synthtrace-client [8.7] [APM] Make sure scoring is applied by ES (#154627) (#154724) 2023-04-12 03:47:41 -07:00
kbn-apm-utils Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-axe-config Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-babel-plugin-package-imports Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-babel-preset [Security Solution] Data Quality dashboard (#150063) 2023-02-06 21:10:43 -07:00
kbn-babel-register [kbn/babel-register] improve cache performance (#150261) 2023-02-06 19:50:42 -07:00
kbn-babel-transform [@kbn/babel-register] ensure that source maps are included inline (#148407) 2023-01-04 12:30:49 -07:00
kbn-bazel-runner Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-cases-components [Cases] add tooltip component to kbn-cases-components package (#148561) 2023-01-17 14:24:50 +01:00
kbn-cell-actions [CellActions] Support for empty value in addToTimeline action (#149527) 2023-01-27 05:14:32 -07:00
kbn-chart-icons Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ci-stats-core Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ci-stats-performance-metrics Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ci-stats-reporter Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ci-stats-shipper-cli [ci-stats] move shipper to a package, validate limits in on-merge job (#149474) 2023-01-25 08:20:40 -07:00
kbn-cli-dev-mode [kbn/babel-register] improve cache performance (#150261) 2023-02-06 19:50:42 -07:00
kbn-coloring Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-config [8.7] Config loader: remove unecessary properties (#154902) (#155006) 2023-04-17 01:34:53 -07:00
kbn-config-mocks implement "plugin" package type (#149370) 2023-01-30 10:47:53 -07:00
kbn-config-schema Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-crypto Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-crypto-browser Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-cypress-config Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-datemath Update codeowners to move AppServices packages to DataDiscovery (#149065) 2023-01-18 13:34:28 -07:00
kbn-dev-cli-errors Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-dev-cli-runner Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-dev-proc-runner Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-dev-utils [ci-stats] move shipper to a package, validate limits in on-merge job (#149474) 2023-01-25 08:20:40 -07:00
kbn-doc-links [8.7] [ML] Adds function reference help text to advanced wiz (#153009) (#153434) 2023-03-22 05:33:15 -07:00
kbn-docs-utils [docs-utils] remove extra api_docs dir (#148658) 2023-01-10 12:20:35 -07:00
kbn-ebt-tools Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ecs Replace ecs package with ecs-typescript generated code (#148804) 2023-01-26 07:10:32 +01:00
kbn-es [kbn/es] Add dev docs for snapshot promotion pipeline (#148350) 2023-01-05 12:45:34 -06:00
kbn-es-archiver Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-es-errors Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-es-query [8.7] [Dashboard] fix searchSessionId not updated when pinned filter changes (#151390) (#151742) 2023-02-21 10:39:00 -07:00
kbn-es-types [APM] Use (rolled up) service metrics for service inventory (#149938) 2023-02-04 04:00:25 -07:00
kbn-eslint-config [Security Solution] Data Quality dashboard (#150063) 2023-02-06 21:10:43 -07:00
kbn-eslint-plugin-disable Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-eslint-plugin-eslint Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-eslint-plugin-imports [presUtils/fleet] stop importing test helpers in bundles (#148825) 2023-01-12 15:11:30 -07:00
kbn-expect Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-failed-test-reporter-cli [8.7] [kbn-failed-test-reporter-cli] truncate report message to fix github api call failure (#155141) (#155286) 2023-04-19 08:48:44 -07:00
kbn-field-types Update codeowners to move AppServices packages to DataDiscovery (#149065) 2023-01-18 13:34:28 -07:00
kbn-find-used-node-modules Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-flot-charts Fix useless regex escapes (#150043) 2023-02-07 09:58:47 -07:00
kbn-ftr-common-functional-services Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ftr-screenshot-filename Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-generate Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-get-repo-files [tsProjects] auto-rebuild tsconfig-paths.json cache (#148743) 2023-01-11 16:09:11 -07:00
kbn-guided-onboarding [8.7] [Cloud Security] fixed onboarding link directs to cspm integration (#153268) (#154205) 2023-04-02 15:39:28 -07:00
kbn-handlebars [8.7] [@kbn/handlebars] Refactor types (#150520) (#151127) 2023-02-14 06:44:59 -07:00
kbn-hapi-mocks Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-health-gateway-server implement "plugin" package type (#149370) 2023-01-30 10:47:53 -07:00
kbn-i18n Downgrade Node.js to version 16 (#149531) 2023-01-26 11:53:52 +00:00
kbn-i18n-react Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-import-locator Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-import-resolver switch out chokidar for @parcel/watcher in dev cli (#148924) 2023-01-13 16:42:13 -07:00
kbn-interpreter [8.7] Fix eslint rule for restricting certain lodash imports (#151023) (#151495) 2023-02-17 03:16:52 -07:00
kbn-io-ts-utils Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-jest-serializers Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-journeys [8.7] [performance] enable journey run against cloud deployments (#156720) (#157122) 2023-05-08 21:43:31 -07:00
kbn-json-ast Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-kibana-manifest-schema implement "plugin" package type (#149370) 2023-01-30 10:47:53 -07:00
kbn-language-documentation-popover Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-lint-packages-cli [packages] prevent and remove basename collisions for js/ts code (#148835) 2023-01-12 12:29:30 -07:00
kbn-lint-ts-projects-cli Move real plugins out of 'fixtures' dirs (#148756) 2023-01-12 12:38:49 -07:00
kbn-logging Replace ecs package with ecs-typescript generated code (#148804) 2023-01-26 07:10:32 +01:00
kbn-logging-mocks Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-managed-vscode-config Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-managed-vscode-config-cli Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-mapbox-gl Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-monaco Downgrade Node.js to version 16 (#149531) 2023-01-26 11:53:52 +00:00
kbn-optimizer [8.7] [Vega] Upgrade to 5.24.0 (#152984) (#153055) 2023-03-09 13:10:44 -07:00
kbn-optimizer-webpack-helpers Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-osquery-io-ts-types [Osquery] Substitute Event Data in place of {{parameter}} in Osquery run from Alerts (#146598) 2023-01-05 15:49:40 +01:00
kbn-peggy Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-peggy-loader Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-performance-testing-dataset-extractor [8.7] [performance] use journey own ftr config to run scalability test (#152596) (#152806) 2023-03-07 06:30:23 -07:00
kbn-picomatcher Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-plugin-discovery Move real plugins out of 'fixtures' dirs (#148756) 2023-01-12 12:38:49 -07:00
kbn-plugin-generator [8.7] [@kbn/plugin-generator] Skip .i18nrc.json for internal plugins (#150556) (#150695) 2023-02-09 10:50:14 -07:00
kbn-plugin-helpers Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-react-field [UnifiedFieldList] Support more field type icons and descriptions (#149416) 2023-01-30 03:07:17 -07:00
kbn-repo-file-maps Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-repo-info Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-repo-linter Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-repo-packages implement "plugin" package type (#149370) 2023-01-30 10:47:53 -07:00
kbn-repo-path [packages] prevent and remove basename collisions for js/ts code (#148835) 2023-01-12 12:29:30 -07:00
kbn-repo-source-classifier implement "plugin" package type (#149370) 2023-01-30 10:47:53 -07:00
kbn-repo-source-classifier-cli Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-rison [Security Solution] Global query string functionality improvements (#147218) 2023-01-05 18:02:12 +01:00
kbn-rule-data-utils [Security Solution][Alerts] Alert suppression time window (#148868) 2023-01-30 13:11:13 -08:00
kbn-safer-lodash-set [8.7] Fix eslint rule for restricting certain lodash imports (#151023) (#151495) 2023-02-17 03:16:52 -07:00
kbn-securitysolution-autocomplete [8.7] [Security Solution][Alerts] Update mapping conflicts warning message (#152726) (#152755) 2023-03-06 13:02:41 -07:00
kbn-securitysolution-ecs [Security Solution] Security Common Schema Package (#148664) 2023-01-23 10:07:08 -07:00
kbn-securitysolution-es-utils Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-securitysolution-exception-list-components [8.7] [Security Solution][Exceptions] - Fix breadcrumbs text for shared exception list (#152629) (#152764) 2023-03-06 15:50:06 -07:00
kbn-securitysolution-hook-utils Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-securitysolution-io-ts-alerting-types chore(NA): upgrades uuid to v9.0.0 (#149135) 2023-01-19 19:48:07 +00:00
kbn-securitysolution-io-ts-list-types [8.7] [Security Solution] Exceptions TTL Follow-up (#151952) (#152645) 2023-03-03 19:25:07 -07:00
kbn-securitysolution-io-ts-types [Security Solution][Platform] - Add connectors to import/export API (#148703) 2023-02-06 16:47:22 +00:00
kbn-securitysolution-io-ts-utils Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-securitysolution-list-api [Security Solution][Exceptions] Rule exceptions TTL - Expiration (#145180) 2023-02-07 16:20:39 -05:00
kbn-securitysolution-list-constants Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-securitysolution-list-hooks [Security Solution][Exceptions] Rule exceptions TTL - Expiration (#145180) 2023-02-07 16:20:39 -05:00
kbn-securitysolution-list-utils [8.7] [Security Solution][Exceptions] - Fix exception operator logic when mapping conflict (#155071) (#155094) 2023-04-17 18:50:06 -07:00
kbn-securitysolution-rules Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-securitysolution-t-grid Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-securitysolution-utils chore(NA): upgrades uuid to v9.0.0 (#149135) 2023-01-19 19:48:07 +00:00
kbn-server-http-tools chore(NA): upgrades uuid to v9.0.0 (#149135) 2023-01-19 19:48:07 +00:00
kbn-server-route-repository Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-set-map Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-shared-svg Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-shared-ux-utility [codeowners] rename global experience to @elastic/appex-sharedux 2023-01-18 10:02:49 -07:00
kbn-slo-schema feat(slo): manage slo state (#149546) 2023-01-30 11:02:33 -05:00
kbn-some-dev-log Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-sort-package-json [sort-package-json] always ensure 2-space indent is used 2023-01-10 10:39:48 -07:00
kbn-spec-to-console Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-std [8.7] Config loader: remove unecessary properties (#154902) (#155006) 2023-04-17 01:34:53 -07:00
kbn-stdio-dev-helpers Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-storybook [8.7] Upgrade vega dependency (5.22.15.23.0). (#152541) (#152700) (#152724) 2023-03-06 09:07:06 -07:00
kbn-telemetry-tools [Telemetry] Fix telemetry-tools TS parser for packages (#149819) 2023-01-31 04:09:09 +03:00
kbn-test [8.7] [ftr] fix scripts/functional_tests to respect cli flags (#155734) (#155907) 2023-04-26 10:49:13 -07:00
kbn-test-jest-helpers Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-test-subj-selector Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-timelion-grammar Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-tinymath Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-tooling-log Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ts-projects [tsProjects] auto-rebuild tsconfig-paths.json cache (#148743) 2023-01-11 16:09:11 -07:00
kbn-ts-type-check-cli Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
kbn-typed-react-router-config [APM] Add 404 page (#149471) 2023-02-02 13:52:51 -05:00
kbn-ui-actions-browser create @kbn/ui-actions-browser package (#149202) 2023-01-19 18:28:07 +01:00
kbn-ui-framework Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-ui-shared-deps-npm Downgrade Node.js to version 16 (#149531) 2023-01-26 11:53:52 +00:00
kbn-ui-shared-deps-src Downgrade Node.js to version 16 (#149531) 2023-01-26 11:53:52 +00:00
kbn-ui-theme Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-user-profile-components Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-utility-types Replace ecs package with ecs-typescript generated code (#148804) 2023-01-26 07:10:32 +01:00
kbn-utility-types-jest Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-utils Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-web-worker-stub Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
kbn-whereis-pkg-cli chore(NA): adds @kbn/whereis-pkg-cli to quickly find a pkg location (#148696) 2023-01-13 17:45:24 -07:00
kbn-yarn-lock-validator Implement package linter (#148496) 2023-01-09 16:49:29 -07:00
shared-ux [Fix] fix broken story in Prompt Custom Actions (#149992) 2023-02-06 09:21:48 -07:00
README.md create @kbn/ui-actions-browser package (#149202) 2023-01-19 18:28:07 +01:00

Kibana-related packages

This folder contains packages that are intended for use in Kibana and Kibana plugins.

tl;dr:

  • Don't publish to npm registry
  • Always use the @kbn namespace
  • Always set "private": true in package.json

Using these packages

We no longer publish these packages to the npm registry. Now, instead of specifying a version when including these packages, we rely on yarn workspaces, which sets up a symlink to the package.

For example if you want to use the @kbn/i18n package in Kibana itself, you can specify the dependency like this:

"@kbn/i18n": "1.0.0"

However, if you want to use this from a Kibana plugin, you need to use a link: dependency and account for the relative location of the Kibana repo, so it would instead be:

"@kbn/i18n": "link:../../kibana/packages/kbn-i18n"

then run yarn kbn bootstrap from the plugin directory.

Creating a new package

Run the following command from the root of the Kibana repo:

node scripts/generate package @kbn/<PACKAGE_NAME> --web --owner @elastic/<TEAM_NAME>

Unit tests for a package

Currently there is only one tool being used in order to test packages which is Jest. Below we will explain how it should be done.

Jest

A package should follow the pattern of having .test.js files as siblings of the source code files, and these run by Jest.

A package using the .test.js naming convention will have those tests automatically picked up by Jest and run by the unit test runner, currently mapped to the Kibana test script in the root package.json.

  • yarn test runs all unit tests.
  • yarn jest runs all Jest tests in Kibana.

In order for the plugin or package to use Jest, a jest.config.js file must be present in it's root. However, there are safeguards for this in CI should a test file be added without a corresponding config file.


Each package can also specify its own test script in the package's package.json, for cases where you'd prefer to run the tests from the local package directory.