mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
10 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
2074c97dfd
|
[8.x] [ES|QL] Source AST node parsing improvements and source selector parsing (#217299) (#217345)
# Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] Source AST node parsing improvements and source selector parsing (#217299)](https://github.com/elastic/kibana/pull/217299) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Vadim Kibana","email":"82822460+vadimkibana@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-04-07T14:11:10Z","message":"[ES|QL] Source AST node parsing improvements and source selector parsing (#217299)\n\n## Summary\n\n- This PR introduces source selector (aka \"component\") parsing `FROM\nindex::<selector>`\n- It also improves source cluster and index parsing `FROM\n<cluster>:<index>`\n- Previous cluster and index would be parsed as `string` now they are\nparsed as `ESQLStringLiteral` instead. This is more correct as any of\nthose can take three forms, and `ESQLStringLiteral` handles all three\nforms:\n 1. unquoted string: `cluster:index`\n 2. single-double quoted string: `\"cluster\":\"index\"`\n 3. triple-double quote string: `\"\"\"cluster\"\"\":\"\"\"index\"\"`\n- The `ESQLStringLiteral` now also supports *\"unquoted strings\"* in\naddition to single `\"str\"` and triple `\"\"\"str\"\"\"` quoted strings.\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"86fdbe5379bbe43036d503752ff502fc28718f4b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL] Source AST node parsing improvements and source selector parsing","number":217299,"url":"https://github.com/elastic/kibana/pull/217299","mergeCommit":{"message":"[ES|QL] Source AST node parsing improvements and source selector parsing (#217299)\n\n## Summary\n\n- This PR introduces source selector (aka \"component\") parsing `FROM\nindex::<selector>`\n- It also improves source cluster and index parsing `FROM\n<cluster>:<index>`\n- Previous cluster and index would be parsed as `string` now they are\nparsed as `ESQLStringLiteral` instead. This is more correct as any of\nthose can take three forms, and `ESQLStringLiteral` handles all three\nforms:\n 1. unquoted string: `cluster:index`\n 2. single-double quoted string: `\"cluster\":\"index\"`\n 3. triple-double quote string: `\"\"\"cluster\"\"\":\"\"\"index\"\"`\n- The `ESQLStringLiteral` now also supports *\"unquoted strings\"* in\naddition to single `\"str\"` and triple `\"\"\"str\"\"\"` quoted strings.\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"86fdbe5379bbe43036d503752ff502fc28718f4b"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217299","number":217299,"mergeCommit":{"message":"[ES|QL] Source AST node parsing improvements and source selector parsing (#217299)\n\n## Summary\n\n- This PR introduces source selector (aka \"component\") parsing `FROM\nindex::<selector>`\n- It also improves source cluster and index parsing `FROM\n<cluster>:<index>`\n- Previous cluster and index would be parsed as `string` now they are\nparsed as `ESQLStringLiteral` instead. This is more correct as any of\nthose can take three forms, and `ESQLStringLiteral` handles all three\nforms:\n 1. unquoted string: `cluster:index`\n 2. single-double quoted string: `\"cluster\":\"index\"`\n 3. triple-double quote string: `\"\"\"cluster\"\"\":\"\"\"index\"\"`\n- The `ESQLStringLiteral` now also supports *\"unquoted strings\"* in\naddition to single `\"str\"` and triple `\"\"\"str\"\"\"` quoted strings.\n\n\n### Checklist\n\n- [x] [Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios","sha":"86fdbe5379bbe43036d503752ff502fc28718f4b"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com> |
||
|
44e66ff158
|
[8.x] Upgrade EUI to v101.1.0-classic.0 (#216208)
>[!IMPORtANT] This PR is the direct, manual backport to `8.x` for [this PR](https://github.com/elastic/kibana/pull/215698) that's being merged to `main`. The reason it's handled manually is that `8.x` receives a custom EUI release that still has the "Amsterdam" theme as default theme enabled. --- `100.0.0` ⏩ `101.1.0` [Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams) ## Package updates ### `@elastic/eui` [`v101.1.0`](https://github.com/elastic/eui/releases/v101.1.0) - Updates `EuiTableRow` styles to check support for `:has(+)` selector ([#8498](https://github.com/elastic/eui/pull/8498)) ### `@elastic/eui` [`v101.0.1`](https://github.com/elastic/eui/releases/v101.0.1) - Updated `EuiProvider` and `EuiThemeProvider` with a new `highContrastMode` ([#8444](https://github.com/elastic/eui/pull/8444)) - This prop allows toggling a higher contrast visual style that primarily affects borders and shadows - On `EuiProvider`, if the `highContrastMode` prop is not passed, this setting will inherit from the user's OS/system settings - If the user is using a forced colors mode (e.g. Windows' high contrast themes), this system setting will take precedence over any `highContrastMode` or `colorMode` props passed - Added `highContrastModeStyles` and `preventForcedColors` styling utils ([#8444](https://github.com/elastic/eui/pull/8444)) - Updated `EuiRangeTooltip` to be easier to see in dark mode ([#8444](https://github.com/elastic/eui/pull/8444)) - Updated some deprecated color token usages that have direct substitutes ([#8444](https://github.com/elastic/eui/pull/8444)) - `text` -> `textParagraph` - `title` -> `textHeading` - `subduedText` -> `textSubdued` - `disabledText` -> `textDisabled` - `accentText` -> `textAccent` - `dangerText` -> `textDanger` - `warningText` -> `textWarning` - `useEuiShadow()` now accepts a second `options` argument ([#8234](https://github.com/elastic/eui/pull/8234)) - `useEuiShadowFlat()` now accepts an `options` object instead of only a color ([#8234](https://github.com/elastic/eui/pull/8234)) - Updated `EuiPopover` and `EuiToolTip` to be easier to see in dark mode. ([#8174](https://github.com/elastic/eui/pull/8174)) **Bug fixes** - Fixed a visual bug where a transparent border would create visible empty space (`LIGHT` mode only) for the components: ([#8427](https://github.com/elastic/eui/pull/8427)) - `EuiPanel` - `EuiPopover` - `EuiToolTip` - `EuiToast` - `EuiTour` --- ### `@elastic/eui-theme-common` [`v0.1.0`](https://github.com/elastic/eui/releases/v0.1.0) - Removed type `EuiShadowCustomColor` ([#8444](https://github.com/elastic/eui/pull/8444)) - Added types: ([#8444](https://github.com/elastic/eui/pull/8444)) - `EuiShadowOptions` - `EuiThemeHighContrastModeProp` - `EuiThemeHighContrastMode` - Updated shadow utils to accepts a second `options` argument and return borders in high contrast mode: ([#8444](https://github.com/elastic/eui/pull/8444)) - `euiShadow` - `euiShadowXSmall` - `euiShadowSmall` - `euiShadowMedium` - `euiShadowLarge` - `euiSlightShadowHover` - `euiShadowFlat` --- ### `@elastic/eui-theme-borealis` [`v0.1.0`](https://github.com/elastic/eui/releases/v0.1.0) - Added new component level tokens: ([#8444](https://github.com/elastic/eui/pull/8444)) - `buttonGroupBackgroundDisabledSelected` - `overlayMaskBackground` - `overlayMaskBackgroundHighContrast` - `skeletonBackgroundSkeletonMiddleHighContrast` ## Additional changes The latest `@elastic/eui` package introduces high contrast mode support. This PR sets the root `EuiProvider` to use `highContrastMode={false}` to introduce it in disabled state (this reflects the current functionality in Kibana). Cloud-UI can enable this whenever it's tested and supported from their end. ## QA Adding high contrast mode in disabled state should result in no visual changes to the UI. |
||
|
1384cedd84
|
[8.x] Upgrade EUI to v98.2.1-borealis.1 (#204783)
>[!IMPORTANT] This PR introduces the Borealis enabled EUI package to `8.x`. The intention is to support new features being developed that need to live in `main` as well as `8.x`. >[!IMPORTANT] All `8.x` versions should continue to use the current Amsterdam theme. To ensure this even with upcoming changes to the default theme for EUI, we're adding `euiThemeAmsterdam` on `EuiProvider` usages manually. ## Description This PR introduces all previous Borealis related PR changes but excludes the specific changes to support `@elastic/eui-theme-borealis` as only Amsterdam is supported as theme in `8.x`. Previous PRs - https://github.com/elastic/kibana/pull/199993 - https://github.com/elastic/kibana/pull/201049 - https://github.com/elastic/kibana/pull/202073 --- `v97.3.1`⏩`v98.2.1-borealis.1` _[Questions? Please see our Kibana upgrade FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_ --- # `@elastic/eui` ## [`v98.2.1`](https://github.com/elastic/eui/releases/v98.2.1) - Updated the EUI theme color values to use a full 6 char hex code format ([#8244](https://github.com/elastic/eui/pull/8244)) ## [`v98.2.0`](https://github.com/elastic/eui/releases/v98.2.0) - Added two new icons: `contrast` and `contrastHigh` ([#8216](https://github.com/elastic/eui/pull/8216)) - Updated `EuiDataGrid` content to have a transparent background. ([#8220](https://github.com/elastic/eui/pull/8220)) **Accessibility** - When the tooltips components (`EuiTooltip`, `EuiIconTip`) are used inside components that handle the Escape key (like `EuiFlyout` or `EuiModal`), pressing the Escape key will now only close the tooltip and not the entire wrapping component. ([#8140](https://github.com/elastic/eui/pull/8140)) - Improved the accessibility of `EuiCodeBlock`s by ([#8195](https://github.com/elastic/eui/pull/8195)) - adding screen reader only labels - adding `role="dialog"` on in fullscreen mode - ensuring focus is returned on closing fullscreen mode # Borealis updates - [Visual Refresh] Update color token mappings ([#8211](https://github.com/elastic/eui/pull/8211)) - [Visual Refresh] Introduce shared popover arrow styles to Borealis ([#8212](https://github.com/elastic/eui/pull/8212)) - [Visual Refresh] Add forms.maxWidth token ([#8221](https://github.com/elastic/eui/pull/8221)) - [Visual Refresh] Set darker shade for subdued text ([#8224](https://github.com/elastic/eui/pull/8224)) - [Visual Refresh] Remove support for accentSecondary badges ([#8224](https://github.com/elastic/eui/pull/8227)) - [Visual Refresh] Add severity vis colors ([#8247](https://github.com/elastic/eui/pull/8247)) --- # `@elastic/eui` ## [`v98.1.0`](https://github.com/elastic/eui/releases/v98.1.0) - Updated `EuiBetaBadge` with a new `warning` color variant ([#8177](https://github.com/elastic/eui/pull/8177)) **Accessibility** - Ensures `autoFocus` on `EuiSelectableList` triggers initial focus ([#8091](https://github.com/elastic/eui/pull/8091)) - Improved the accessibility of `EuiSearchBarFilters` by: ([#8091](https://github.com/elastic/eui/pull/8091)) - adding a more descriptive `aria-label` to selection filter buttons - ensuring the selection listbox is initially focused when opening a selection popover - Improved the accessibility experience of tabs (EuiTab, EuiTabs): tab group is a tab stop and tabs can be traversed with arrow keys. ([#8116](https://github.com/elastic/eui/pull/8116)) - Updated `EuiCodeBlock` with a new `copyAriaLabel` prop, which allows setting a custom screen reader label on the copy button. ([#8176](https://github.com/elastic/eui/pull/8176)) **CSS-in-JS conversions** - Removed the following global Sass variables: ([#8169](https://github.com/elastic/eui/pull/8169)) - `$euiButtonMinWidth` - `$euiDatePickerCalendarWidth` - Removed the following Sass animations: ([#8169](https://github.com/elastic/eui/pull/8169)) - `euiAnimFadeIn` - `euiGrow` - `focusRingAnimate` - `focusRingAnimateLarge` - `euiButtonActive` - Removed the following Sass mixins: ([#8169](https://github.com/elastic/eui/pull/8169)) - `euiFullHeight` - `euiSlightShadowHover` - `datePickerArrow` # Borealis updates - [Visual Refresh] Fix euiColorFullShade Sass variable mapping (https://github.com/elastic/eui/pull/8178) --- # `@elastic/eui` ## [`v98.0.0`](https://github.com/elastic/eui/releases/v98.0.0) **Bug fixes** - Fixed an `EuiDataGrid` bug where column actions where not clickable when `EuiDataGrid` with `columnVisibility.canDragAndDropColumns` was used inside a modal ([#8135](https://github.com/elastic/eui/pull/8135)) **Breaking changes** - Removed `EuiFormRow`'s deprecated `columnCompressedSwitch` display prop. Use `columnCompressed` instead ([#8113](https://github.com/elastic/eui/pull/8113)) # Borealis updates **Bug fixes** - Fixed computed border token mapping (https://github.com/elastic/eui/pull/8170) |
||
|
cfe4d8375a
|
[8.x] [ES|QL] Improve the `Builder` class (#203558) (#204240)
# Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] Improve the `Builder` class (#203558)](https://github.com/elastic/kibana/pull/203558) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Vadim Kibana","email":"82822460+vadimkibana@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-12-13T15:19:10Z","message":"[ES|QL] Improve the `Builder` class (#203558)\n\n## Summary\r\n\r\nPartially addresses https://github.com/elastic/kibana/issues/202113\r\n\r\n- Makes sure it is possible to construct any AST using the `Builder`\r\nclass\r\n- Fixes few bugs in pretty-printer\r\n- No space is added before unary `-` or `+` expression, for example,\r\n`-123`.\r\n - Source cluster is now printed `cluster:my_index` \r\n\r\n\r\n### Checklist\r\n\r\n- [x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"8904cb068cf6140f6cc4a8db5cde2524a4fa2240","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:skip","v9.0.0","backport:prev-minor","Feature:ES|QL","Team:ESQL","v8.18.0"],"title":"[ES|QL] Improve the `Builder` class","number":203558,"url":"https://github.com/elastic/kibana/pull/203558","mergeCommit":{"message":"[ES|QL] Improve the `Builder` class (#203558)\n\n## Summary\r\n\r\nPartially addresses https://github.com/elastic/kibana/issues/202113\r\n\r\n- Makes sure it is possible to construct any AST using the `Builder`\r\nclass\r\n- Fixes few bugs in pretty-printer\r\n- No space is added before unary `-` or `+` expression, for example,\r\n`-123`.\r\n - Source cluster is now printed `cluster:my_index` \r\n\r\n\r\n### Checklist\r\n\r\n- [x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"8904cb068cf6140f6cc4a8db5cde2524a4fa2240"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/203558","number":203558,"mergeCommit":{"message":"[ES|QL] Improve the `Builder` class (#203558)\n\n## Summary\r\n\r\nPartially addresses https://github.com/elastic/kibana/issues/202113\r\n\r\n- Makes sure it is possible to construct any AST using the `Builder`\r\nclass\r\n- Fixes few bugs in pretty-printer\r\n- No space is added before unary `-` or `+` expression, for example,\r\n`-123`.\r\n - Source cluster is now printed `cluster:my_index` \r\n\r\n\r\n### Checklist\r\n\r\n- [x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas added for features that require explanation or tutorials\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"8904cb068cf6140f6cc4a8db5cde2524a4fa2240"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com> |
||
|
da80d01ab5
|
[8.x] Sustainable Kibana Architecture: Move modules owned by @elastic/kibana-esql (#202722) (#203390)
# Backport This will backport the following commits from `main` to `8.x`: - [Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-esql` (#202722)](https://github.com/elastic/kibana/pull/202722) <!--- 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-09T10:33:55Z","message":"Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-esql` (#202722)\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#### 2 plugin(s) are going to be relocated:\r\n\r\n| Id | Target folder |\r\n| -- | ------------- |\r\n| `@kbn/esql` | `src/platform/plugins/shared/esql` |\r\n| `@kbn/esql-datagrid` | `src/platform/plugins/shared/esql_datagrid` |\r\n\r\n\r\n#### 5 package(s) are going to be relocated:\r\n\r\n | Id | Target folder |\r\n | -- | ------------- |\r\n | `@kbn/esql-ast` | `src/platform/packages/shared/kbn-esql-ast` |\r\n| `@kbn/esql-editor` | `src/platform/packages/private/kbn-esql-editor` |\r\n| `@kbn/esql-utils` | `src/platform/packages/shared/kbn-esql-utils` |\r\n| `@kbn/esql-validation-autocomplete` |\r\n`src/platform/packages/shared/kbn-esql-validation-autocomplete` |\r\n| `@kbn/language-documentation` |\r\n`src/platform/packages/private/kbn-language-documentation` |\r\n\r\n\r\n<details>\r\n<summary>Updated references</summary>\r\n\r\n```\r\n./.buildkite/scripts/steps/esql_generate_function_metadata.sh\r\n./.buildkite/scripts/steps/esql_grammar_sync.sh\r\n./.eslintignore\r\n./.eslintrc.js\r\n./.i18nrc.json\r\n./docs/developer/plugin-list.asciidoc\r\n./examples/esql_ast_inspector/public/plugin.ts\r\n./examples/esql_validation_example/public/plugin.ts\r\n./package.json\r\n./packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts\r\n./packages/kbn-monaco/BUILD.bazel\r\n./packages/kbn-repo-packages/package-map.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./packages/kbn-ui-shared-deps-src/BUILD.bazel\r\n./src/dev/storybook/aliases.ts\r\n./src/platform/packages/private/kbn-esql-editor/jest.config.js\r\n./src/platform/packages/private/kbn-language-documentation/jest.config.js\r\n./src/platform/packages/private/kbn-language-documentation/package.json\r\n./src/platform/packages/shared/kbn-esql-ast/jest.config.js\r\n./src/platform/packages/shared/kbn-esql-utils/jest.config.js\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/package.json\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts\r\n./src/platform/plugins/shared/esql/jest.config.js\r\n./src/platform/plugins/shared/esql_datagrid/jest.config.js\r\n./tsconfig.base.json\r\n./yarn.lock\r\n```\r\n</details>\r\n<details>\r\n<summary>Updated relative paths</summary>\r\n\r\n```\r\nsrc/platform/packages/private/kbn-esql-editor/jest.config.js:12\r\nsrc/platform/packages/private/kbn-esql-editor/tsconfig.json:2\r\nsrc/platform/packages/private/kbn-language-documentation/jest.config.js:12\r\nsrc/platform/packages/private/kbn-language-documentation/package.json:12\r\nsrc/platform/packages/private/kbn-language-documentation/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-esql-ast/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-ast/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-esql-utils/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-utils/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:10\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:11\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts:389\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/tsconfig.json:2\r\nsrc/platform/plugins/shared/esql/jest.config.js:12\r\nsrc/platform/plugins/shared/esql/tsconfig.json:2\r\nsrc/platform/plugins/shared/esql/tsconfig.json:7\r\nsrc/platform/plugins/shared/esql_datagrid/jest.config.js:12\r\nsrc/platform/plugins/shared/esql_datagrid/tsconfig.json:2\r\nsrc/platform/plugins/shared/esql_datagrid/tsconfig.json:7\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>\r\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"313f973aecac80f7eb6340ba517870999e0da1a3","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:ESQL"],"number":202722,"url":"https://github.com/elastic/kibana/pull/202722","mergeCommit":{"message":"Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-esql` (#202722)\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#### 2 plugin(s) are going to be relocated:\r\n\r\n| Id | Target folder |\r\n| -- | ------------- |\r\n| `@kbn/esql` | `src/platform/plugins/shared/esql` |\r\n| `@kbn/esql-datagrid` | `src/platform/plugins/shared/esql_datagrid` |\r\n\r\n\r\n#### 5 package(s) are going to be relocated:\r\n\r\n | Id | Target folder |\r\n | -- | ------------- |\r\n | `@kbn/esql-ast` | `src/platform/packages/shared/kbn-esql-ast` |\r\n| `@kbn/esql-editor` | `src/platform/packages/private/kbn-esql-editor` |\r\n| `@kbn/esql-utils` | `src/platform/packages/shared/kbn-esql-utils` |\r\n| `@kbn/esql-validation-autocomplete` |\r\n`src/platform/packages/shared/kbn-esql-validation-autocomplete` |\r\n| `@kbn/language-documentation` |\r\n`src/platform/packages/private/kbn-language-documentation` |\r\n\r\n\r\n<details>\r\n<summary>Updated references</summary>\r\n\r\n```\r\n./.buildkite/scripts/steps/esql_generate_function_metadata.sh\r\n./.buildkite/scripts/steps/esql_grammar_sync.sh\r\n./.eslintignore\r\n./.eslintrc.js\r\n./.i18nrc.json\r\n./docs/developer/plugin-list.asciidoc\r\n./examples/esql_ast_inspector/public/plugin.ts\r\n./examples/esql_validation_example/public/plugin.ts\r\n./package.json\r\n./packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts\r\n./packages/kbn-monaco/BUILD.bazel\r\n./packages/kbn-repo-packages/package-map.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./packages/kbn-ui-shared-deps-src/BUILD.bazel\r\n./src/dev/storybook/aliases.ts\r\n./src/platform/packages/private/kbn-esql-editor/jest.config.js\r\n./src/platform/packages/private/kbn-language-documentation/jest.config.js\r\n./src/platform/packages/private/kbn-language-documentation/package.json\r\n./src/platform/packages/shared/kbn-esql-ast/jest.config.js\r\n./src/platform/packages/shared/kbn-esql-utils/jest.config.js\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/package.json\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts\r\n./src/platform/plugins/shared/esql/jest.config.js\r\n./src/platform/plugins/shared/esql_datagrid/jest.config.js\r\n./tsconfig.base.json\r\n./yarn.lock\r\n```\r\n</details>\r\n<details>\r\n<summary>Updated relative paths</summary>\r\n\r\n```\r\nsrc/platform/packages/private/kbn-esql-editor/jest.config.js:12\r\nsrc/platform/packages/private/kbn-esql-editor/tsconfig.json:2\r\nsrc/platform/packages/private/kbn-language-documentation/jest.config.js:12\r\nsrc/platform/packages/private/kbn-language-documentation/package.json:12\r\nsrc/platform/packages/private/kbn-language-documentation/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-esql-ast/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-ast/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-esql-utils/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-utils/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:10\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:11\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts:389\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/tsconfig.json:2\r\nsrc/platform/plugins/shared/esql/jest.config.js:12\r\nsrc/platform/plugins/shared/esql/tsconfig.json:2\r\nsrc/platform/plugins/shared/esql/tsconfig.json:7\r\nsrc/platform/plugins/shared/esql_datagrid/jest.config.js:12\r\nsrc/platform/plugins/shared/esql_datagrid/tsconfig.json:2\r\nsrc/platform/plugins/shared/esql_datagrid/tsconfig.json:7\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>\r\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"313f973aecac80f7eb6340ba517870999e0da1a3"}},"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/202722","number":202722,"mergeCommit":{"message":"Sustainable Kibana Architecture: Move modules owned by `@elastic/kibana-esql` (#202722)\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#### 2 plugin(s) are going to be relocated:\r\n\r\n| Id | Target folder |\r\n| -- | ------------- |\r\n| `@kbn/esql` | `src/platform/plugins/shared/esql` |\r\n| `@kbn/esql-datagrid` | `src/platform/plugins/shared/esql_datagrid` |\r\n\r\n\r\n#### 5 package(s) are going to be relocated:\r\n\r\n | Id | Target folder |\r\n | -- | ------------- |\r\n | `@kbn/esql-ast` | `src/platform/packages/shared/kbn-esql-ast` |\r\n| `@kbn/esql-editor` | `src/platform/packages/private/kbn-esql-editor` |\r\n| `@kbn/esql-utils` | `src/platform/packages/shared/kbn-esql-utils` |\r\n| `@kbn/esql-validation-autocomplete` |\r\n`src/platform/packages/shared/kbn-esql-validation-autocomplete` |\r\n| `@kbn/language-documentation` |\r\n`src/platform/packages/private/kbn-language-documentation` |\r\n\r\n\r\n<details>\r\n<summary>Updated references</summary>\r\n\r\n```\r\n./.buildkite/scripts/steps/esql_generate_function_metadata.sh\r\n./.buildkite/scripts/steps/esql_grammar_sync.sh\r\n./.eslintignore\r\n./.eslintrc.js\r\n./.i18nrc.json\r\n./docs/developer/plugin-list.asciidoc\r\n./examples/esql_ast_inspector/public/plugin.ts\r\n./examples/esql_validation_example/public/plugin.ts\r\n./package.json\r\n./packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts\r\n./packages/kbn-monaco/BUILD.bazel\r\n./packages/kbn-repo-packages/package-map.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./packages/kbn-ui-shared-deps-src/BUILD.bazel\r\n./src/dev/storybook/aliases.ts\r\n./src/platform/packages/private/kbn-esql-editor/jest.config.js\r\n./src/platform/packages/private/kbn-language-documentation/jest.config.js\r\n./src/platform/packages/private/kbn-language-documentation/package.json\r\n./src/platform/packages/shared/kbn-esql-ast/jest.config.js\r\n./src/platform/packages/shared/kbn-esql-utils/jest.config.js\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/README.md\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/package.json\r\n./src/platform/packages/shared/kbn-esql-validation-autocomplete/src/autocomplete/helper.ts\r\n./src/platform/plugins/shared/esql/jest.config.js\r\n./src/platform/plugins/shared/esql_datagrid/jest.config.js\r\n./tsconfig.base.json\r\n./yarn.lock\r\n```\r\n</details>\r\n<details>\r\n<summary>Updated relative paths</summary>\r\n\r\n```\r\nsrc/platform/packages/private/kbn-esql-editor/jest.config.js:12\r\nsrc/platform/packages/private/kbn-esql-editor/tsconfig.json:2\r\nsrc/platform/packages/private/kbn-language-documentation/jest.config.js:12\r\nsrc/platform/packages/private/kbn-language-documentation/package.json:12\r\nsrc/platform/packages/private/kbn-language-documentation/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-esql-ast/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-ast/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-esql-utils/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-utils/tsconfig.json:2\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/jest.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/jest.integration.config.js:12\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:10\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/package.json:11\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/scripts/generate_function_definitions.ts:389\r\nsrc/platform/packages/shared/kbn-esql-validation-autocomplete/tsconfig.json:2\r\nsrc/platform/plugins/shared/esql/jest.config.js:12\r\nsrc/platform/plugins/shared/esql/tsconfig.json:2\r\nsrc/platform/plugins/shared/esql/tsconfig.json:7\r\nsrc/platform/plugins/shared/esql_datagrid/jest.config.js:12\r\nsrc/platform/plugins/shared/esql_datagrid/tsconfig.json:2\r\nsrc/platform/plugins/shared/esql_datagrid/tsconfig.json:7\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>\r\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"313f973aecac80f7eb6340ba517870999e0da1a3"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
2230a55278
|
[8.x] [ES|QL] Add`SORT` command mutation APIs (#197185) (#198440)
# Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] Add`SORT` command mutation APIs (#197185)](https://github.com/elastic/kibana/pull/197185) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Vadim Kibana","email":"82822460+vadimkibana@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-30T20:34:57Z","message":"[ES|QL] Add`SORT` command mutation APIs (#197185)\n\n## Summary\r\n\r\nPartially addresses https://github.com/elastic/kibana/issues/191812\r\n\r\n- Adds traversal and manipulation APIs for `SORT` command.\r\n - `commands.sort.listCommands()`\r\n - `commands.sort.getCommand()`\r\n - `commands.sort.list()`\r\n - `commands.sort.findByPredicate()`\r\n - `commands.sort.find()`\r\n - `commands.sort.remove()`\r\n - `commands.sort.insertIntoCommand()`\r\n - `commands.sort.insertExpression()`\r\n - `commands.sort.insertCommand()`\r\n- Refactors \"generic\" AST manipulation routines into (1) `commands`, (2)\r\n`commands.args`, (3) `commands.options`.\r\n - `generic.commands.*`\r\n - `generic.commands.args.*`\r\n - `generic.commands.options.*`\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"0cc89457124f9cefbdd08766a7a22b1c4bdcc440","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:skip","v9.0.0","backport:prev-minor","Feature:ES|QL","Team:ESQL","v8.17.0"],"title":"[ES|QL] Add`SORT` command mutation APIs","number":197185,"url":"https://github.com/elastic/kibana/pull/197185","mergeCommit":{"message":"[ES|QL] Add`SORT` command mutation APIs (#197185)\n\n## Summary\r\n\r\nPartially addresses https://github.com/elastic/kibana/issues/191812\r\n\r\n- Adds traversal and manipulation APIs for `SORT` command.\r\n - `commands.sort.listCommands()`\r\n - `commands.sort.getCommand()`\r\n - `commands.sort.list()`\r\n - `commands.sort.findByPredicate()`\r\n - `commands.sort.find()`\r\n - `commands.sort.remove()`\r\n - `commands.sort.insertIntoCommand()`\r\n - `commands.sort.insertExpression()`\r\n - `commands.sort.insertCommand()`\r\n- Refactors \"generic\" AST manipulation routines into (1) `commands`, (2)\r\n`commands.args`, (3) `commands.options`.\r\n - `generic.commands.*`\r\n - `generic.commands.args.*`\r\n - `generic.commands.options.*`\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"0cc89457124f9cefbdd08766a7a22b1c4bdcc440"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197185","number":197185,"mergeCommit":{"message":"[ES|QL] Add`SORT` command mutation APIs (#197185)\n\n## Summary\r\n\r\nPartially addresses https://github.com/elastic/kibana/issues/191812\r\n\r\n- Adds traversal and manipulation APIs for `SORT` command.\r\n - `commands.sort.listCommands()`\r\n - `commands.sort.getCommand()`\r\n - `commands.sort.list()`\r\n - `commands.sort.findByPredicate()`\r\n - `commands.sort.find()`\r\n - `commands.sort.remove()`\r\n - `commands.sort.insertIntoCommand()`\r\n - `commands.sort.insertExpression()`\r\n - `commands.sort.insertCommand()`\r\n- Refactors \"generic\" AST manipulation routines into (1) `commands`, (2)\r\n`commands.args`, (3) `commands.options`.\r\n - `generic.commands.*`\r\n - `generic.commands.args.*`\r\n - `generic.commands.options.*`\r\n\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)\r\n\r\n---------\r\n\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"0cc89457124f9cefbdd08766a7a22b1c4bdcc440"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com> |
||
|
2fd6817a75
|
[8.x] [ES|QL] Comment parsing and pretty-printing (#192173) (#194117)
# Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] Comment parsing and pretty-printing (#192173)](https://github.com/elastic/kibana/pull/192173) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Vadim Kibana","email":"82822460+vadimkibana@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-09-26T10:34:38Z","message":"[ES|QL] Comment parsing and pretty-printing (#192173)\n\n## Summary\r\n\r\nTL;DR\r\n\r\n- Adds ability to parse out comments from source to AST.\r\n- Adds ability for every AST node to have *decoration*—comments,\r\nwhich can be attached from left, top, and right from the node.\r\n- Implements routine which attached comments to AST nodes.\r\n- In `BasicPrettyPrinter` adds support only for *left* and *right*\r\ncomment printing, as the basic printer prints only on one line.\r\n- In `WrappingPrettyPrinter` adds support for all comment printing for\r\nall AST nodes.\r\n- Introduces a `Query` object and `query` AST node, which represent\r\nthole query—the root node, list of commands.\r\n- The ES|QL AST example plugin now displays the pretty-printed text\r\nversion.\r\n\r\n\r\n### Comments\r\n\r\nThis PR introduced an optional `formatting` field for all AST nodes. In\r\nthe `formatting` field one can specify comment decorations from\r\ndifferent sides of a node.\r\n\r\nWhen parsing, once can now specify the `{ withComments: true }` option,\r\nwhich will collect all comments from the source while parsing using the\r\n`collectDecorations` routine. It will then also call the\r\n`attachDecorations`, which walks the AST and assigns each comment to\r\nsome AST node.\r\n\r\nFurther, traversal and pretty-print API have been updated to work with\r\ncomments:\r\n\r\n- The `Walker` has been updated to be able to walk all comments from the\r\nAST.\r\n- The `BasicPrettyPrinter` adds support only for *left* and *right*\r\ninline comment printing, as the basic printer prints only on one line.\r\n- The `WrappingPrettyPrinter` adds support for all comment printing for\r\nall AST nodes. It switches to line-break printing mode if it detects\r\nthere are comments with line breaks (those could be multi-line comments,\r\nor single line comments—single line comments are always followed\r\nby a line break). It also correctly inserts punctuation, when an AST\r\nnode is surrounded by comments.\r\n\r\n\r\n### Parsing utils\r\n\r\nAll parsing utils have been moved to the `/parser` sub-folder.\r\n\r\nFiles in the `/parser` folder have been renamed as per Kibana convention\r\nto reflect what is inside the file. For example, the `EsqlErrorListener`\r\nclass is in a file named `esql_error_listener.ts`.\r\n\r\nA `Query` class and `ESQLAstQueryExpression` AST nodes have been\r\nintroduced. They represent the result of a full query parse. (Before\r\nthat, the AST root was just an array of command nodes, now the AST root\r\nis represented by the `ESQLAstQueryExpression` node.)\r\n\r\n\r\n### Builder\r\n\r\nI have started the implementation of the `Builder` static class in the\r\n`/builder` folder. It is simply a collection of stateless AST node\r\nfactories—functions which construct AST nodes.\r\n\r\nSome of the `Builder` methods are already used by the parser, more will\r\nfollow. We will also use the `Builder` in upcoming [*Mutation\r\nAPI*](https://github.com/elastic/kibana/issues/191812).\r\n\r\n\r\n### ES|QL Example Plugin\r\n\r\nThis PR sets up Storybook and implements few Storybook stories for the\r\nES|QL AST example plugin, run it with:\r\n\r\n```\r\nyarn storybook esql_ast_inspector\r\n```\r\n\r\nThis PR updates the *ES|QL AST Explorer* example plugin. Start Kibana\r\nwith example plugins enabled:\r\n\r\n```\r\nyarn start --run-examples\r\n```\r\n\r\nAnd navigate to\r\n[`/app/esql_ast_inspector`](http://localhost:5601/app/esql_ast_inspector)\r\nto see the new example plugin UI.\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"2217337c5d91340ba67e0bedaab0762502518993","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["review","release_note:skip","v9.0.0","backport:prev-minor","Feature:ES|QL","Team:ESQL","v8.16.0"],"title":"[ES|QL] Comment parsing and pretty-printing","number":192173,"url":"https://github.com/elastic/kibana/pull/192173","mergeCommit":{"message":"[ES|QL] Comment parsing and pretty-printing (#192173)\n\n## Summary\r\n\r\nTL;DR\r\n\r\n- Adds ability to parse out comments from source to AST.\r\n- Adds ability for every AST node to have *decoration*—comments,\r\nwhich can be attached from left, top, and right from the node.\r\n- Implements routine which attached comments to AST nodes.\r\n- In `BasicPrettyPrinter` adds support only for *left* and *right*\r\ncomment printing, as the basic printer prints only on one line.\r\n- In `WrappingPrettyPrinter` adds support for all comment printing for\r\nall AST nodes.\r\n- Introduces a `Query` object and `query` AST node, which represent\r\nthole query—the root node, list of commands.\r\n- The ES|QL AST example plugin now displays the pretty-printed text\r\nversion.\r\n\r\n\r\n### Comments\r\n\r\nThis PR introduced an optional `formatting` field for all AST nodes. In\r\nthe `formatting` field one can specify comment decorations from\r\ndifferent sides of a node.\r\n\r\nWhen parsing, once can now specify the `{ withComments: true }` option,\r\nwhich will collect all comments from the source while parsing using the\r\n`collectDecorations` routine. It will then also call the\r\n`attachDecorations`, which walks the AST and assigns each comment to\r\nsome AST node.\r\n\r\nFurther, traversal and pretty-print API have been updated to work with\r\ncomments:\r\n\r\n- The `Walker` has been updated to be able to walk all comments from the\r\nAST.\r\n- The `BasicPrettyPrinter` adds support only for *left* and *right*\r\ninline comment printing, as the basic printer prints only on one line.\r\n- The `WrappingPrettyPrinter` adds support for all comment printing for\r\nall AST nodes. It switches to line-break printing mode if it detects\r\nthere are comments with line breaks (those could be multi-line comments,\r\nor single line comments—single line comments are always followed\r\nby a line break). It also correctly inserts punctuation, when an AST\r\nnode is surrounded by comments.\r\n\r\n\r\n### Parsing utils\r\n\r\nAll parsing utils have been moved to the `/parser` sub-folder.\r\n\r\nFiles in the `/parser` folder have been renamed as per Kibana convention\r\nto reflect what is inside the file. For example, the `EsqlErrorListener`\r\nclass is in a file named `esql_error_listener.ts`.\r\n\r\nA `Query` class and `ESQLAstQueryExpression` AST nodes have been\r\nintroduced. They represent the result of a full query parse. (Before\r\nthat, the AST root was just an array of command nodes, now the AST root\r\nis represented by the `ESQLAstQueryExpression` node.)\r\n\r\n\r\n### Builder\r\n\r\nI have started the implementation of the `Builder` static class in the\r\n`/builder` folder. It is simply a collection of stateless AST node\r\nfactories—functions which construct AST nodes.\r\n\r\nSome of the `Builder` methods are already used by the parser, more will\r\nfollow. We will also use the `Builder` in upcoming [*Mutation\r\nAPI*](https://github.com/elastic/kibana/issues/191812).\r\n\r\n\r\n### ES|QL Example Plugin\r\n\r\nThis PR sets up Storybook and implements few Storybook stories for the\r\nES|QL AST example plugin, run it with:\r\n\r\n```\r\nyarn storybook esql_ast_inspector\r\n```\r\n\r\nThis PR updates the *ES|QL AST Explorer* example plugin. Start Kibana\r\nwith example plugins enabled:\r\n\r\n```\r\nyarn start --run-examples\r\n```\r\n\r\nAnd navigate to\r\n[`/app/esql_ast_inspector`](http://localhost:5601/app/esql_ast_inspector)\r\nto see the new example plugin UI.\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"2217337c5d91340ba67e0bedaab0762502518993"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192173","number":192173,"mergeCommit":{"message":"[ES|QL] Comment parsing and pretty-printing (#192173)\n\n## Summary\r\n\r\nTL;DR\r\n\r\n- Adds ability to parse out comments from source to AST.\r\n- Adds ability for every AST node to have *decoration*—comments,\r\nwhich can be attached from left, top, and right from the node.\r\n- Implements routine which attached comments to AST nodes.\r\n- In `BasicPrettyPrinter` adds support only for *left* and *right*\r\ncomment printing, as the basic printer prints only on one line.\r\n- In `WrappingPrettyPrinter` adds support for all comment printing for\r\nall AST nodes.\r\n- Introduces a `Query` object and `query` AST node, which represent\r\nthole query—the root node, list of commands.\r\n- The ES|QL AST example plugin now displays the pretty-printed text\r\nversion.\r\n\r\n\r\n### Comments\r\n\r\nThis PR introduced an optional `formatting` field for all AST nodes. In\r\nthe `formatting` field one can specify comment decorations from\r\ndifferent sides of a node.\r\n\r\nWhen parsing, once can now specify the `{ withComments: true }` option,\r\nwhich will collect all comments from the source while parsing using the\r\n`collectDecorations` routine. It will then also call the\r\n`attachDecorations`, which walks the AST and assigns each comment to\r\nsome AST node.\r\n\r\nFurther, traversal and pretty-print API have been updated to work with\r\ncomments:\r\n\r\n- The `Walker` has been updated to be able to walk all comments from the\r\nAST.\r\n- The `BasicPrettyPrinter` adds support only for *left* and *right*\r\ninline comment printing, as the basic printer prints only on one line.\r\n- The `WrappingPrettyPrinter` adds support for all comment printing for\r\nall AST nodes. It switches to line-break printing mode if it detects\r\nthere are comments with line breaks (those could be multi-line comments,\r\nor single line comments—single line comments are always followed\r\nby a line break). It also correctly inserts punctuation, when an AST\r\nnode is surrounded by comments.\r\n\r\n\r\n### Parsing utils\r\n\r\nAll parsing utils have been moved to the `/parser` sub-folder.\r\n\r\nFiles in the `/parser` folder have been renamed as per Kibana convention\r\nto reflect what is inside the file. For example, the `EsqlErrorListener`\r\nclass is in a file named `esql_error_listener.ts`.\r\n\r\nA `Query` class and `ESQLAstQueryExpression` AST nodes have been\r\nintroduced. They represent the result of a full query parse. (Before\r\nthat, the AST root was just an array of command nodes, now the AST root\r\nis represented by the `ESQLAstQueryExpression` node.)\r\n\r\n\r\n### Builder\r\n\r\nI have started the implementation of the `Builder` static class in the\r\n`/builder` folder. It is simply a collection of stateless AST node\r\nfactories—functions which construct AST nodes.\r\n\r\nSome of the `Builder` methods are already used by the parser, more will\r\nfollow. We will also use the `Builder` in upcoming [*Mutation\r\nAPI*](https://github.com/elastic/kibana/issues/191812).\r\n\r\n\r\n### ES|QL Example Plugin\r\n\r\nThis PR sets up Storybook and implements few Storybook stories for the\r\nES|QL AST example plugin, run it with:\r\n\r\n```\r\nyarn storybook esql_ast_inspector\r\n```\r\n\r\nThis PR updates the *ES|QL AST Explorer* example plugin. Start Kibana\r\nwith example plugins enabled:\r\n\r\n```\r\nyarn start --run-examples\r\n```\r\n\r\nAnd navigate to\r\n[`/app/esql_ast_inspector`](http://localhost:5601/app/esql_ast_inspector)\r\nto see the new example plugin UI.\r\n\r\n\r\n\r\n\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"2217337c5d91340ba67e0bedaab0762502518993"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Vadim Kibana <82822460+vadimkibana@users.noreply.github.com> |
||
|
b6287708f6
|
Adds AGPL 3.0 license (#192025)
Updates files outside of x-pack to be triple-licensed under Elastic License 2.0, AGPL 3.0, or SSPL 1.0. |
||
|
a5d0321f25
|
[ES|QL] Add support for client-side INLINESTATS validation (#189827)
## Summary Addresses https://github.com/elastic/kibana/issues/189356. This PR adds support for client-side INLINESTATS validation in the text based editor. Changes include: - Add INLINESTATS context in AST package - Update function definitions to include INLINESTATS - Hide INLINESTATS from list of suggestions (which we will revert after command is merged in tech preview) Before:  After: https://github.com/user-attachments/assets/4723735d-ab40-49c3-a1d9-51482c6fb441 ### Checklist Delete any items that are not applicable to this PR. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [ ] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [ ] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) ### Risk Matrix Delete this section if it is not applicable to this PR. Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release. When forming the risk matrix, consider some of the following examples and how they may potentially impact the change: | Risk | Probability | Severity | Mitigation/Notes | |---------------------------|-------------|----------|-------------------------| | Multiple Spaces—unexpected behavior in non-default Kibana Space. | Low | High | Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces. | | Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. | High | Low | Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure. | | Code should gracefully handle cases when feature X or plugin Y are disabled. | Medium | High | Unit tests will verify that any feature flag or plugin combination still results in our service operational. | | [See more potential risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) | ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> |
||
|
73864cc61e
|
[ES|QL] add AST inspector to examples (#182720)
## Summary
Something to get us started on the AST fun. At least until we contribute
ES|QL support to https://github.com/fkling/astexplorer :)
|