# Backport
This will backport the following commits from `main` to `9.0`:
- [SKA: Relocate "platform" packages that remain on `/packages`
(#208704)](https://github.com/elastic/kibana/pull/208704)
<!--- Backport version: 9.6.6 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)
<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-02-24T11:03:30Z","message":"SKA:
Relocate \"platform\" packages that remain on `/packages`
(#208704)\n\n## Summary\n\nThe `/packages` folder at the root of the
Kibana repository used to\ncontain a lot of packages.\nIn the context of
SKA, they have been gradually moved to various\nlocations:\n*
`src/platform/packages`\n* `x-pack/platform/packages`\n*
`src/core/packages`\n\nCurrently, only `devOnly: true` packages are left
in this folder. This\ncomprises libraries for CLI scripts as well as
testing utilities.\n\nWith this PR, we are moving ~half of these
packages under\n`src/platform/packages/(private|shared)/`.\nIn
particular, we are moving those packages that are being used
from\nplatform and/or solutions.\n\nSince they are `\"devOnly\": true`,
this means they are ONLY used from\ntests, cypress tests, storybook
configs, ./scripts/ folders inside some\nmodules, or other non-prod-time
logic. Nonetheless, they are effectively\nreferenced from platform
and/or solutions code, hence I decided they\nshould be placed under
`platform` folders.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6a7c904f921434fe21dfa00eceabfb5e64e915dc","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"SKA:
Relocate \"platform\" packages that remain on
`/packages`","number":208704,"url":"https://github.com/elastic/kibana/pull/208704","mergeCommit":{"message":"SKA:
Relocate \"platform\" packages that remain on `/packages`
(#208704)\n\n## Summary\n\nThe `/packages` folder at the root of the
Kibana repository used to\ncontain a lot of packages.\nIn the context of
SKA, they have been gradually moved to various\nlocations:\n*
`src/platform/packages`\n* `x-pack/platform/packages`\n*
`src/core/packages`\n\nCurrently, only `devOnly: true` packages are left
in this folder. This\ncomprises libraries for CLI scripts as well as
testing utilities.\n\nWith this PR, we are moving ~half of these
packages under\n`src/platform/packages/(private|shared)/`.\nIn
particular, we are moving those packages that are being used
from\nplatform and/or solutions.\n\nSince they are `\"devOnly\": true`,
this means they are ONLY used from\ntests, cypress tests, storybook
configs, ./scripts/ folders inside some\nmodules, or other non-prod-time
logic. Nonetheless, they are effectively\nreferenced from platform
and/or solutions code, hence I decided they\nshould be placed under
`platform` folders.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6a7c904f921434fe21dfa00eceabfb5e64e915dc"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208704","number":208704,"mergeCommit":{"message":"SKA:
Relocate \"platform\" packages that remain on `/packages`
(#208704)\n\n## Summary\n\nThe `/packages` folder at the root of the
Kibana repository used to\ncontain a lot of packages.\nIn the context of
SKA, they have been gradually moved to various\nlocations:\n*
`src/platform/packages`\n* `x-pack/platform/packages`\n*
`src/core/packages`\n\nCurrently, only `devOnly: true` packages are left
in this folder. This\ncomprises libraries for CLI scripts as well as
testing utilities.\n\nWith this PR, we are moving ~half of these
packages under\n`src/platform/packages/(private|shared)/`.\nIn
particular, we are moving those packages that are being used
from\nplatform and/or solutions.\n\nSince they are `\"devOnly\": true`,
this means they are ONLY used from\ntests, cypress tests, storybook
configs, ./scripts/ folders inside some\nmodules, or other non-prod-time
logic. Nonetheless, they are effectively\nreferenced from platform
and/or solutions code, hence I decided they\nshould be placed under
`platform` folders.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6a7c904f921434fe21dfa00eceabfb5e64e915dc"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
## Summary
Some eslint rules' paths were outdated after the SKA relocations.
This PR aims at fixing them.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.
> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
> * customised eslint rules
> * docs pointing to source code
> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.
Are you trying to rebase this PR to solve merge conflicts? Please follow
the steps describe
[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).
#### 3 packages(s) are going to be relocated:
| Id | Target folder |
| -- | ------------- |
| `@kbn/code-editor` |
`src/platform/packages/shared/shared-ux/code_editor/impl` |
| `@kbn/code-editor-mock` |
`src/platform/packages/shared/shared-ux/code_editor/mocks` |
| `@kbn/monaco` | `src/platform/packages/shared/kbn-monaco` |
<details >
<summary>Updated relative paths</summary>
```
src/platform/packages/shared/kbn-monaco/jest.config.js:12
src/platform/packages/shared/kbn-monaco/tsconfig.json:2
src/platform/packages/shared/kbn-monaco/tsconfig.type_check.json:2
src/platform/packages/shared/shared-ux/code_editor/impl/jest.config.js:12
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.json:16
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.json:2
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.type_check.json:18
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.type_check.json:2
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.type_check.json:25
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.type_check.json:28
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.type_check.json:31
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.type_check.json:34
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.type_check.json:37
src/platform/packages/shared/shared-ux/code_editor/impl/tsconfig.type_check.json:40
src/platform/packages/shared/shared-ux/code_editor/mocks/tsconfig.json:16
src/platform/packages/shared/shared-ux/code_editor/mocks/tsconfig.json:2
src/platform/packages/shared/shared-ux/code_editor/mocks/tsconfig.type_check.json:18
src/platform/packages/shared/shared-ux/code_editor/mocks/tsconfig.type_check.json:2
src/platform/packages/shared/shared-ux/code_editor/mocks/tsconfig.type_check.json:25
```
</details>
## Summary
This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.
> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
> * customised eslint rules
> * docs pointing to source code
> [!NOTE]
> This PR has been auto-generated.
> Do not attempt to push any changes unless you know what you are doing.
> Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.
#### 2 plugin(s) are going to be relocated:
| Id | Target folder |
| -- | ------------- |
| `@kbn/esql` | `src/platform/plugins/shared/esql` |
| `@kbn/esql-datagrid` | `src/platform/plugins/shared/esql_datagrid` |
#### 5 package(s) are going to be relocated:
| Id | Target folder |
| -- | ------------- |
| `@kbn/esql-ast` | `src/platform/packages/shared/kbn-esql-ast` |
| `@kbn/esql-editor` | `src/platform/packages/private/kbn-esql-editor` |
| `@kbn/esql-utils` | `src/platform/packages/shared/kbn-esql-utils` |
| `@kbn/esql-validation-autocomplete` |
`src/platform/packages/shared/kbn-esql-validation-autocomplete` |
| `@kbn/language-documentation` |
`src/platform/packages/private/kbn-language-documentation` |
<details>
<summary>Updated references</summary>
```
./.buildkite/scripts/steps/esql_generate_function_metadata.sh
./.buildkite/scripts/steps/esql_grammar_sync.sh
./.eslintignore
./.eslintrc.js
./.i18nrc.json
./docs/developer/plugin-list.asciidoc
./examples/esql_ast_inspector/public/plugin.ts
./examples/esql_validation_example/public/plugin.ts
./package.json
./packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts
./packages/kbn-monaco/BUILD.bazel
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./packages/kbn-ui-shared-deps-src/BUILD.bazel
./src/dev/storybook/aliases.ts
./src/platform/packages/private/kbn-esql-editor/jest.config.js
./src/platform/packages/private/kbn-language-documentation/jest.config.js
./src/platform/packages/private/kbn-language-documentation/package.json
./src/platform/packages/shared/kbn-esql-ast/jest.config.js
./src/platform/packages/shared/kbn-esql-utils/jest.config.js
./src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md
./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js
./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js
./src/platform/packages/shared/kbn-esql-validation-autocomplete/package.json
./src/platform/packages/shared/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts
./src/platform/plugins/shared/esql/jest.config.js
./src/platform/plugins/shared/esql_datagrid/jest.config.js
./tsconfig.base.json
./yarn.lock
```
</details>
<details>
<summary>Updated relative paths</summary>
```
src/platform/packages/private/kbn-esql-editor/jest.config.js:12
src/platform/packages/private/kbn-esql-editor/tsconfig.json:2
src/platform/packages/private/kbn-language-documentation/jest.config.js:12
src/platform/packages/private/kbn-language-documentation/package.json:12
src/platform/packages/private/kbn-language-documentation/tsconfig.json:2
src/platform/packages/shared/kbn-esql-ast/jest.config.js:12
src/platform/packages/shared/kbn-esql-ast/tsconfig.json:2
src/platform/packages/shared/kbn-esql-utils/jest.config.js:12
src/platform/packages/shared/kbn-esql-utils/tsconfig.json:2
src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js:12
src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js:12
src/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:10
src/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:11
src/platform/packages/shared/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts:389
src/platform/packages/shared/kbn-esql-validation-autocomplete/tsconfig.json:2
src/platform/plugins/shared/esql/jest.config.js:12
src/platform/plugins/shared/esql/tsconfig.json:2
src/platform/plugins/shared/esql/tsconfig.json:7
src/platform/plugins/shared/esql_datagrid/jest.config.js:12
src/platform/plugins/shared/esql_datagrid/tsconfig.json:2
src/platform/plugins/shared/esql_datagrid/tsconfig.json:7
```
</details>
<details>
<summary>Script errors</summary>
```
```
</details>
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Rudolf Meijering <skaapgif@gmail.com>
Part of: #144296
## Summary
First step of `[ESQL] Improve the typing experience` (#144296). This PR
is the skeleton for later parts, but already supports basic parsing
scenarios.
## What was done:
- [x] Added new `ESQL` language in `@kbn/monaco` package. Parsing was
done using the `antl` syntax;
- [x] `kbnUiSharedDeps`-srcJs bundle has been optimised, all workers
have been moved into separate chunks. This gave almost minus` 2 MB` 🕺
- [x] existing `esql` lang was renamed to `sql`. In order not to confuse
anyone in the future
- [x] some code from `painless` folder was moved to `common` and reused
in ESQL (probably needs some refactoring in future)
## Next steps:
- [ ] improving `ANLT` syntax to cover all cases
- [ ] implementing `Autocomplete` feature
## How to use new `ESQL Lang`:
To use new language 2 properties should be set for `CodeEditor`
component
```ts
import { ESQL_LANG_ID, ESQL_THEME_ID } from '@kbn/monaco';
import { CodeEditor } from '@kbn/kibana-react-plugin/public';
<CodeEditor
...
languageId={ESQL_LANG_ID}
options={{
...
theme: ESQL_THEME_ID,
}}
/>
```
Currently syntax highlighting looks like:
<img width="450" alt="image"
src="https://user-images.githubusercontent.com/20072247/205685072-0658fad1-d034-4d36-a44d-6a49e7365ab3.png">
<img width="450" alt="image"
src="https://user-images.githubusercontent.com/20072247/205685220-c67db50c-6f3b-49b5-9576-d1ee68428184.png">
Will be updated in Step 2
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
* [ts] enable sourcemaps in summarized types of @kbn/crypto
* update snapshots
* remove unnecessary exports of @kbn/type-summarizer package
* remove tsc from the build process
* use `@kbn/type-summarizer` to summarize its own types
* add tests for interface and function
* switch to export type where necessary
* ignore __tmp__ in global jest preset
* ignore __tmp__ globally
* remove `@kbn/crypto` types path
* very wip
* - Reached first iteration of reporting body value being saved with
the report for **PDF**
- Removed v2 of the reporting since it looks like we may be able
to make a backwards compatible change on existing PDF/PNG
exports
* reintroduced pdfv2 export type, see https://github.com/elastic/kibana/issues/99890\#issuecomment-851527878
* fix a whol bunch of imports
* mapped out a working version for pdf
* refactor to tuples
* added v2 pdf to export type registry
* a lot of hackery to get reports generated in v2
* added png v2, png reports with locator state
* wip: refactored for loading the saved object on the redirect app URL
* major wip: initial stages of reporting redirect app, need to add a way to generate v2 reports!
* added a way to generate a v2 pdf from the example reporting plugin
* updated reporting example app to read and accept forwarded app state
* added reporting locator and updated server-side route to not use Boom
* removed reporting locator for now, first iteration of reports being generated using the reporting redirect app
* version with PNG working
* moved png/v2 -> png_v2
* moved printable_pdf/v2 -> printable_pdf_v2
* updated share public setup and start mocks
* fix types after merging master
* locator -> locatorParams AND added a new endpoint for getting locator params to client
* fix type import
* fix types
* clean up bad imports
* forceNow required on v2 payloads
* reworked create job interface for PNG task payload and updated consumer code report example for forcenow
* put locatorparams[] back onto the reportsource interface because on baseparams it conflicts with the different export type params
* move getCustomLogo and generatePng to common for export types
* additional import fixes
* urls -> url
* chore: fix and update types and fix jest import mocks
* - refactored v2 behaviour to avoid client-side request for locator
instead this value is injected pre-page-load so that the
redirect app can use it
- refactored the interface for the getScreenshot observable
factory. specifically we now expect 'urlsOrUrlTuples' to be
passed in. tested with new and old report types.
* updated the reporting example app to use locator migration for v2 report types
* added functionality for setting forceNow
* added forceNow to job payload for v2 report types and fixed shared components for v2
* write the output of v2 reports to stream
* fix types for forceNow
* added tests for execute job
* added comments, organized imports, removed selectors from report params
* fix some type issues
* feedback: removed duplicated PDF code, cleaned screenshot observable function and other minor tweaks
* use variable (not destructured values) and remove unused import
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* starting removing stuff
* fix jest config
* disable CLI mode until other PR is merged
* fix the schema
* add deprecation for maxPayloadBytes
* fix legacy start logic
* deletes `env` from unknown args
* fix FTR test config
* some legacy service deletion
* move config validation
* remove legacy exports from entrypoint
* preserve legacy logging in core logging config
* try to fix uiSettings integration tests
* fix legacy service tests
* more type fix
* use fromRoot from @kbn/utils
* cleanup kibana.d.ts
* fix unit tests
* remove src/core/server/utils
* fix server script
* add integration test for `/{path*}` route
* add unit tests on legacy config
* adapt uiSetting IT bis
* fix tests
* update generated doc
* address some review comments
* move review comments
* fix some stuff
* fix some stuff
* fix some stuff
* fix some stuff bis
* generated doc
* add test for ensureValidConfiguration
* Tinymath is now a Kibana package
* Rename to @kbn/tinymath
* Update import style
* Update README
* Use commonjs import syntax
* Fix to commonjs export
* More commonjs fixes
This package has long since been deprecated and no longer maintained.
The only reason it still exists is that not all plugins have migrated
away from using the kui classes to EUI. This removes all src and build
files as a step forward.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
* chore(NA): update gitignore to include first changes from moving into a single package.json
* chore(NA): update gitignore
* chore(NA): move all the dependencies into the single package.json and apply changes to bootstrap
* chore(NA): fix types problems after the single package json
* chore(NA): include code to find the dependencies used across the code
* chore(NA): introduce pure lockfile for install dependencies on build
* chore(NA): update clean task to not delete anything from xpack node_modules
* chore(NA): update gitignore to remove development temporary rules
* chore(NA): update notice file
* chore(NA): update jest snapshots
* chore(NA): fix whitelisted licenses to include a new specify form of an already included one
* chore(NA): remove check lockfile symlinks from child projects
* chore(NA): fix eslint and add missing declared deps on single pkg json
* chore(NA): correctly update notice
* chore(NA): fix failing jest test for storyshots.test.tsx
* chore(NA): fix cypress multi reporter path
* chore(NA): fix Project tests check
* chore(NA): fix problem with logic to detect used dependes on oss build
* chore(NA): include correct x-pack plugins dep discovery
* chore(NA): discover entries under dynamic requires on vis_type_timelion
* chore(NA): remove canvas
* test(NA): fix jest unit tests
* chore(NA): remove double react declaration from storyshot test file
* chore(NA): try removing isOSS check
* chore(NA): support for plugin development
* chore(NA): update logic to fix unit tests and typechecking
* chore(NA): support to run npm scripts in child kbn projects across all envs
* chore(NA): support github checks reporter on x-pack and remove cpy types as the package correctly provides them
* chore(NA): update cpy version
* chore(NA): include last kbn pm changes
* chore(NA): update style on build_production_projects.ts
* chore(NA): remove any cast fom telemetry opt in stats
* chore(NA): remove del and re-use rm -rf again
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Moved flot in ui-shared-deps and leavt only one version.
* Removed unneeded import
* use commonJS so we can execute code between loading specific modules
* prefix i18n keys with flot.
* Fix Internationalization
* remove duplicate pie plugin
Co-authored-by: spalger <spalger@users.noreply.github.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Migrate timelion to the NP.
* fixed ci
* Fixed paths
* fixed UI settings
* Fixed ci
* fix CI
* Fixed some comments
* Fixed browser tests
* fixed state
* Fixed comments
* Fixed save expression
* Fixed navigation
* fix CI
* Fixed some problem
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
- Updates Linux Chromium builds to accept architecture argument (defaults to x64) for arm64 support.
- Example: `python ~/chromium/build_chromium/build.py 312d84c8ce62810976feda0d3457108a6dfff9e6 arm64`
- Updates all Chromium builds to include architecture in filename.
- `chromium-312d84c-linux_arm64.zip` _(new)_
- `chromium-312d84c-linux.zip` > `chromium-312d84c-linux_x64.zip`
- Moves Chromium install from data directory to `x-pack/plugins/reporting/chromium`
- Moves Chromium download cache from `x-pack/plugins/reporting/.chromium` to `.chromium`
- Installs Chromium during build (closes#53664)
- Updates build to be architecture aware (x64 and aarch64)
- Removed Chromium debug logs, they were not helpful and can not be written inside the Kibana root. If we were to keep them, we would need to write to `logging.dist`.
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>