mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
99 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
|
42f6645391
|
[8.17] chore(NA): upgrade to webpack 5 (#191106) (#211148)
# Backport This will backport the following commits from `main` to `8.17`: - [chore(NA): upgrade to webpack 5 (#191106)](https://github.com/elastic/kibana/pull/191106) <!--- Backport version: 9.6.4 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Tiago Costa","email":"tiago.costa@elastic.co"},"sourceCommit":{"committedDate":"2025-02-14T03:01:36Z","message":"chore(NA): upgrade to webpack 5 (#191106)\n\n### Summary\r\n\r\n- Closes #89741\r\n\r\nThis PR contains the resulting work of a massive effort that ports our\r\non top bundler abstraction (called @kbn/optimizer) from Webpack v4 into\r\nWebpack v5. It's essential in terms of long term maintenance since v4\r\nwas not receiving updates any longer but will also unblock some new\r\nfeatures that could be beneficial for our future DevEx endeavours.\r\n\r\nNext you can find a small list of all the accomplished tasks on this\r\njourney.\r\n\r\n### Completed Tasks\r\n- [x] Upgrade dependencies to match the ones on webpack v5\r\n- [x] Fix null-loader usages\r\n- [x] Fix raw-loader usages\r\n- [x] Fix file-loader usages\r\n- [x] Fix url-loader usages\r\n- [x] Fix `@kbn/optimizer-webpack-helpers` to support webpack v5 \r\n- [x] Adopt previous webpack v4 polyfill-all strategy with\r\nnode-polyfill-webpack-plugin\r\n- [x] Fix theme-loader on @kbn/optimizer\r\n- [x] Migrate configurations and ad-hoc loader options on all webpack\r\nconfigs from v4 to v5\r\n- [x] Fix @kbn/test jest resolver for file-loader cases\r\n- [x] Migrate public-path loader on UiSharedDeps\r\n- [x] Fix all usages of webpack-merge\r\n- [x] Migrate BundleRemoteModule\r\n- [x] Migrate BundleRemotesPlugin\r\n- [x] Correctly migrate PopulateBundleCachePlugin\r\n- [x] Correctly migrate BundleMetricsPlugin\r\n- [x] Check if the profiling plugins still work (--profile flag)\r\n- [x] Recover if possible the previous webpack v4 cacheGroup chunks\r\nrename to something like `data.plugin.chunk.0.js`\r\n- [x] Run `/ci` and make sure we get our first green CI, otherwise work\r\non the errors until we do\r\n- [x] Profile and solve bottlenecks until we get a cold build\r\nperformance similar to the one we had on webpack v4 (`node\r\nscripts/build_kibana_platform_plugins --no-cache`).\r\n- [x] OpenSSL Legacy Warnings: try to remove `--openssl-legacy-provider\r\n` flags\r\n- [x] Add Webpack to Renovate config\r\n- [x] Explore removing `NodePolyfillPlugin`\r\n([here](https://www.npmjs.com/package/node-polyfill-webpack-plugin)) and\r\nadd each polyfill needed individually per each webpack config to check\r\nif we get smaller bundles. If we do it's better to go with the case by\r\ncase need approach instead of deploying a bunch of polyfills with\r\nNodePolyfillPlugin. As another alternative, create a custom smaller\r\nplugin with only the union of all needed polyfills.\r\n- [x] Evaluate if we want to touch the resolutions on mainFields and\r\nconditionNames\r\n- [x] Understand why `@import 'src/core/public/mixins'` does not work\r\nanymore (not a problem, we should use relative paths anyway but we want\r\nto track why it changed from v4 to v5)\r\n- [x] BUG: Child compilers are having errors hidden and/or changed from\r\nerror to warning\r\n- [x] Fix license check for\r\n[Artistic-2.0](https://spdx.org/licenses/Artistic-2.0.html) is the\r\nlicense for\r\n[domain-browser](https://github.com/bevry/domain-browser?tab=License-1-ov-file).\r\nThis package is a dependency of\r\n[NodePolyfillPlugin](https://www.npmjs.com/package/node-polyfill-webpack-plugin).\r\nArtistic 2.0 license is [classified as\r\nyellow](https://github.com/elastic/open-source/blob/main/elastic-product-policy.md#yellow-list)\r\nand should only be used for dev dependencies.\r\n- [x] Make sure `resourceQuery: { not: /raw/ }` is not necessary on\r\nother webpack configs like storybook one\r\n- [x] Find what is being wrongly removed by usedExports optimization;\r\nhint: I believe it is identifying a lot of exports inside the sync entry\r\nof plugins as unused exports and removing them. Then `__kbnBootstrap__`\r\ncan't be found\r\n- [x] Rebalance @kbn/optimizer pickMaxWorkerCount\r\n- [x] Re-open the issue to fix sass-warnings\r\n[#190345](https://github.com/elastic/kibana/issues/190345) or downgrade\r\nsass-loader to v10\r\n- [x] Remove previous esm no parse rules\r\n- [x] Confirm esm support is working\r\n- [x] Confirm console override is needed\r\n- [x] Confirm react prod builds on ui shared deps for distributable\r\n- [x] Remove customization for\r\n[xyflow](https://github.com/xyflow/xyflow) from webpack configs\r\n- [x] Clean all the code\r\n- [x] Make sure collected metrics from stats are still aligned with what\r\nwe were collecting before; also verify if the modules used for optimizer\r\ncaches etc are well generated (@kbn/node-libs-browser)\r\n- [x] Fix watch performance\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Brad White <brad.white@elastic.co>","sha":"203bc284781cc830049b3f7948c8fcafa8b7d9a1","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","Team:Fleet","v9.0.0","backport:all-open","ci:build-webpack-bundle-analyzer","Team:obs-ux-infra_services","v9.1.0"],"title":"chore(NA): upgrade to webpack 5","number":191106,"url":"https://github.com/elastic/kibana/pull/191106","mergeCommit":{"message":"chore(NA): upgrade to webpack 5 (#191106)\n\n### Summary\r\n\r\n- Closes #89741\r\n\r\nThis PR contains the resulting work of a massive effort that ports our\r\non top bundler abstraction (called @kbn/optimizer) from Webpack v4 into\r\nWebpack v5. It's essential in terms of long term maintenance since v4\r\nwas not receiving updates any longer but will also unblock some new\r\nfeatures that could be beneficial for our future DevEx endeavours.\r\n\r\nNext you can find a small list of all the accomplished tasks on this\r\njourney.\r\n\r\n### Completed Tasks\r\n- [x] Upgrade dependencies to match the ones on webpack v5\r\n- [x] Fix null-loader usages\r\n- [x] Fix raw-loader usages\r\n- [x] Fix file-loader usages\r\n- [x] Fix url-loader usages\r\n- [x] Fix `@kbn/optimizer-webpack-helpers` to support webpack v5 \r\n- [x] Adopt previous webpack v4 polyfill-all strategy with\r\nnode-polyfill-webpack-plugin\r\n- [x] Fix theme-loader on @kbn/optimizer\r\n- [x] Migrate configurations and ad-hoc loader options on all webpack\r\nconfigs from v4 to v5\r\n- [x] Fix @kbn/test jest resolver for file-loader cases\r\n- [x] Migrate public-path loader on UiSharedDeps\r\n- [x] Fix all usages of webpack-merge\r\n- [x] Migrate BundleRemoteModule\r\n- [x] Migrate BundleRemotesPlugin\r\n- [x] Correctly migrate PopulateBundleCachePlugin\r\n- [x] Correctly migrate BundleMetricsPlugin\r\n- [x] Check if the profiling plugins still work (--profile flag)\r\n- [x] Recover if possible the previous webpack v4 cacheGroup chunks\r\nrename to something like `data.plugin.chunk.0.js`\r\n- [x] Run `/ci` and make sure we get our first green CI, otherwise work\r\non the errors until we do\r\n- [x] Profile and solve bottlenecks until we get a cold build\r\nperformance similar to the one we had on webpack v4 (`node\r\nscripts/build_kibana_platform_plugins --no-cache`).\r\n- [x] OpenSSL Legacy Warnings: try to remove `--openssl-legacy-provider\r\n` flags\r\n- [x] Add Webpack to Renovate config\r\n- [x] Explore removing `NodePolyfillPlugin`\r\n([here](https://www.npmjs.com/package/node-polyfill-webpack-plugin)) and\r\nadd each polyfill needed individually per each webpack config to check\r\nif we get smaller bundles. If we do it's better to go with the case by\r\ncase need approach instead of deploying a bunch of polyfills with\r\nNodePolyfillPlugin. As another alternative, create a custom smaller\r\nplugin with only the union of all needed polyfills.\r\n- [x] Evaluate if we want to touch the resolutions on mainFields and\r\nconditionNames\r\n- [x] Understand why `@import 'src/core/public/mixins'` does not work\r\nanymore (not a problem, we should use relative paths anyway but we want\r\nto track why it changed from v4 to v5)\r\n- [x] BUG: Child compilers are having errors hidden and/or changed from\r\nerror to warning\r\n- [x] Fix license check for\r\n[Artistic-2.0](https://spdx.org/licenses/Artistic-2.0.html) is the\r\nlicense for\r\n[domain-browser](https://github.com/bevry/domain-browser?tab=License-1-ov-file).\r\nThis package is a dependency of\r\n[NodePolyfillPlugin](https://www.npmjs.com/package/node-polyfill-webpack-plugin).\r\nArtistic 2.0 license is [classified as\r\nyellow](https://github.com/elastic/open-source/blob/main/elastic-product-policy.md#yellow-list)\r\nand should only be used for dev dependencies.\r\n- [x] Make sure `resourceQuery: { not: /raw/ }` is not necessary on\r\nother webpack configs like storybook one\r\n- [x] Find what is being wrongly removed by usedExports optimization;\r\nhint: I believe it is identifying a lot of exports inside the sync entry\r\nof plugins as unused exports and removing them. Then `__kbnBootstrap__`\r\ncan't be found\r\n- [x] Rebalance @kbn/optimizer pickMaxWorkerCount\r\n- [x] Re-open the issue to fix sass-warnings\r\n[#190345](https://github.com/elastic/kibana/issues/190345) or downgrade\r\nsass-loader to v10\r\n- [x] Remove previous esm no parse rules\r\n- [x] Confirm esm support is working\r\n- [x] Confirm console override is needed\r\n- [x] Confirm react prod builds on ui shared deps for distributable\r\n- [x] Remove customization for\r\n[xyflow](https://github.com/xyflow/xyflow) from webpack configs\r\n- [x] Clean all the code\r\n- [x] Make sure collected metrics from stats are still aligned with what\r\nwe were collecting before; also verify if the modules used for optimizer\r\ncaches etc are well generated (@kbn/node-libs-browser)\r\n- [x] Fix watch performance\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Brad White <brad.white@elastic.co>","sha":"203bc284781cc830049b3f7948c8fcafa8b7d9a1"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/211145","number":211145,"state":"OPEN"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/191106","number":191106,"mergeCommit":{"message":"chore(NA): upgrade to webpack 5 (#191106)\n\n### Summary\r\n\r\n- Closes #89741\r\n\r\nThis PR contains the resulting work of a massive effort that ports our\r\non top bundler abstraction (called @kbn/optimizer) from Webpack v4 into\r\nWebpack v5. It's essential in terms of long term maintenance since v4\r\nwas not receiving updates any longer but will also unblock some new\r\nfeatures that could be beneficial for our future DevEx endeavours.\r\n\r\nNext you can find a small list of all the accomplished tasks on this\r\njourney.\r\n\r\n### Completed Tasks\r\n- [x] Upgrade dependencies to match the ones on webpack v5\r\n- [x] Fix null-loader usages\r\n- [x] Fix raw-loader usages\r\n- [x] Fix file-loader usages\r\n- [x] Fix url-loader usages\r\n- [x] Fix `@kbn/optimizer-webpack-helpers` to support webpack v5 \r\n- [x] Adopt previous webpack v4 polyfill-all strategy with\r\nnode-polyfill-webpack-plugin\r\n- [x] Fix theme-loader on @kbn/optimizer\r\n- [x] Migrate configurations and ad-hoc loader options on all webpack\r\nconfigs from v4 to v5\r\n- [x] Fix @kbn/test jest resolver for file-loader cases\r\n- [x] Migrate public-path loader on UiSharedDeps\r\n- [x] Fix all usages of webpack-merge\r\n- [x] Migrate BundleRemoteModule\r\n- [x] Migrate BundleRemotesPlugin\r\n- [x] Correctly migrate PopulateBundleCachePlugin\r\n- [x] Correctly migrate BundleMetricsPlugin\r\n- [x] Check if the profiling plugins still work (--profile flag)\r\n- [x] Recover if possible the previous webpack v4 cacheGroup chunks\r\nrename to something like `data.plugin.chunk.0.js`\r\n- [x] Run `/ci` and make sure we get our first green CI, otherwise work\r\non the errors until we do\r\n- [x] Profile and solve bottlenecks until we get a cold build\r\nperformance similar to the one we had on webpack v4 (`node\r\nscripts/build_kibana_platform_plugins --no-cache`).\r\n- [x] OpenSSL Legacy Warnings: try to remove `--openssl-legacy-provider\r\n` flags\r\n- [x] Add Webpack to Renovate config\r\n- [x] Explore removing `NodePolyfillPlugin`\r\n([here](https://www.npmjs.com/package/node-polyfill-webpack-plugin)) and\r\nadd each polyfill needed individually per each webpack config to check\r\nif we get smaller bundles. If we do it's better to go with the case by\r\ncase need approach instead of deploying a bunch of polyfills with\r\nNodePolyfillPlugin. As another alternative, create a custom smaller\r\nplugin with only the union of all needed polyfills.\r\n- [x] Evaluate if we want to touch the resolutions on mainFields and\r\nconditionNames\r\n- [x] Understand why `@import 'src/core/public/mixins'` does not work\r\nanymore (not a problem, we should use relative paths anyway but we want\r\nto track why it changed from v4 to v5)\r\n- [x] BUG: Child compilers are having errors hidden and/or changed from\r\nerror to warning\r\n- [x] Fix license check for\r\n[Artistic-2.0](https://spdx.org/licenses/Artistic-2.0.html) is the\r\nlicense for\r\n[domain-browser](https://github.com/bevry/domain-browser?tab=License-1-ov-file).\r\nThis package is a dependency of\r\n[NodePolyfillPlugin](https://www.npmjs.com/package/node-polyfill-webpack-plugin).\r\nArtistic 2.0 license is [classified as\r\nyellow](https://github.com/elastic/open-source/blob/main/elastic-product-policy.md#yellow-list)\r\nand should only be used for dev dependencies.\r\n- [x] Make sure `resourceQuery: { not: /raw/ }` is not necessary on\r\nother webpack configs like storybook one\r\n- [x] Find what is being wrongly removed by usedExports optimization;\r\nhint: I believe it is identifying a lot of exports inside the sync entry\r\nof plugins as unused exports and removing them. Then `__kbnBootstrap__`\r\ncan't be found\r\n- [x] Rebalance @kbn/optimizer pickMaxWorkerCount\r\n- [x] Re-open the issue to fix sass-warnings\r\n[#190345](https://github.com/elastic/kibana/issues/190345) or downgrade\r\nsass-loader to v10\r\n- [x] Remove previous esm no parse rules\r\n- [x] Confirm esm support is working\r\n- [x] Confirm console override is needed\r\n- [x] Confirm react prod builds on ui shared deps for distributable\r\n- [x] Remove customization for\r\n[xyflow](https://github.com/xyflow/xyflow) from webpack configs\r\n- [x] Clean all the code\r\n- [x] Make sure collected metrics from stats are still aligned with what\r\nwe were collecting before; also verify if the modules used for optimizer\r\ncaches etc are well generated (@kbn/node-libs-browser)\r\n- [x] Fix watch performance\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Brad White <brad.white@elastic.co>","sha":"203bc284781cc830049b3f7948c8fcafa8b7d9a1"}},{"url":"https://github.com/elastic/kibana/pull/211146","number":211146,"branch":"8.x","state":"OPEN"},{"url":"https://github.com/elastic/kibana/pull/211147","number":211147,"branch":"8.18","state":"OPEN"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
71cf9c8305
|
[8.x] Add @elastic/request-converter to renovate.json (#200588) (#200884)
# Backport This will backport the following commits from `main` to `8.x`: - [Add @elastic/request-converter to renovate.json (#200588)](https://github.com/elastic/kibana/pull/200588) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ignacio Rivas","email":"rivasign@gmail.com"},"sourceCommit":{"committedDate":"2024-11-20T10:23:38Z","message":"Add @elastic/request-converter to renovate.json (#200588)","sha":"0bb62939f09b98ea51cbf998e60f5e796d6176f2","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Kibana Management","release_note:skip","v9.0.0","backport:prev-minor"],"title":"Add @elastic/request-converter to renovate.json ","number":200588,"url":"https://github.com/elastic/kibana/pull/200588","mergeCommit":{"message":"Add @elastic/request-converter to renovate.json (#200588)","sha":"0bb62939f09b98ea51cbf998e60f5e796d6176f2"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/200588","number":200588,"mergeCommit":{"message":"Add @elastic/request-converter to renovate.json (#200588)","sha":"0bb62939f09b98ea51cbf998e60f5e796d6176f2"}}]}] BACKPORT--> Co-authored-by: Ignacio Rivas <rivasign@gmail.com> |
||
|
73d98d3d8e
|
[8.x] [Cloud Security] Graph visualization and API (#195307) (#196015)
# Backport This will backport the following commits from `main` to `8.x`: - [[Cloud Security] Graph visualization and API (#195307)](https://github.com/elastic/kibana/pull/195307) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kfir Peled","email":"61654899+kfirpeled@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-12T03:37:02Z","message":"[Cloud Security] Graph visualization and API (#195307)\n\n## Summary\r\n\r\nThis PR adds:\r\n- Graph visualization component using `xyflow`, and layouts the graph\r\nusing `dagre`.\r\n- API that supports the graph visualization\r\n- API tests\r\n- Serverless API tests\r\n\r\n**List of open issues (will be tracked in a different ticket):**\r\n- Identify if `related.hosts`, `related.ip` and `related.user` are\r\nmapped before the query. (can be fixed by\r\nhttps://github.com/elastic/elasticsearch/issues/112912)\r\n- Update nodes rendering to match recent figma changes\r\n- Return 404 when feature is not enabled\r\n- Add keyboard accessibility\r\n- Resolve axe failures (run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n\r\n### How to test\r\n\r\nYou can view the graph using storybook's\r\n[playground](https://supreme-adventure-8qjmlp1.pages.github.io/graph-storybook/?path=/story/components-graph-components-dagree-layout-graph--graph-stacked-edge-cases).\r\n\r\nTo test this PR you can run\r\n\r\n```\r\nyarn storybook cloud_security_posture_packages\r\n```\r\n\r\nTo test the API you can use the mocked data\r\n\r\n```bash\r\nnode scripts/es_archiver load x-pack/test/cloud_security_posture_api/es_archives/logs_gcp_audit \\ \r\n--es-url http://elastic:changeme@localhost:9200 \\\r\n--kibana-url http://elastic:changeme@localhost:5601\r\n```\r\n\r\nAnd through dev tools:\r\n\r\n```\r\nPOST kbn:/internal/cloud_security_posture/graph?apiVersion=1\r\n{\r\n \"query\": {\r\n \"actorIds\": [\"admin@example.com\"],\r\n \"eventIds\": [\"\"],\r\n \"start\": \"now-1y/y\",\r\n \"end\": \"now/d\"\r\n }\r\n}\r\n```\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"be0eadfb9fa08f0d73383884dc67bf2005b7daba","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor"],"title":"[Cloud Security] Graph visualization and API","number":195307,"url":"https://github.com/elastic/kibana/pull/195307","mergeCommit":{"message":"[Cloud Security] Graph visualization and API (#195307)\n\n## Summary\r\n\r\nThis PR adds:\r\n- Graph visualization component using `xyflow`, and layouts the graph\r\nusing `dagre`.\r\n- API that supports the graph visualization\r\n- API tests\r\n- Serverless API tests\r\n\r\n**List of open issues (will be tracked in a different ticket):**\r\n- Identify if `related.hosts`, `related.ip` and `related.user` are\r\nmapped before the query. (can be fixed by\r\nhttps://github.com/elastic/elasticsearch/issues/112912)\r\n- Update nodes rendering to match recent figma changes\r\n- Return 404 when feature is not enabled\r\n- Add keyboard accessibility\r\n- Resolve axe failures (run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n\r\n### How to test\r\n\r\nYou can view the graph using storybook's\r\n[playground](https://supreme-adventure-8qjmlp1.pages.github.io/graph-storybook/?path=/story/components-graph-components-dagree-layout-graph--graph-stacked-edge-cases).\r\n\r\nTo test this PR you can run\r\n\r\n```\r\nyarn storybook cloud_security_posture_packages\r\n```\r\n\r\nTo test the API you can use the mocked data\r\n\r\n```bash\r\nnode scripts/es_archiver load x-pack/test/cloud_security_posture_api/es_archives/logs_gcp_audit \\ \r\n--es-url http://elastic:changeme@localhost:9200 \\\r\n--kibana-url http://elastic:changeme@localhost:5601\r\n```\r\n\r\nAnd through dev tools:\r\n\r\n```\r\nPOST kbn:/internal/cloud_security_posture/graph?apiVersion=1\r\n{\r\n \"query\": {\r\n \"actorIds\": [\"admin@example.com\"],\r\n \"eventIds\": [\"\"],\r\n \"start\": \"now-1y/y\",\r\n \"end\": \"now/d\"\r\n }\r\n}\r\n```\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"be0eadfb9fa08f0d73383884dc67bf2005b7daba"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195307","number":195307,"mergeCommit":{"message":"[Cloud Security] Graph visualization and API (#195307)\n\n## Summary\r\n\r\nThis PR adds:\r\n- Graph visualization component using `xyflow`, and layouts the graph\r\nusing `dagre`.\r\n- API that supports the graph visualization\r\n- API tests\r\n- Serverless API tests\r\n\r\n**List of open issues (will be tracked in a different ticket):**\r\n- Identify if `related.hosts`, `related.ip` and `related.user` are\r\nmapped before the query. (can be fixed by\r\nhttps://github.com/elastic/elasticsearch/issues/112912)\r\n- Update nodes rendering to match recent figma changes\r\n- Return 404 when feature is not enabled\r\n- Add keyboard accessibility\r\n- Resolve axe failures (run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n\r\n### How to test\r\n\r\nYou can view the graph using storybook's\r\n[playground](https://supreme-adventure-8qjmlp1.pages.github.io/graph-storybook/?path=/story/components-graph-components-dagree-layout-graph--graph-stacked-edge-cases).\r\n\r\nTo test this PR you can run\r\n\r\n```\r\nyarn storybook cloud_security_posture_packages\r\n```\r\n\r\nTo test the API you can use the mocked data\r\n\r\n```bash\r\nnode scripts/es_archiver load x-pack/test/cloud_security_posture_api/es_archives/logs_gcp_audit \\ \r\n--es-url http://elastic:changeme@localhost:9200 \\\r\n--kibana-url http://elastic:changeme@localhost:5601\r\n```\r\n\r\nAnd through dev tools:\r\n\r\n```\r\nPOST kbn:/internal/cloud_security_posture/graph?apiVersion=1\r\n{\r\n \"query\": {\r\n \"actorIds\": [\"admin@example.com\"],\r\n \"eventIds\": [\"\"],\r\n \"start\": \"now-1y/y\",\r\n \"end\": \"now/d\"\r\n }\r\n}\r\n```\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\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- [x] [Flaky Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\r\nused on any tests changed\r\n- [ ] Any UI touched in this PR is usable by keyboard only (learn more\r\nabout [keyboard accessibility](https://webaim.org/techniques/keyboard/))\r\n- [ ] Any UI touched in this PR does not create any new axe failures\r\n(run axe in browser:\r\n[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),\r\n[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))\r\n- [x] This renders correctly on smaller devices using a responsive\r\nlayout. (You can test this [in your\r\nbrowser](https://www.browserstack.com/guide/responsive-testing-on-local-server))\r\n- [x] This was checked for [cross-browser\r\ncompatibility](https://www.elastic.co/support/matrix#matrix_browsers)\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"be0eadfb9fa08f0d73383884dc67bf2005b7daba"}},{"url":"https://github.com/elastic/kibana/pull/196012","number":196012,"branch":"8.x","state":"OPEN"}]}] BACKPORT--> Co-authored-by: Kfir Peled <61654899+kfirpeled@users.noreply.github.com> |
||
|
6939c8de78
|
[8.x] github-actions: notify github commands for all the observability code (#195219) (#195319)
# Backport This will backport the following commits from `main` to `8.x`: - [github-actions: notify github commands for all the observability code (#195219)](https://github.com/elastic/kibana/pull/195219) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Victor Martinez","email":"victormartinezrubio@gmail.com"},"sourceCommit":{"committedDate":"2024-10-07T20:19:08Z","message":"github-actions: notify github commands for all the observability code (#195219)","sha":"94aa9151695ec4d7a001195aa10cc25ea6e2d282","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major"],"title":"github-actions: notify github commands for all the observability code","number":195219,"url":"https://github.com/elastic/kibana/pull/195219","mergeCommit":{"message":"github-actions: notify github commands for all the observability code (#195219)","sha":"94aa9151695ec4d7a001195aa10cc25ea6e2d282"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195219","number":195219,"mergeCommit":{"message":"github-actions: notify github commands for all the observability code (#195219)","sha":"94aa9151695ec4d7a001195aa10cc25ea6e2d282"}}]}] BACKPORT--> Co-authored-by: Victor Martinez <victormartinezrubio@gmail.com> |
||
|
f2843437b1
|
[8.x] chore(deps): Add `joi` to the hapi group in renovate (#194623) (#194697)
# Backport This will backport the following commits from `main` to `8.x`: - [chore(deps): Add `joi` to the hapi group in renovate (#194623)](https://github.com/elastic/kibana/pull/194623) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alejandro Fernández Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2024-10-02T12:21:54Z","message":"chore(deps): Add `joi` to the hapi group in renovate (#194623)","sha":"4dca8f6f703bcaa5aba41c73d72457ede1c5d552","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Core","release_note:skip","dependencies","v9.0.0","backport:prev-minor"],"title":"chore(deps): Add `joi` to the hapi group in renovate","number":194623,"url":"https://github.com/elastic/kibana/pull/194623","mergeCommit":{"message":"chore(deps): Add `joi` to the hapi group in renovate (#194623)","sha":"4dca8f6f703bcaa5aba41c73d72457ede1c5d552"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194623","number":194623,"mergeCommit":{"message":"chore(deps): Add `joi` to the hapi group in renovate (#194623)","sha":"4dca8f6f703bcaa5aba41c73d72457ede1c5d552"}}]}] BACKPORT--> Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co> |
||
|
aac7f9cbc2
|
[8.x] chore(deps): upgrade `rxjs` (#194610) (#194698)
# Backport This will backport the following commits from `main` to `8.x`: - [chore(deps): upgrade `rxjs` (#194610)](https://github.com/elastic/kibana/pull/194610) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alejandro Fernández Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2024-10-02T12:22:28Z","message":"chore(deps): upgrade `rxjs` (#194610)","sha":"04fe43d4c2092732000a5d1c805315a74139c32f","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Core","release_note:skip","dependencies","v9.0.0","backport:prev-minor"],"title":"chore(deps): upgrade `rxjs`","number":194610,"url":"https://github.com/elastic/kibana/pull/194610","mergeCommit":{"message":"chore(deps): upgrade `rxjs` (#194610)","sha":"04fe43d4c2092732000a5d1c805315a74139c32f"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/194610","number":194610,"mergeCommit":{"message":"chore(deps): upgrade `rxjs` (#194610)","sha":"04fe43d4c2092732000a5d1c805315a74139c32f"}}]}] BACKPORT--> Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co> |
||
|
2c670dc76b
|
[8.x] Upgrade http dependencies (#180986) (#194616)
# Backport This will backport the following commits from `main` to `8.x`: - [Upgrade http dependencies (#180986)](https://github.com/elastic/kibana/pull/180986) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alejandro Fernández Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2024-10-01T16:50:47Z","message":"Upgrade http dependencies (#180986)\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>\r\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"d570d60b0bd950faaebf39e3e2f4f7481c116ac6","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","Feature:http","release_note:breaking","Team:Core","Team:Security","v9.0.0","Team:Defend Workflows","backport:prev-minor","Team:Detection Engine"],"title":"Upgrade http dependencies","number":180986,"url":"https://github.com/elastic/kibana/pull/180986","mergeCommit":{"message":"Upgrade http dependencies (#180986)\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>\r\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"d570d60b0bd950faaebf39e3e2f4f7481c116ac6"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/180986","number":180986,"mergeCommit":{"message":"Upgrade http dependencies (#180986)\n\nCo-authored-by: florent-leborgne <florent.leborgne@elastic.co>\r\nCo-authored-by: Rudolf Meijering <skaapgif@gmail.com>","sha":"d570d60b0bd950faaebf39e3e2f4f7481c116ac6"}}]}] BACKPORT--> Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co> |
||
|
afd45e4cac
|
[8.x] Adds @mswjs/http-middleware to renovate.json (#193257) (#193836)
# Backport This will backport the following commits from `main` to `8.x`: - [Adds @mswjs/http-middleware to renovate.json (#193257)](https://github.com/elastic/kibana/pull/193257) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Jeramy Soucy","email":"jeramy.soucy@elastic.co"},"sourceCommit":{"committedDate":"2024-09-18T13:44:53Z","message":"Adds @mswjs/http-middleware to renovate.json (#193257)\n\n## Summary\r\n\r\nAssigns ownership of new dev dep `@mswjs/http-middleware` to cloud\r\nsecurity team (`kibana-cloud-security-posture`).\r\n\r\nDependency was addded in https://github.com/elastic/kibana/pull/187219","sha":"c426b06aa442935d02cf171da66212ddce5e5ce9","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Security","release_note:skip","v9.0.0","v8.16.0","backport:version"],"title":"Adds @mswjs/http-middleware to renovate.json","number":193257,"url":"https://github.com/elastic/kibana/pull/193257","mergeCommit":{"message":"Adds @mswjs/http-middleware to renovate.json (#193257)\n\n## Summary\r\n\r\nAssigns ownership of new dev dep `@mswjs/http-middleware` to cloud\r\nsecurity team (`kibana-cloud-security-posture`).\r\n\r\nDependency was addded in https://github.com/elastic/kibana/pull/187219","sha":"c426b06aa442935d02cf171da66212ddce5e5ce9"}},"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/193257","number":193257,"mergeCommit":{"message":"Adds @mswjs/http-middleware to renovate.json (#193257)\n\n## Summary\r\n\r\nAssigns ownership of new dev dep `@mswjs/http-middleware` to cloud\r\nsecurity team (`kibana-cloud-security-posture`).\r\n\r\nDependency was addded in https://github.com/elastic/kibana/pull/187219","sha":"c426b06aa442935d02cf171da66212ddce5e5ce9"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co> |
||
|
71ad243504
|
[8.x] [Feature Flags Service] Hello world 👋 (#188562) (#193519)
# Backport This will backport the following commits from `main` to `8.x`: - [[Feature Flags Service] Hello world 👋 (#188562)](https://github.com/elastic/kibana/pull/188562) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alejandro Fernández Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2024-09-18T16:02:55Z","message":"[Feature Flags Service] Hello world 👋 (#188562)\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>","sha":"02ce1b91014eb59f019854b01325bbdf983d2218","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","Team:Operations","Team:Security","release_note:skip","Team:Observability","Team:Fleet","v9.0.0","Team: SecuritySolution","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-logs"],"number":188562,"url":"https://github.com/elastic/kibana/pull/188562","mergeCommit":{"message":"[Feature Flags Service] Hello world 👋 (#188562)\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>","sha":"02ce1b91014eb59f019854b01325bbdf983d2218"}},"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/188562","number":188562,"mergeCommit":{"message":"[Feature Flags Service] Hello world 👋 (#188562)\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>","sha":"02ce1b91014eb59f019854b01325bbdf983d2218"}}]}] BACKPORT--> |
||
|
6a270cf4d6
|
Upgrade @testing-library/user-event to latest ^14.5.2 (#189949)
## Summary Upgrades `@testing-library/user-event` to `^14.5.2`. See the release notes for `v14` for breaking changes: https://github.com/testing-library/user-event/releases/tag/v14.0.0 I was facing an [issue](https://github.com/testing-library/user-event/issues/662) with `v13.5.0` with `userEvent.click()` in a PR (https://github.com/elastic/kibana/pull/189729) and was able to verify that `v14.4.3` onwards fixes it so I decided to update that package. What a rabbit hole 😅 ! - In `user-event` `v14` events return a promise, so this PR updates usage of the likes of `userEvent.click` with `await userEvent.click`. Regex to search for `userEvent` calls that miss `await` except `.setup`: `(?<!await\s)userEvent\.(?!setup\b)` - The way to handle pointer events needed changing from `, undefined, { skipPointerEventsCheck: true });` to `, { pointerEventsCheck: 0 });`. - I tried a bit to do the refactor with codemods, but there were quite some edge cases so it ended up being done manually. - I looked into all failing tests and tried my best to update them, but for some of them I lacked the context to make them work again. If you're a code owner and find a skipped test in this PR please give it a try to fix and push in this PR or let me know if it's fine for you to fix in follow ups. List of files where I had to skip tests (`git diff main...HEAD -G'\.skip' --name-only`): ### `packages/kbn-dom-drag-drop` - `packages/kbn-dom-drag-drop/src/droppable.test.tsx` ### `x-pack/plugins/cases` - `x-pack/plugins/cases/public/components/templates/form.test.tsx` - `x-pack/plugins/cases/public/components/user_actions/user_actions_list.test.tsx` ### `x-pack/plugins/cloud_security_posture` - `x-pack/plugins/cloud_security_posture/public/components/fleet_extensions/policy_template_form.test.tsx` ### `x-pack/plugins/lens` - `x-pack/plugins/lens/public/datasources/form_based/dimension_panel/format_selector.test.tsx` ### `x-pack/plugins/observability_solution` - `x-pack/plugins/observability_solution/synthetics/public/apps/synthetics/components/monitor_add_edit/fields/request_body_field.test.tsx` ### `x-pack/plugins/security_solution` - `x-pack/plugins/security_solution/public/management/components/console/components/command_input/integration_tests/command_input.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/kill_process_action.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/release_action.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/status_action.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/upload_action.test.tsx` - `x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx` - `x-pack/plugins/security_solution/public/management/pages/event_filters/view/components/event_filters_flyout.test.tsx` - `x-pack/plugins/security_solution/public/management/pages/response_actions/view/response_actions_list_page.test.tsx` ---- I plan to do a talk on Kibana Demo Days to walk through some of the breaking changes and learnings. ### Checklist - [x] [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 - [x] 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) |
||
|
2a4ac8b2e1
|
[Renovate] [msw] Update cloud security team label (#192110)
## Summary This PR fixes the team label used by the Renovate PRs for the MSW package. It also sets the `minimumReleaseAge` to 7 days for better maintainability. |
||
|
4041d274b3
|
[ON-WEEK][POC] Playwright (#190803)
## UPDATE It has been removed the execution of the playwright tests on buildkite, the execution will be re-enabled as soon as we are ready and as described below in the PR, there are still steps pending to be done. ## Motivation **Cypress is not performing well lately.** * We have been facing significant performance issues with Cypress. For instance, it takes a long time to open the visual interface and start executing tests. **Teams are finding it increasingly challenging to write new tests and debug existing ones.** * The time and effort required to create new tests or troubleshoot existing ones have become burdensome. **Concern about the impact this could have on our testing practices.** * Lose motivation to write tests or, worse, skip writing crucial tests. ## Why Playwright? * Compared to Cypress, Playwright seems to be known for its faster execution times and lower resource consumption. What could have a positive impact by having faster feedback during development and execution of new tests as well as more efficient use of CI resources. * Provides powerful debugging tools which can make easier to write, debug and execute tests. * Seems to provide the same capabilities we currently use in our Cypress tests. * Given Playwright's active development and backing by Microsoft, it is likely to continue evolving rapidly, making it a safe long-term choice. Considering all the above, Playwright seems to be a strong candidate to replace Cypress and address all the issues we are facing lately regarding UI test automation. ## Objective of this POC To write in Playwright a couple of tests we currently have on Cypress to check the performance of the tool as well as the development experience. The tests selected have been: - [enable_risk_score_redirect.cy.ts](https://github.com/elastic/kibana/blob/main/x-pack/test/security_solution_cypress/cypress/e2e/entity_analytics/dashboards/enable_risk_score_redirect.cy.ts) - Owned by Entity Analytics team and selected by its simplicity since it does not need any special setup to be executed and is short. - [manual_rule_run.cy.ts](https://github.com/elastic/kibana/blob/main/x-pack/test/security_solution_cypress/cypress/e2e/detection_response/detection_engine/rule_gaps/manual_rule_run.cy.ts) - Owned by Detection Engine team and selected because is short and adds a bit more of complexity due to it needs of clean-up and setting up initial data through the API. ## How to execute the tests ### Visual mode - Navigate to: `x-pack/test/security_solution_playwright` - Execute: `yarn open:ess` for ESS environment or `yarn open:serverless` for serverless environment. ### Headless mode - Navigate to: `x-pack/test/security_solution_playwright` - Execute: `yarn run:ess` for ESS environment or `yarn run:serverless` for serverless environment. ### From VScode - Install `Playwright Test for VScode` extension by Microsoft - Navigate to: `x-pack/test/security_solution_playwright` - Execute: `yarn open:ess` for ESS environment or `yarn open:serverless` for serverless environment. - Open your IDE - Click on the `Testing` icon - On the `Test Explorer` click on the three dots to select the profile you are going to execute `ess` or `serverless` - Click on the test you want to execute or navigate to the spec file of the test and execute it from the same spec. ## My experience - Tests are way easier to implement than with Cypress. - Playwright does not rely on chainable commands. Chainable commands on Cypress can lead to confusing code. - Without chainable commands, the flow of the tests is more explicit and easier to understand. - You can notice that the tool has been designed with Typescript in mind. - Is super easy to implement the Page Object Model pattern (POM). - With POM the test code is clean and focused on "what" rather than "how". - Love the fact that you can execute the tests from the same IDE without having to switch windows during test development. - The visual mode execution gives you lots of information out of the box. ## The scope of this PR - Sets the initial infrastructure to write and execute tests with Playwright. - Has examples and set a basis about how to write tests using the POM. - Allows the execution of the tests in ESS and serverless (just stateless environment). - Integrates the execution of the tests with buildkite. ## Pending to be done/investigate - Proper readme - How to split tests and PO between the different teams - Good reports on CI - Upload screenshots on CI - Flaky test suite runner - Complete the labeling - Execution of the tests on MKI environments ## FAQ **Can I start adding tests to playwright?** Currently, you can explore and experiment with Playwright, but there is still work pending to be done to make the tool officially usable. **Why security engineering productivity is the owner of the playwright folder?** This is something temporary to make sure that good practices are followed. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: dkirchan <diamantis.kirchantzoglou@elastic.co> Co-authored-by: Aleh Zasypkin <aleh.zasypkin@gmail.com> Co-authored-by: Jon <jon@budzenski.me> |
||
|
260df9d412
|
Revert "Update renovate config (#191304)" (#191495)
Reverts elastic/kibana#191304 |
||
|
f544fb05bb
|
Update renovate config (#191304)
## Summary Update the renovate configuration by migrating deprecated configuration to supported configuration. This was generated using the instructions found in https://docs.renovatebot.com/config-validation/: ```sh npx --yes --package renovate -- renovate-config-validator --strict ``` <details> <summary>View full output</summary> ``` INFO: Validating renovate.json WARN: Config migration necessary "oldConfig": { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:recommended", "helpers:pinGitHubActionDigests", "helpers:pinGitHubActionDigestsToSemver" ], "ignorePaths": ["**/__fixtures__/**", "**/fixtures/**"], "enabledManagers": ["npm", "github-actions", "custom.regex"], "baseBranches": ["main", "7.17"], "prConcurrentLimit": 0, "prHourlyLimit": 0, "separateMajorMinor": false, "rangeStrategy": "bump", "semanticCommits": "disabled", "vulnerabilityAlerts": {"enabled": false}, "lockFileMaintenance": {"enabled": false}, "packageRules": [ {"matchDepPatterns": [".*"], "enabled": false}, { "groupName": "chainguard", "matchPackageNames": ["docker.elastic.co/wolfi/chainguard-base"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "enabled": true }, { "groupName": "operations actions", "matchManagers": ["github-actions"], "matchPackageNames": [ "actions/checkout", "elastic/github-actions/project-assigner", "hmarr/auto-approve-action", "octokit/graphql-action", "sergeysova/jq-action", "sourenlouv/backport" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "backport:all-open", "release_note:skip"], "enabled": true }, { "groupName": "@elastic/charts", "matchDepNames": ["@elastic/charts"], "reviewers": ["team:visualizations", "markov00", "nickofthyme"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip", "Team:Visualizations"], "enabled": true }, { "groupName": "@elastic/elasticsearch", "matchDepNames": ["@elastic/elasticsearch"], "reviewers": ["team:kibana-operations", "team:kibana-core"], "matchBaseBranches": ["main"], "labels": [ "release_note:skip", "backport:skip", "Team:Operations", "Team:Core" ], "enabled": true }, { "groupName": "@elastic/elasticsearch", "matchDepNames": ["@elastic/elasticsearch"], "reviewers": ["team:kibana-operations", "team:kibana-core"], "matchBaseBranches": ["7.17"], "labels": [ "release_note:skip", "Team:Operations", "Team:Core", "backport:skip" ], "enabled": true }, { "groupName": "LaunchDarkly", "matchDepNames": [ "launchdarkly-js-client-sdk", "@launchdarkly/node-server-sdk", "launchdarkly/find-code-references" ], "reviewers": ["team:kibana-security", "team:kibana-core"], "matchBaseBranches": ["main"], "labels": [ "release_note:skip", "Team:Security", "Team:Core", "backport:prev-minor" ], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "APM", "matchDepNames": [ "elastic-apm-node", "@elastic/apm-rum", "@elastic/apm-rum-react" ], "reviewers": ["team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "Team:Core", "backport:skip"], "enabled": true }, { "groupName": "@elastic/ebt", "matchDepNames": ["@elastic/ebt"], "reviewers": ["team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "Team:Core", "backport:skip"], "enabled": true }, { "groupName": "ansi-regex", "matchDepNames": ["ansi-regex"], "reviewers": ["team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "Team:Core", "backport:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "OpenAPI Spec", "matchDepNames": ["@redocly/cli"], "reviewers": ["team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "Team:Core", "backport:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "babel", "matchDepNames": ["@types/babel__core", "/^@babel/", "/^babel-plugin/"], "matchDepPatterns": ["^@babel", "^babel-plugin"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "typescript", "matchDepNames": ["typescript", "@types/jsdom"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "prettier", "matchDepNames": [ "prettier", "eslint-plugin-prettier", "eslint-config-prettier" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "allowedVersions": "<3.0", "enabled": true }, { "groupName": "typescript-eslint", "matchDepPatterns": ["^@typescript-eslint"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "eslint-plugin-depend", "matchDepPatterns": ["eslint-plugin-depend"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "polyfills", "matchDepNames": ["core-js", "/polyfill/"], "matchDepPatterns": ["polyfill"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "CLI tooling", "matchDepNames": ["listr2"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "backport:all-open", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "vega related modules", "matchDepNames": [ "vega", "vega-lite", "vega-schema-url-parser", "vega-tooltip" ], "reviewers": ["team:kibana-visualizations"], "matchBaseBranches": ["main"], "labels": ["Feature:Vega", "Team:Visualizations"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "cypress", "matchDepPatterns": ["cypress"], "reviewers": ["Team:apm", "Team: SecuritySolution"], "matchBaseBranches": ["main"], "labels": ["buildkite-ci", "ci:all-cypress-suites"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "security solution modules", "matchDepNames": ["zod", "langchain"], "reviewers": ["Team: SecuritySolution"], "matchBaseBranches": ["main"], "labels": ["Team: SecuritySolution"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "platform security modules", "matchDepNames": [ "css.escape", "node-forge", "formik", "@types/node-forge", "require-in-the-middle", "tough-cookie", "@types/tough-cookie", "xml-crypto", "@types/xml-crypto", "@kayahr/text-encoding" ], "reviewers": ["team:kibana-security"], "matchBaseBranches": ["main"], "labels": ["Team:Security", "release_note:skip", "backport:all-open"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "CodeQL", "matchDepNames": [ "github/codeql-action/analyze", "github/codeql-action/init" ], "reviewers": ["team:kibana-security"], "matchBaseBranches": ["main"], "labels": ["Team:Security", "release_note:skip", "backport:all-open"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "ftr", "matchDepNames": [ "@types/chromedriver", "@types/selenium-webdriver", "chromedriver", "geckodriver", "ms-chromium-edge-driver", "selenium-webdriver" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "scss", "matchDepNames": ["sass-embedded"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip", "backport:all-open"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "minify", "matchDepNames": ["gulp-terser", "terser"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "@testing-library", "matchDepNames": [ "@testing-library/dom", "@testing-library/jest-dom", "@testing-library/react", "@testing-library/react-hooks", "@testing-library/user-event", "@types/testing-library__jest-dom" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "jest", "matchDepNames": [ "@jest/console", "@jest/reporters", "@jest/types", "babel-jest", "expect", "jest", "jest-cli", "jest-config", "jest-diff", "jest-environment-jsdom", "jest-matcher-utils", "jest-mock", "jest-runtime", "jest-snapshot" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "@storybook", "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "matchDepPatterns": ["^@storybook"], "excludeDepNames": ["@storybook/testing-react"], "labels": [ "Team:Operations", "release_note:skip", "ci:build-storybooks", "backport:skip" ], "minimumReleaseAge": "7 days", "allowedVersions": "<7.0", "enabled": true }, { "groupName": "@storybook/testing-react", "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "matchDepNames": ["@storybook/testing-react"], "labels": [ "Team:Operations", "release_note:skip", "ci:build-storybooks", "backport:skip" ], "minimumReleaseAge": "7 days", "allowedVersions": "<2.0", "enabled": true }, { "groupName": "react-query", "matchDepNames": [ "@tanstack/react-query", "@tanstack/react-query-devtools" ], "reviewers": [ "team:response-ops", "team:kibana-cloud-security-posture", "team:security-asset-management", "team:fleet", "team:awp-platform", "team:security-onboarding-and-lifecycle-mgt" ], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "react-hook-form", "matchDepNames": ["react-hook-form"], "reviewers": ["team:security-asset-management", "team:uptime"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "redux", "matchDepNames": ["redux", "react-redux"], "reviewers": [ "team:search-kibana", "team:kibana-presentation", "team:kibana-data-discovery", "team:kibana-management", "team:kibana-gis", "team:security-solution" ], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "Profiling", "matchDepNames": ["peggy", "@types/dagre"], "reviewers": ["team:obs-ux-infra_services-team"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "TTY Output", "matchDepNames": ["xterm", "byte-size", "@types/byte-size"], "reviewers": ["team:sec-cloudnative-integrations"], "matchBaseBranches": ["main"], "labels": [ "Team: AWP: Visualization", "release_note:skip", "backport:skip" ], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "Cloud Defend", "matchDepNames": ["monaco-yaml"], "reviewers": ["team:sec-cloudnative-integrations"], "matchBaseBranches": ["main"], "labels": [ "Team: Cloud Native Integrations", "release_note:skip", "backport:skip" ], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "JSON Web Token", "matchDepNames": ["jsonwebtoken"], "reviewers": ["team:response-ops", "team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:all-open"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "XState", "matchDepNames": ["xstate", "@xstate/{/,}**"], "matchDepPrefixes": ["@xstate/"], "reviewers": ["team:obs-ux-logs-team"], "matchBaseBranches": ["main"], "labels": ["Team:Obs UX Logs", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "OpenTelemetry modules", "matchDepPrefixes": ["@opentelemetry/"], "reviewers": ["team:stack-monitoring"], "matchBaseBranches": ["main"], "labels": ["Team:Monitoring"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "csp", "matchDepNames": ["content-security-policy-parser"], "reviewers": ["team:kibana-security", "team:kibana-core"], "matchBaseBranches": ["main"], "labels": [ "release_note:skip", "backport:skip", "ci:serverless-test-all" ], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "AlertingEmails", "matchDepNames": ["nodemailer"], "reviewers": ["team:response-ops"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:prev-minor"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "Kibana ES|QL Team", "matchDepNames": ["recast"], "reviewers": ["team:kibana-esql"], "matchBaseBranches": ["main"], "labels": ["Team:ESQL", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "MSW", "matchPackageNames": ["msw"], "reviewers": ["team:kibana-cloud-security-posture"], "matchBaseBranches": ["main"], "labels": ["Team: Cloud Security", "release_note:skip", "backport:skip"], "enabled": true }, { "groupName": "re2js", "matchDepNames": ["re2js"], "reviewers": ["team:visualizations", "dej611"], "matchBaseBranches": ["main"], "labels": [ "release_note:skip", "backport:all-open", "Team:Visualizations" ], "enabled": true }, { "groupName": "Serve swagger docs", "matchDepNames": ["express", "swagger-jsdoc", "swagger-ui-express"], "reviewers": ["team:obs-entities"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "team:obs-entities"], "enabled": true } ], "customManagers": [ { "description": "Update Wolfi base image", "customType": "regex", "fileMatch": [ "^src/dev/build/tasks/os_packages/docker_generator/run\\.ts$" ], "matchStrings": [ "(?<depName>docker\\.elastic\\.co/wolfi/chainguard-base):(?<currentValue>[-a-zA-Z0-9.]+)?(?:@(?<currentDigest>sha256:[a-fA-F0-9]+))?" ], "datasourceTemplate": "docker" }, { "description": "Update pipelib image", "customType": "regex", "fileMatch": [ "^\\.buildkite/pipeline-resource-definitions/scripts/validate-pipeline-definition\\.sh$", "^\\.buildkite/scripts/steps/checks/renovate\\.sh$" ], "matchStrings": [ "(?<depName>docker\\.elastic\\.co/ci-agent-images/pipelib):(?<currentValue>[-a-zA-Z0-9.]+)?(?:@(?<currentDigest>sha256:[a-fA-F0-9]+))?" ], "datasourceTemplate": "docker" } ] }, "newConfig": { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "config:recommended", "helpers:pinGitHubActionDigests", "helpers:pinGitHubActionDigestsToSemver" ], "ignorePaths": ["**/__fixtures__/**", "**/fixtures/**"], "enabledManagers": ["npm", "github-actions", "custom.regex"], "baseBranches": ["main", "7.17"], "prConcurrentLimit": 0, "prHourlyLimit": 0, "separateMajorMinor": false, "rangeStrategy": "bump", "semanticCommits": "disabled", "vulnerabilityAlerts": {"enabled": false}, "lockFileMaintenance": {"enabled": false}, "packageRules": [ {"enabled": false, "matchDepNames": ["/.*/"]}, { "groupName": "chainguard", "matchPackageNames": ["docker.elastic.co/wolfi/chainguard-base"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "enabled": true }, { "groupName": "operations actions", "matchManagers": ["github-actions"], "matchPackageNames": [ "actions/checkout", "elastic/github-actions/project-assigner", "hmarr/auto-approve-action", "octokit/graphql-action", "sergeysova/jq-action", "sourenlouv/backport" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "backport:all-open", "release_note:skip"], "enabled": true }, { "groupName": "@elastic/charts", "matchDepNames": ["@elastic/charts"], "reviewers": ["team:visualizations", "markov00", "nickofthyme"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip", "Team:Visualizations"], "enabled": true }, { "groupName": "@elastic/elasticsearch", "matchDepNames": ["@elastic/elasticsearch"], "reviewers": ["team:kibana-operations", "team:kibana-core"], "matchBaseBranches": ["main"], "labels": [ "release_note:skip", "backport:skip", "Team:Operations", "Team:Core" ], "enabled": true }, { "groupName": "@elastic/elasticsearch", "matchDepNames": ["@elastic/elasticsearch"], "reviewers": ["team:kibana-operations", "team:kibana-core"], "matchBaseBranches": ["7.17"], "labels": [ "release_note:skip", "Team:Operations", "Team:Core", "backport:skip" ], "enabled": true }, { "groupName": "LaunchDarkly", "matchDepNames": [ "launchdarkly-js-client-sdk", "@launchdarkly/node-server-sdk", "launchdarkly/find-code-references" ], "reviewers": ["team:kibana-security", "team:kibana-core"], "matchBaseBranches": ["main"], "labels": [ "release_note:skip", "Team:Security", "Team:Core", "backport:prev-minor" ], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "APM", "matchDepNames": [ "elastic-apm-node", "@elastic/apm-rum", "@elastic/apm-rum-react" ], "reviewers": ["team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "Team:Core", "backport:skip"], "enabled": true }, { "groupName": "@elastic/ebt", "matchDepNames": ["@elastic/ebt"], "reviewers": ["team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "Team:Core", "backport:skip"], "enabled": true }, { "groupName": "ansi-regex", "matchDepNames": ["ansi-regex"], "reviewers": ["team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "Team:Core", "backport:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "OpenAPI Spec", "matchDepNames": ["@redocly/cli"], "reviewers": ["team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "Team:Core", "backport:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "babel", "matchDepNames": ["@types/babel__core", "/^@babel/", "/^babel-plugin/"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "typescript", "matchDepNames": ["typescript", "@types/jsdom"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "prettier", "matchDepNames": [ "prettier", "eslint-plugin-prettier", "eslint-config-prettier" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "allowedVersions": "<3.0", "enabled": true }, { "groupName": "typescript-eslint", "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true, "matchDepNames": ["/^@typescript-eslint/"] }, { "groupName": "eslint-plugin-depend", "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true, "matchDepNames": ["/eslint-plugin-depend/"] }, { "groupName": "polyfills", "matchDepNames": ["core-js", "/polyfill/"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "CLI tooling", "matchDepNames": ["listr2"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "backport:all-open", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "vega related modules", "matchDepNames": [ "vega", "vega-lite", "vega-schema-url-parser", "vega-tooltip" ], "reviewers": ["team:kibana-visualizations"], "matchBaseBranches": ["main"], "labels": ["Feature:Vega", "Team:Visualizations"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "cypress", "reviewers": ["Team:apm", "Team: SecuritySolution"], "matchBaseBranches": ["main"], "labels": ["buildkite-ci", "ci:all-cypress-suites"], "minimumReleaseAge": "7 days", "enabled": true, "matchDepNames": ["/cypress/"] }, { "groupName": "security solution modules", "matchDepNames": ["zod", "langchain"], "reviewers": ["Team: SecuritySolution"], "matchBaseBranches": ["main"], "labels": ["Team: SecuritySolution"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "platform security modules", "matchDepNames": [ "css.escape", "node-forge", "formik", "@types/node-forge", "require-in-the-middle", "tough-cookie", "@types/tough-cookie", "xml-crypto", "@types/xml-crypto", "@kayahr/text-encoding" ], "reviewers": ["team:kibana-security"], "matchBaseBranches": ["main"], "labels": ["Team:Security", "release_note:skip", "backport:all-open"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "CodeQL", "matchDepNames": [ "github/codeql-action/analyze", "github/codeql-action/init" ], "reviewers": ["team:kibana-security"], "matchBaseBranches": ["main"], "labels": ["Team:Security", "release_note:skip", "backport:all-open"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "ftr", "matchDepNames": [ "@types/chromedriver", "@types/selenium-webdriver", "chromedriver", "geckodriver", "ms-chromium-edge-driver", "selenium-webdriver" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "scss", "matchDepNames": ["sass-embedded"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip", "backport:all-open"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "minify", "matchDepNames": ["gulp-terser", "terser"], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "@testing-library", "matchDepNames": [ "@testing-library/dom", "@testing-library/jest-dom", "@testing-library/react", "@testing-library/react-hooks", "@testing-library/user-event", "@types/testing-library__jest-dom" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "jest", "matchDepNames": [ "@jest/console", "@jest/reporters", "@jest/types", "babel-jest", "expect", "jest", "jest-cli", "jest-config", "jest-diff", "jest-environment-jsdom", "jest-matcher-utils", "jest-mock", "jest-runtime", "jest-snapshot" ], "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": ["Team:Operations", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "@storybook", "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "labels": [ "Team:Operations", "release_note:skip", "ci:build-storybooks", "backport:skip" ], "minimumReleaseAge": "7 days", "allowedVersions": "<7.0", "enabled": true, "matchDepNames": ["/^@storybook/", "!@storybook/testing-react"] }, { "groupName": "@storybook/testing-react", "reviewers": ["team:kibana-operations"], "matchBaseBranches": ["main"], "matchDepNames": ["@storybook/testing-react"], "labels": [ "Team:Operations", "release_note:skip", "ci:build-storybooks", "backport:skip" ], "minimumReleaseAge": "7 days", "allowedVersions": "<2.0", "enabled": true }, { "groupName": "react-query", "matchDepNames": [ "@tanstack/react-query", "@tanstack/react-query-devtools" ], "reviewers": [ "team:response-ops", "team:kibana-cloud-security-posture", "team:security-asset-management", "team:fleet", "team:awp-platform", "team:security-onboarding-and-lifecycle-mgt" ], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "react-hook-form", "matchDepNames": ["react-hook-form"], "reviewers": ["team:security-asset-management", "team:uptime"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "redux", "matchDepNames": ["redux", "react-redux"], "reviewers": [ "team:search-kibana", "team:kibana-presentation", "team:kibana-data-discovery", "team:kibana-management", "team:kibana-gis", "team:security-solution" ], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip", "ci:all-cypress-suites"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "Profiling", "matchDepNames": ["peggy", "@types/dagre"], "reviewers": ["team:obs-ux-infra_services-team"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "TTY Output", "matchDepNames": ["xterm", "byte-size", "@types/byte-size"], "reviewers": ["team:sec-cloudnative-integrations"], "matchBaseBranches": ["main"], "labels": [ "Team: AWP: Visualization", "release_note:skip", "backport:skip" ], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "Cloud Defend", "matchDepNames": ["monaco-yaml"], "reviewers": ["team:sec-cloudnative-integrations"], "matchBaseBranches": ["main"], "labels": [ "Team: Cloud Native Integrations", "release_note:skip", "backport:skip" ], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "JSON Web Token", "matchDepNames": ["jsonwebtoken"], "reviewers": ["team:response-ops", "team:kibana-core"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:all-open"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "XState", "matchDepNames": ["xstate", "@xstate/{/,}**"], "reviewers": ["team:obs-ux-logs-team"], "matchBaseBranches": ["main"], "labels": ["Team:Obs UX Logs", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "OpenTelemetry modules", "reviewers": ["team:stack-monitoring"], "matchBaseBranches": ["main"], "labels": ["Team:Monitoring"], "minimumReleaseAge": "7 days", "enabled": true, "matchDepNames": ["@opentelemetry/{/,}**"] }, { "groupName": "csp", "matchDepNames": ["content-security-policy-parser"], "reviewers": ["team:kibana-security", "team:kibana-core"], "matchBaseBranches": ["main"], "labels": [ "release_note:skip", "backport:skip", "ci:serverless-test-all" ], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "AlertingEmails", "matchDepNames": ["nodemailer"], "reviewers": ["team:response-ops"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "backport:prev-minor"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "Kibana ES|QL Team", "matchDepNames": ["recast"], "reviewers": ["team:kibana-esql"], "matchBaseBranches": ["main"], "labels": ["Team:ESQL", "release_note:skip"], "minimumReleaseAge": "7 days", "enabled": true }, { "groupName": "MSW", "matchPackageNames": ["msw"], "reviewers": ["team:kibana-cloud-security-posture"], "matchBaseBranches": ["main"], "labels": ["Team: Cloud Security", "release_note:skip", "backport:skip"], "enabled": true }, { "groupName": "re2js", "matchDepNames": ["re2js"], "reviewers": ["team:visualizations", "dej611"], "matchBaseBranches": ["main"], "labels": [ "release_note:skip", "backport:all-open", "Team:Visualizations" ], "enabled": true }, { "groupName": "Serve swagger docs", "matchDepNames": ["express", "swagger-jsdoc", "swagger-ui-express"], "reviewers": ["team:obs-entities"], "matchBaseBranches": ["main"], "labels": ["release_note:skip", "team:obs-entities"], "enabled": true } ], "customManagers": [ { "description": "Update Wolfi base image", "customType": "regex", "fileMatch": [ "^src/dev/build/tasks/os_packages/docker_generator/run\\.ts$" ], "matchStrings": [ "(?<depName>docker\\.elastic\\.co/wolfi/chainguard-base):(?<currentValue>[-a-zA-Z0-9.]+)?(?:@(?<currentDigest>sha256:[a-fA-F0-9]+))?" ], "datasourceTemplate": "docker" }, { "description": "Update pipelib image", "customType": "regex", "fileMatch": [ "^\\.buildkite/pipeline-resource-definitions/scripts/validate-pipeline-definition\\.sh$", "^\\.buildkite/scripts/steps/checks/renovate\\.sh$" ], "matchStrings": [ "(?<depName>docker\\.elastic\\.co/ci-agent-images/pipelib):(?<currentValue>[-a-zA-Z0-9.]+)?(?:@(?<currentDigest>sha256:[a-fA-F0-9]+))?" ], "datasourceTemplate": "docker" } ] } ``` </details> ------ This PR has 2 commits: 1. ` |
||
|
d07ffe2a04
|
Add Kibana Dev Container (#188887)
## Summary
- Closes elastic/kibana-operations#101
This PR adds a [Dev Container](https://containers.dev/) to utilize for
Kibana local development in an isolated environment. The original
intention was to create a local environment for FIPS development because
setting up Kibana in FIPS mode is complicated and has the potential to
break the user's OS. However, it has been altered to allow for general
development if an engineer chooses as well. The idea is for this be a
cost efficient replacement for
[kibana-remote-dev](https://github.com/elastic/kibana-remote-dev)
eventually.
### Testing
- In VS Code you should be able to use the `Dev Containers: Clone GitHub
Pull Request in Named Container Volume...` command from the Command
Palette (F1) to easily test this PR.
- See the
[docs](
|
||
|
9ab690e23b
|
Upgrade FullStory snippet (#189960)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
f9c43f61c9
|
[ML] Replace apiDoc annotations with routes definitions for OpenAPI spec generation (#190840)
## Summary - Removes `apidoc-markdown` dependency and custom scripts for generating internal documentation for ML Kibana endpoints - Replaces apidoc annotations with `summary` and `description` props for route handlers and kbn-schemas to generate an OpenAPI spec file - `/internal/ml/jobs/delete_jobs` route was not versioned for some reason, I changed that #### How to test 1. Enable OAS endpoint in `kibana.dev.yml` ```yaml server.oas.enabled: true ``` 2. Start Kibana dev server ```bash yarn start --no-base-path ``` 3. Call the OAS endpoint for ML _internal_ routes ```bash curl -s -u <USERNAME>:<PASSWORD> http://localhost:5601/api/oas\?pathStartsWith\=/internal/ml\&access\=internal -o ml_kibana_openapi.json ``` |
||
|
7f4b5389f0
|
[renovate] Label chainguard updates (#190719) | ||
|
e9c913dcb0
|
Add OpenAPI specs for EEM APIs (#190203) | ||
|
2077468c37
|
[renovate] Add launchdarkly github action (#190535)
Adds the GitHub action `launchdarkly/find-code-references` to the LaunchDarkly group of dependencies. A pull request will be opened shortly after introducing sha pinning to the dependency. |
||
|
4b0fb8fd58
|
[renovate] Add operations related github actions (#190538) | ||
|
69c50c8774
|
[renovate] Add CodeQL github action (#190537) | ||
|
0719f5c110
|
[renovate] Test github action package match (#190427)
Another attempt at fixing github action pinning. This scopes us to the actions/checkout package only for now, and we can expand it later. Previously: https://github.com/elastic/kibana/pull/190377, which was successful for the auto-approve-backport acttion. |
||
|
bec63eca4c
|
chore(renovate): add Regex Manager to enabledManagers (#190385)
## Summary As it's required for us to extract Chainguard images, as well as some other cases like Buildkite. ### 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) |
||
|
97fd4e4a42
|
[ci] Validate renovate config (#190234)
Adds `renovate.json` config validation to `Quick Checks` |
||
|
ed4139e0f7
|
fix(renovate): correctly specify depName for chainguard-base extraction (#190308)
## Summary As we had not specified a `depName` capture group - or explicitly defined `depNameTemplate`, Renovate's extraction fails, as it cannot determine which package it is matching on. Closes #190204 ### 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) |
||
|
60c5eca33e
|
Feat/renovate custom chainguard matcher pt2 (#190260)
## Summary Drops a comment for the current chaingaurd reference incase it is implemented in a tech that requires endings other than `.ts`, and then creates a PR grouping for the chainguard images. |
||
|
5f985213af
|
Add eslint-plugin-depend (#190233)
|
||
|
77be3c0b32
|
add custom matcher for run.ts (#190186)
## Summary A custom matcher for chainguard updates. https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/run.ts#L46 |
||
|
a1dd807718
|
[ci] Fix renovate config (#190242)
Will follow up with a check to prevent these issues with https://github.com/elastic/kibana/pull/190234 |
||
|
9a54dbcf8d
|
[renovate] Enable GitHub actions (#190173)
https://docs.renovatebot.com/modules/manager/github-actions/ |
||
|
7bd6ca647d
|
[renovate] Do not backport redocly/cli updates (#189471) | ||
|
e67b9678b3
|
[Renovate] Restrict prettier version (#189124)
## Summary Upgrade to `prettier@3` is blocked by jest upgrade to `jest@30`. See https://github.com/elastic/kibana/pull/188021#issuecomment-2221253306 |
||
|
49a985625b
|
Upgrade prettier dependencies (#188032)
## Summary - Upgrade `prettier` to `v2.8.x`. - Upgrade related decencies. - Adds `prettier` group to renovate config. - Fixes bootstrapping type error. ## Main Changes ### Add parentheses for `TypeofTypeAnnotation` to improve readability [link](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#add-parentheses-for-typeoftypeannotation-to-improve-readability-14458-by-fisker) ```ts // Input type A = (typeof node.children)[]; // Prettier 2.8.4 type A = typeof node.children[]; // Prettier 2.8.5 type A = (typeof node.children)[]; ``` ### Add parentheses to head of `ExpressionStatement` instead of the whole statement [link](https://github.com/prettier/prettier/blob/main/CHANGELOG.md#add-parentheses-to-head-of-expressionstatement-instead-of-the-whole-statement-14077-by-fisker) ```ts // Input ({}).toString.call(foo) === "[object Array]" ? foo.forEach(iterateArray) : iterateObject(foo); // Prettier 2.8.1 ({}.toString.call(foo) === "[object Array]" ? foo.forEach(iterateArray) : iterateObject(foo)); // Prettier 2.8.2 ({}).toString.call(foo.forEach) === "[object Array]" ? foo.forEach(iterateArray) : iterateObject(foo); ``` ## Details This started because I noticed we were on `typescript@^5` but still on an old prettier that complained about use of new TS features such as [`satisfies`](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator). --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
2caa75662d
|
Fix names for observability teams in renovate.json (#188693)
These were either outdated or using an incorrect GitHub team name. |
||
|
3c338a82c2
|
chore(NA): remove usage of re2 and replace it with a non native module (#188134)
This PR removes the usage of the native module version of `re2` and replaces it with a js port called `re2js`. It also ends our usage of native node modules in production and it removes the task from the build as well. Further steps will be taken along our strategy to avoid future usages of native node modules in prod environments. |
||
|
5cc881cec2
|
fix(renovate): remove "prCreation":"not-pending" (#187027)
|
||
|
a46ea29bbd
|
chore(launchdarkly): Update renovate rule (#186979) | ||
|
cb11a1b004
|
[Cloud Security] Adding MSW for mocking server responses in React integration tests (#184555)
## Summary It closes #183977 This PR introduces the MSW library into Kibana and setups for MSW usage with Jest for integration testing of React components in the Cloud Security Posture plugin. It also adds the setup for the initial [handlers](https://mswjs.io/docs/concepts/request-handler/), and configures a test for the `<NoFindingsStates/>` components using MSW to exemplify how the library works. ### Problem Statement Currently, integration tests for React components that interact with the server are hard to write and maintain, as they often require mocking functions implementation and responses, this can lead to tests that do not accurately verify the intended functionality and can be hard to maintain as the implementation of the functions changes. This leads to situations our team faces now, where due to the difficult maintainability of integration tests, we rely much more on End-to-End tests, and maintaining those many End-to-End comes with its own set of tradeoffs, as oftentimes End-to-End tests are detected by the CI as failing or flaky, and as flakiness can happen in End-to-end tests due to its nature of multiple integrated systems, this concept proposes that it's better to reserve End-to-end tests for the features in the most critical path and tests that test multiple integrated systems as those will benefit most of the end-to-end testing. For all the other tests we should focus on unit and integration tests. ### How MSW works MSW is a library that allows you to mock server responses in your tests, it works by intercepting the requests made by the client and returning the mocked responses, this way we can test how the client behaves in different states of the lifecycle such as loading, error, and success. This proposes that we should use MSW to enhance our integration tests, and give preference to writing integration tests over End-to-End tests whenever possible, but this doesn't mean that we should stop writing end-to-end tests, as end-to-end tests are still important for the features in the most critical path and tests that tests multiple integrated systems. ### MSW Diagram Here's a diagram that shows how MSW works with Jest tests: ```mermaid %%{init:{'themeCSS':' g:nth-of-type(3) rect.actor { fill: #eee; };g:nth-of-type(7) rect.actor { fill: #eee; };'}}%% sequenceDiagram participant ReactComponent as React Component participant API as API participant MSW as MSW Mock Server participant Jest as Jest Test Jest->>ReactComponent: Setup component test and mock providers Jest->>MSW: Setup Mock Server Note over Jest,MSW: start listening for requests activate MSW ReactComponent->>API: Make API Call Note over ReactComponent,API: loading state activate API MSW-->>API: Intercepts API Call deactivate API alt is success MSW-->>ReactComponent: Send Mocked success Response else is error MSW-->>ReactComponent: Send Mocked error Response end deactivate MSW ReactComponent-->>Jest: Receive Mocked data and render ``` ### Documentation - Refer to this [PR](https://github.com/elastic/security-team/pull/9624) containing the documentation of how MSW works and how to use it. - Refer to this [presentation](https://docs.google.com/presentation/d/1KYtBaeDMZrpoU5lnKASm8GvCxhrXVqMKxWgR-Xvaxzc/edit#slide=id.g11f0f180654_1_0) to understand the main motivations behind this proposal. ### How to test it ``` yarn test:jest x-pack/plugins/cloud_security_posture/public/components/no_findings_states.test.tsx ``` ### Screenshot  | ||
|
eaed27c14b
|
Update renovate config (#184785)
- Replace the `extends` config from the deprecated `config:base` to `config:recommended`. - Removes global defaults from top-level group and applies the `prCreation` and `stabilityDays` options only to non-elastic dependency groups. - Replaces deprecated `stabilityDays` option with new [`minimumReleaseAge`](https://docs.renovatebot.com/configuration-options/#minimumreleaseage). - Replaces all `matchPackage*` options to `matchDep*` options. - Format entire config file with prettier. |
||
|
95eb12cc45
|
[Search] Renaming the search frontend group (#184565)
## Summary This renames the enterprise-search-frontend group to search-kibana to better align with what our group actually does. |
||
|
c4ef9bdccf
|
[ES|QL] generate function validation tests (#183343)
## Summary Close https://github.com/elastic/kibana/issues/182390 ### To test You can test all aspects of the script by first making some changes to `packages/kbn-esql-validation-autocomplete/src/validation/validation.test.ts` - delete several tests from an existing function describe block ("block 1"—except don't choose "date_diff" since it has a bunch of custom tests) - delete another function describe block completely ("block 2") - change the expected result of several of the tests in a third function describe block ("block 3") Then, run `yarn maketests` from within `packages/kbn-esql-validation-autocomplete` **Expected result** - Block 1 should have the deleted tests restored - Block 2 should be restored entirely (though it may be moved in the tests file) - Block 3 should be untouched ### Checklist - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [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 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> |
||
|
d38cf12fca
|
Bump @redocly/cli to version 1.12.0 (#182744)
## Summary Bump @redocly/cli to version `1.12.0`. [Changelog](https://redocly.com/docs/cli/changelog/) |
||
|
40a1641357
|
Migrate from listr to listr2 (#182683)
## Summary Migrates CLI tasks from `listr` to `listr2`. The former hasn't been updated in a long time, and the community has moved on to `listr2`. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
c8d7f42b2b
|
chore: bump ejs from 3.1.8 to 3.1.10 . (#182331)
## Summary Bump `ejs` from `3.1.8` to `3.1.10`. While looking at other packages that depend on `ejs` noticed `apidoc-markdown` that is only used by ML team, so assigned ownership in Rennovate as well (cc @elastic/ml-ui). ```shell npm ls ejs kibana@8.15.0 /kibana ├─┬ apidoc-markdown@7.3.2 │ └── ejs@3.1.10 deduped └── ejs@3.1.10 ``` |
||
|
bccb0cd4ba
|
Upgrade nodemailer dependency 6.6.2 -> 6.9.9 (#176487)
Update nodemailer production dependency (6.6.2 -> 6.9.9) Nodemailer changelog: - Fixing GHSA: https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md#699-2024-02-01 - Update hotmail/outlook well known service https://github.com/nodemailer/nodemailer/blob/master/CHANGELOG.md#673-2022-03-21 --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> |
||
|
dbf017ba31
|
Rename Management team name in codeowners file (#178626)
The AppEx Management team was recently renamed on GitHub from `platform-deployment-management` to `kibana-management`. This PR updates the Codeowners file and all references to the team name. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
|
613d25238b
|
[HTTP] Assert subset of CSP directives for serverless (#178411)
## Summary On serverless tests it would be useful to assert that a base set of CSP directives and values are present. ## Test Followed instructions in ./x-pack/test_serverless/README.md ## Notes - Added new dev dependency `content-security-policy-parser` to ease comparison of CSP directives |
||
|
5315f93b9c
|
Remove unused Renovate config package rule (#176819) |