mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-reporting-services
(#202741) (#204901)
# Backport This will backport the following commits from `main` to `8.x`: - [Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-reporting-services` (#202741)](https://github.com/elastic/kibana/pull/202741) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Gerard Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2024-12-18T01:49:07Z","message":"Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-reporting-services` (#202741)\n\n## Summary\r\n\r\nThis PR aims at relocating some of the Kibana modules (plugins and\r\npackages) into a new folder structure, according to the _Sustainable\r\nKibana Architecture_ initiative.\r\n\r\n> [!IMPORTANT]\r\n> * We kindly ask you to:\r\n> * Manually fix the errors in the error section below (if there are\r\nany).\r\n> * Search for the `packages[\\/\\\\]` and `plugins[\\/\\\\]` patterns in the\r\nsource code (Babel and Eslint config files), and update them\r\nappropriately.\r\n> * Manually review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that\r\nany CI pipeline customizations continue to be correctly applied after\r\nthe changed path names\r\n> * Review all of the updated files, specially the `.ts` and `.js` files\r\nlisted in the sections below, as some of them contain relative paths\r\nthat have been updated.\r\n> * Think of potential impact of the move, including tooling and\r\nconfiguration files that can be pointing to the relocated modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to source code\r\n\r\n> [!NOTE]\r\n> This PR has been auto-generated.\r\n> Do not attempt to push any changes unless you know what you are doing.\r\n> Please use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack channel for feedback.\r\n\r\n\r\n\r\n\r\n#### 1 plugin(s) are going to be relocated:\r\n\r\n| Id | Target folder |\r\n| -- | ------------- |\r\n| `@kbn/screenshotting-plugin` |\r\n`x-pack/platform/plugins/shared/screenshotting` |\r\n\r\n\r\n<details>\r\n<summary>Updated references</summary>\r\n\r\n```\r\n./docs/developer/plugin-list.asciidoc\r\n./package.json\r\n./packages/kbn-cli-dev-mode/src/watcher.ts\r\n./packages/kbn-repo-packages/package-map.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js\r\n./src/dev/precommit_hook/casing_check_config.js\r\n./tsconfig.base.json\r\n./x-pack/.gitignore\r\n./x-pack/.i18nrc.json\r\n./x-pack/platform/plugins/shared/screenshotting/README.md\r\n./x-pack/platform/plugins/shared/screenshotting/jest.config.js\r\n./x-pack/platform/plugins/shared/screenshotting/jest.integration.config.js\r\n./x-pack/platform/plugins/shared/screenshotting/server/screenshots/screenshots.test.ts\r\n./x-pack/plugins/lens/public/app_plugin/share_action.ts\r\n./yarn.lock\r\n```\r\n</details>\r\n<details>\r\n<summary>Updated relative paths</summary>\r\n\r\n```\r\nx-pack/platform/plugins/shared/screenshotting/jest.config.js:10\r\nx-pack/platform/plugins/shared/screenshotting/jest.integration.config.js:10\r\nx-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js:14\r\nx-pack/platform/plugins/shared/screenshotting/tsconfig.json:10\r\nx-pack/platform/plugins/shared/screenshotting/tsconfig.json:14\r\nx-pack/platform/plugins/shared/screenshotting/tsconfig.json:2\r\n```\r\n</details>\r\n<details>\r\n<summary>Script errors</summary>\r\n\r\n```\r\n\r\n```\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"0e2fc8f4e22a9dd41fc0b0f3c0ea2bd448a6c73e","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:prev-minor","Team:Reporting Services","plugin groups"],"number":202741,"url":"https://github.com/elastic/kibana/pull/202741","mergeCommit":{"message":"Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-reporting-services` (#202741)\n\n## Summary\r\n\r\nThis PR aims at relocating some of the Kibana modules (plugins and\r\npackages) into a new folder structure, according to the _Sustainable\r\nKibana Architecture_ initiative.\r\n\r\n> [!IMPORTANT]\r\n> * We kindly ask you to:\r\n> * Manually fix the errors in the error section below (if there are\r\nany).\r\n> * Search for the `packages[\\/\\\\]` and `plugins[\\/\\\\]` patterns in the\r\nsource code (Babel and Eslint config files), and update them\r\nappropriately.\r\n> * Manually review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that\r\nany CI pipeline customizations continue to be correctly applied after\r\nthe changed path names\r\n> * Review all of the updated files, specially the `.ts` and `.js` files\r\nlisted in the sections below, as some of them contain relative paths\r\nthat have been updated.\r\n> * Think of potential impact of the move, including tooling and\r\nconfiguration files that can be pointing to the relocated modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to source code\r\n\r\n> [!NOTE]\r\n> This PR has been auto-generated.\r\n> Do not attempt to push any changes unless you know what you are doing.\r\n> Please use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack channel for feedback.\r\n\r\n\r\n\r\n\r\n#### 1 plugin(s) are going to be relocated:\r\n\r\n| Id | Target folder |\r\n| -- | ------------- |\r\n| `@kbn/screenshotting-plugin` |\r\n`x-pack/platform/plugins/shared/screenshotting` |\r\n\r\n\r\n<details>\r\n<summary>Updated references</summary>\r\n\r\n```\r\n./docs/developer/plugin-list.asciidoc\r\n./package.json\r\n./packages/kbn-cli-dev-mode/src/watcher.ts\r\n./packages/kbn-repo-packages/package-map.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js\r\n./src/dev/precommit_hook/casing_check_config.js\r\n./tsconfig.base.json\r\n./x-pack/.gitignore\r\n./x-pack/.i18nrc.json\r\n./x-pack/platform/plugins/shared/screenshotting/README.md\r\n./x-pack/platform/plugins/shared/screenshotting/jest.config.js\r\n./x-pack/platform/plugins/shared/screenshotting/jest.integration.config.js\r\n./x-pack/platform/plugins/shared/screenshotting/server/screenshots/screenshots.test.ts\r\n./x-pack/plugins/lens/public/app_plugin/share_action.ts\r\n./yarn.lock\r\n```\r\n</details>\r\n<details>\r\n<summary>Updated relative paths</summary>\r\n\r\n```\r\nx-pack/platform/plugins/shared/screenshotting/jest.config.js:10\r\nx-pack/platform/plugins/shared/screenshotting/jest.integration.config.js:10\r\nx-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js:14\r\nx-pack/platform/plugins/shared/screenshotting/tsconfig.json:10\r\nx-pack/platform/plugins/shared/screenshotting/tsconfig.json:14\r\nx-pack/platform/plugins/shared/screenshotting/tsconfig.json:2\r\n```\r\n</details>\r\n<details>\r\n<summary>Script errors</summary>\r\n\r\n```\r\n\r\n```\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"0e2fc8f4e22a9dd41fc0b0f3c0ea2bd448a6c73e"}},"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/202741","number":202741,"mergeCommit":{"message":"Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-reporting-services` (#202741)\n\n## Summary\r\n\r\nThis PR aims at relocating some of the Kibana modules (plugins and\r\npackages) into a new folder structure, according to the _Sustainable\r\nKibana Architecture_ initiative.\r\n\r\n> [!IMPORTANT]\r\n> * We kindly ask you to:\r\n> * Manually fix the errors in the error section below (if there are\r\nany).\r\n> * Search for the `packages[\\/\\\\]` and `plugins[\\/\\\\]` patterns in the\r\nsource code (Babel and Eslint config files), and update them\r\nappropriately.\r\n> * Manually review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that\r\nany CI pipeline customizations continue to be correctly applied after\r\nthe changed path names\r\n> * Review all of the updated files, specially the `.ts` and `.js` files\r\nlisted in the sections below, as some of them contain relative paths\r\nthat have been updated.\r\n> * Think of potential impact of the move, including tooling and\r\nconfiguration files that can be pointing to the relocated modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to source code\r\n\r\n> [!NOTE]\r\n> This PR has been auto-generated.\r\n> Do not attempt to push any changes unless you know what you are doing.\r\n> Please use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack channel for feedback.\r\n\r\n\r\n\r\n\r\n#### 1 plugin(s) are going to be relocated:\r\n\r\n| Id | Target folder |\r\n| -- | ------------- |\r\n| `@kbn/screenshotting-plugin` |\r\n`x-pack/platform/plugins/shared/screenshotting` |\r\n\r\n\r\n<details>\r\n<summary>Updated references</summary>\r\n\r\n```\r\n./docs/developer/plugin-list.asciidoc\r\n./package.json\r\n./packages/kbn-cli-dev-mode/src/watcher.ts\r\n./packages/kbn-repo-packages/package-map.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/dev/code_coverage/ingest_coverage/__tests__/enumerate_patterns.test.js\r\n./src/dev/precommit_hook/casing_check_config.js\r\n./tsconfig.base.json\r\n./x-pack/.gitignore\r\n./x-pack/.i18nrc.json\r\n./x-pack/platform/plugins/shared/screenshotting/README.md\r\n./x-pack/platform/plugins/shared/screenshotting/jest.config.js\r\n./x-pack/platform/plugins/shared/screenshotting/jest.integration.config.js\r\n./x-pack/platform/plugins/shared/screenshotting/server/screenshots/screenshots.test.ts\r\n./x-pack/plugins/lens/public/app_plugin/share_action.ts\r\n./yarn.lock\r\n```\r\n</details>\r\n<details>\r\n<summary>Updated relative paths</summary>\r\n\r\n```\r\nx-pack/platform/plugins/shared/screenshotting/jest.config.js:10\r\nx-pack/platform/plugins/shared/screenshotting/jest.integration.config.js:10\r\nx-pack/platform/plugins/shared/screenshotting/server/formats/pdf/pdf_maker/worker_src_harness.js:14\r\nx-pack/platform/plugins/shared/screenshotting/tsconfig.json:10\r\nx-pack/platform/plugins/shared/screenshotting/tsconfig.json:14\r\nx-pack/platform/plugins/shared/screenshotting/tsconfig.json:2\r\n```\r\n</details>\r\n<details>\r\n<summary>Script errors</summary>\r\n\r\n```\r\n\r\n```\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"0e2fc8f4e22a9dd41fc0b0f3c0ea2bd448a6c73e"}}]}] BACKPORT-->
This commit is contained in:
parent
5f539ab687
commit
01ff4b31d7
133 changed files with 33 additions and 31 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -784,7 +784,7 @@ packages/kbn-scout-reporting @elastic/appex-qa
|
|||
examples/screenshot_mode_example @elastic/appex-sharedux
|
||||
src/plugins/screenshot_mode @elastic/appex-sharedux
|
||||
x-pack/examples/screenshotting_example @elastic/appex-sharedux
|
||||
x-pack/plugins/screenshotting @elastic/kibana-reporting-services
|
||||
x-pack/platform/plugins/shared/screenshotting @elastic/kibana-reporting-services
|
||||
packages/kbn-screenshotting-server @elastic/appex-sharedux
|
||||
packages/kbn-search-api-keys-components @elastic/search-kibana
|
||||
packages/kbn-search-api-keys-server @elastic/search-kibana
|
||||
|
|
|
@ -812,7 +812,7 @@ Elastic.
|
|||
|Add tagging capability to saved objects
|
||||
|
||||
|
||||
|{kib-repo}blob/{branch}/x-pack/plugins/screenshotting/README.md[screenshotting]
|
||||
|{kib-repo}blob/{branch}/x-pack/platform/plugins/shared/screenshotting/README.md[screenshotting]
|
||||
|This plugin provides functionality to take screenshots of the Kibana pages.
|
||||
It uses Chromium and Puppeteer underneath to run the browser in headless mode.
|
||||
|
||||
|
|
|
@ -793,7 +793,7 @@
|
|||
"@kbn/screenshot-mode-example-plugin": "link:examples/screenshot_mode_example",
|
||||
"@kbn/screenshot-mode-plugin": "link:src/plugins/screenshot_mode",
|
||||
"@kbn/screenshotting-example-plugin": "link:x-pack/examples/screenshotting_example",
|
||||
"@kbn/screenshotting-plugin": "link:x-pack/plugins/screenshotting",
|
||||
"@kbn/screenshotting-plugin": "link:x-pack/platform/plugins/shared/screenshotting",
|
||||
"@kbn/screenshotting-server": "link:packages/kbn-screenshotting-server",
|
||||
"@kbn/search-api-keys-components": "link:packages/kbn-search-api-keys-components",
|
||||
"@kbn/search-api-keys-server": "link:packages/kbn-search-api-keys-server",
|
||||
|
|
|
@ -19,7 +19,7 @@ import { Log } from './log';
|
|||
const packageMatcher = makeMatcher([
|
||||
'**/*',
|
||||
'!**/.*',
|
||||
'!x-pack/plugins/screenshotting/chromium/**',
|
||||
'!x-pack/platform/plugins/shared/screenshotting/chromium/**',
|
||||
'!x-pack/plugins/canvas/shareable_runtime/**',
|
||||
]);
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@ const log = new ToolingLog({
|
|||
});
|
||||
|
||||
describe(`enumeratePatterns`, () => {
|
||||
it(`should resolve x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts to kibana-screenshotting`, () => {
|
||||
it(`should resolve x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.ts to kibana-screenshotting`, () => {
|
||||
const actual = enumeratePatterns(REPO_ROOT)(log)(
|
||||
new Map([['x-pack/plugins/screenshotting', ['kibana-screenshotting']]])
|
||||
new Map([['x-pack/platform/plugins/shared/screenshotting', ['kibana-screenshotting']]])
|
||||
);
|
||||
|
||||
expect(actual.flat()).toContain(
|
||||
'x-pack/plugins/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting'
|
||||
'x-pack/platform/plugins/shared/screenshotting/server/browsers/extract/unzip.ts kibana-screenshotting'
|
||||
);
|
||||
});
|
||||
it(`should resolve src/plugins/charts/common/static/color_maps/color_maps.ts to kibana-app`, () => {
|
||||
|
|
|
@ -178,10 +178,10 @@ export const TEMPORARILY_IGNORED_PATHS = [
|
|||
'x-pack/plugins/monitoring/public/icons/health-green.svg',
|
||||
'x-pack/plugins/monitoring/public/icons/health-red.svg',
|
||||
'x-pack/plugins/monitoring/public/icons/health-yellow.svg',
|
||||
'x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf',
|
||||
'x-pack/plugins/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf',
|
||||
'x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf',
|
||||
'x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf',
|
||||
'x-pack/plugins/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf',
|
||||
'x-pack/plugins/screenshotting/server/assets/img/logo-grey.png',
|
||||
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Medium.ttf',
|
||||
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/noto/NotoSansCJKtc-Regular.ttf',
|
||||
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Italic.ttf',
|
||||
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Medium.ttf',
|
||||
'x-pack/platform/plugins/shared/screenshotting/server/assets/fonts/roboto/Roboto-Regular.ttf',
|
||||
'x-pack/platform/plugins/shared/screenshotting/server/assets/img/logo-grey.png',
|
||||
];
|
||||
|
|
|
@ -1562,8 +1562,8 @@
|
|||
"@kbn/screenshot-mode-plugin/*": ["src/plugins/screenshot_mode/*"],
|
||||
"@kbn/screenshotting-example-plugin": ["x-pack/examples/screenshotting_example"],
|
||||
"@kbn/screenshotting-example-plugin/*": ["x-pack/examples/screenshotting_example/*"],
|
||||
"@kbn/screenshotting-plugin": ["x-pack/plugins/screenshotting"],
|
||||
"@kbn/screenshotting-plugin/*": ["x-pack/plugins/screenshotting/*"],
|
||||
"@kbn/screenshotting-plugin": ["x-pack/platform/plugins/shared/screenshotting"],
|
||||
"@kbn/screenshotting-plugin/*": ["x-pack/platform/plugins/shared/screenshotting/*"],
|
||||
"@kbn/screenshotting-server": ["packages/kbn-screenshotting-server"],
|
||||
"@kbn/screenshotting-server/*": ["packages/kbn-screenshotting-server/*"],
|
||||
"@kbn/search-api-keys-components": ["packages/kbn-search-api-keys-components"],
|
||||
|
|
2
x-pack/.gitignore
vendored
2
x-pack/.gitignore
vendored
|
@ -6,7 +6,7 @@
|
|||
/test/functional/apps/**/reports/session
|
||||
/test/reporting/configs/failure_debug/
|
||||
/plugins/reporting/.chromium/
|
||||
/plugins/screenshotting/chromium/
|
||||
/platform/plugins/shared/screenshotting/chromium/
|
||||
/plugins/reporting/.phantom/
|
||||
/.aws-config.json
|
||||
/.env
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
"xpack.reporting": ["plugins/reporting"],
|
||||
"xpack.rollupJobs": ["platform/packages/private/rollup", "platform/plugins/private/rollup"],
|
||||
"xpack.runtimeFields": "platform/plugins/private/runtime_fields",
|
||||
"xpack.screenshotting": "plugins/screenshotting",
|
||||
"xpack.screenshotting": "platform/plugins/shared/screenshotting",
|
||||
"xpack.searchSharedUI": "packages/search/shared_ui",
|
||||
"xpack.searchHomepage": "plugins/search_homepage",
|
||||
"xpack.searchIndices": "plugins/search_indices",
|
||||
|
|
|
@ -24,7 +24,7 @@ Here is an example of how you can take a screenshot of a Kibana URL.
|
|||
```typescript
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import type { CoreSetup, Plugin } from 'src/core/server';
|
||||
import type { ScreenshottingStart } from 'x-pack/plugins/screenshotting/server';
|
||||
import type { ScreenshottingStart } from 'x-pack/platform/plugins/shared/screenshotting/server';
|
||||
|
||||
|
||||
interface StartDeps {
|
|
@ -7,9 +7,10 @@
|
|||
|
||||
module.exports = {
|
||||
preset: '@kbn/test',
|
||||
rootDir: '../../..',
|
||||
roots: ['<rootDir>/x-pack/plugins/screenshotting'],
|
||||
coverageDirectory: '<rootDir>/target/kibana-coverage/jest/x-pack/plugins/screenshotting',
|
||||
rootDir: '../../../../..',
|
||||
roots: ['<rootDir>/x-pack/platform/plugins/shared/screenshotting'],
|
||||
coverageDirectory:
|
||||
'<rootDir>/target/kibana-coverage/jest/x-pack/platform/plugins/shared/screenshotting',
|
||||
coverageReporters: ['text', 'html'],
|
||||
collectCoverageFrom: ['<rootDir>/x-pack/plugins/screenshotting/server/**/*.{ts}'],
|
||||
collectCoverageFrom: ['<rootDir>/x-pack/platform/plugins/shared/screenshotting/server/**/*.{ts}'],
|
||||
};
|
|
@ -7,6 +7,6 @@
|
|||
|
||||
module.exports = {
|
||||
preset: '@kbn/test/jest_integration',
|
||||
rootDir: '../../..',
|
||||
roots: ['<rootDir>/x-pack/plugins/screenshotting'],
|
||||
rootDir: '../../../../..',
|
||||
roots: ['<rootDir>/x-pack/platform/plugins/shared/screenshotting'],
|
||||
};
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
|
@ -11,6 +11,6 @@
|
|||
*/
|
||||
|
||||
// eslint-disable-next-line @kbn/imports/no_boundary_crossing
|
||||
require('../../../../../../../src/setup_node_env');
|
||||
require('../../../../../../../../../src/setup_node_env');
|
||||
// eslint-disable-next-line @kbn/imports/uniform_imports
|
||||
require('./worker.ts');
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue