# Backport
This will backport the following commits from `main` to `8.8`:
- [[Synthetics] Skip package installation on CI
(#155854)](https://github.com/elastic/kibana/pull/155854)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT
[{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2023-04-26T16:02:44Z","message":"[Synthetics]
Skip package installation on CI
(#155854)","sha":"559d928705d1e5d9510229b745612a17346181a1","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:uptime","release_note:skip","auto-backport","v8.8.0","v8.9.0"],"number":155854,"url":"https://github.com/elastic/kibana/pull/155854","mergeCommit":{"message":"[Synthetics]
Skip package installation on CI
(#155854)","sha":"559d928705d1e5d9510229b745612a17346181a1"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155854","number":155854,"mergeCommit":{"message":"[Synthetics]
Skip package installation on CI
(#155854)","sha":"559d928705d1e5d9510229b745612a17346181a1"}},{"branch":"8.9","label":"v8.9.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
# Backport
This will backport the following commits from `main` to `8.8`:
- [[lens] split x-pack/test/functional/apps/lens/group3/config.ts into
smaller groups (#155860)](https://github.com/elastic/kibana/pull/155860)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2023-04-27T18:14:41Z","message":"[lens]
split x-pack/test/functional/apps/lens/group3/config.ts into smaller
groups (#155860)\n\n## Summary\r\n\r\n\r\nRe-grouping lens functional
tests into 6 groups since 2 groups often\r\ncross the 35+ min runtime.
Also, we have retry in place so pipeline\r\nmight have +40 minutes run
if any of test fails.\r\n\r\n<img width=\"1354\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/10977896/234843379-aec47a81-22dc-4ecf-aee5-b1d489b3b31f.png\">\r\n\r\nx-pack/test/functional/apps/lens/group1/config.ts
18m 42s\r\nx-pack/test/functional/apps/lens/group2/config.ts 19m
26s\r\nx-pack/test/functional/apps/lens/group3/config.ts 18m
26s\r\nx-pack/test/functional/apps/lens/group4/config.ts 18m
40s\r\nx-pack/test/functional/apps/lens/group5/config.ts 17m
55s\r\nx-pack/test/functional/apps/lens/group6/config.ts 19m
24s\r\n\r\n---------\r\n\r\nCo-authored-by: Jon
<jon@budzenski.me>","sha":"483edea966bfdd0d801ad28d5b681ca008a45ec8","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v8.8.0","v8.7.2","v8.9.0"],"number":155860,"url":"https://github.com/elastic/kibana/pull/155860","mergeCommit":{"message":"[lens]
split x-pack/test/functional/apps/lens/group3/config.ts into smaller
groups (#155860)\n\n## Summary\r\n\r\n\r\nRe-grouping lens functional
tests into 6 groups since 2 groups often\r\ncross the 35+ min runtime.
Also, we have retry in place so pipeline\r\nmight have +40 minutes run
if any of test fails.\r\n\r\n<img width=\"1354\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/10977896/234843379-aec47a81-22dc-4ecf-aee5-b1d489b3b31f.png\">\r\n\r\nx-pack/test/functional/apps/lens/group1/config.ts
18m 42s\r\nx-pack/test/functional/apps/lens/group2/config.ts 19m
26s\r\nx-pack/test/functional/apps/lens/group3/config.ts 18m
26s\r\nx-pack/test/functional/apps/lens/group4/config.ts 18m
40s\r\nx-pack/test/functional/apps/lens/group5/config.ts 17m
55s\r\nx-pack/test/functional/apps/lens/group6/config.ts 19m
24s\r\n\r\n---------\r\n\r\nCo-authored-by: Jon
<jon@budzenski.me>","sha":"483edea966bfdd0d801ad28d5b681ca008a45ec8"}},"sourceBranch":"main","suggestedTargetBranches":["8.8","8.7"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155860","number":155860,"mergeCommit":{"message":"[lens]
split x-pack/test/functional/apps/lens/group3/config.ts into smaller
groups (#155860)\n\n## Summary\r\n\r\n\r\nRe-grouping lens functional
tests into 6 groups since 2 groups often\r\ncross the 35+ min runtime.
Also, we have retry in place so pipeline\r\nmight have +40 minutes run
if any of test fails.\r\n\r\n<img width=\"1354\"
alt=\"image\"\r\nsrc=\"https://user-images.githubusercontent.com/10977896/234843379-aec47a81-22dc-4ecf-aee5-b1d489b3b31f.png\">\r\n\r\nx-pack/test/functional/apps/lens/group1/config.ts
18m 42s\r\nx-pack/test/functional/apps/lens/group2/config.ts 19m
26s\r\nx-pack/test/functional/apps/lens/group3/config.ts 18m
26s\r\nx-pack/test/functional/apps/lens/group4/config.ts 18m
40s\r\nx-pack/test/functional/apps/lens/group5/config.ts 17m
55s\r\nx-pack/test/functional/apps/lens/group6/config.ts 19m
24s\r\n\r\n---------\r\n\r\nCo-authored-by: Jon
<jon@budzenski.me>","sha":"483edea966bfdd0d801ad28d5b681ca008a45ec8"}}]}]
BACKPORT-->
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
# Backport
This will backport the following commits from `main` to `8.8`:
- [[Security Solution][Investigations] - Add tests and handle building
block alerts (#155903)](https://github.com/elastic/kibana/pull/155903)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Michael
Olorunnisola","email":"michael.olorunnisola@elastic.co"},"sourceCommit":{"committedDate":"2023-04-27T16:45:44Z","message":"[Security
Solution][Investigations] - Add tests and handle building block alerts
(#155903)\n\n## Summary\r\n\r\nThis PR accomplishes a few
things:\r\n\r\n1. Make sure eql building block alerts show up when
redirecting directly\r\nto the alerts page (demo of this fix
below)\r\n2. Bumps up the time window from 1 ms to 5 min, to make it
easier to see\r\nother alerts when clearing out the filters\r\n3. Add
unit tests for the `alert_details_redirect.tsx` component\r\n4. Adds a
cypress test to test the presence of `kibana.alert.url` in an\r\nalert
document and updates the config with the `publicBaseUrl` field\r\nwhich
is needed for the field to be present.\r\n\r\n**Before the eql
fix:**\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/17211684/234636355-507b33fc-5211-4b02-9818-d1ba78fee115.mov\r\n\r\n\r\n\r\n**After
the eql
fix:**\r\n\r\n\r\nhttps://user-images.githubusercontent.com/17211684/234635657-bdbdc2cf-8a3e-4e5c-a14e-04f878f09e7b.mov\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d4477976e6ccf4bd91bb6852d19345492524f063","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","Team:Threat
Hunting:Investigations","v8.8.0","v8.9.0"],"number":155903,"url":"https://github.com/elastic/kibana/pull/155903","mergeCommit":{"message":"[Security
Solution][Investigations] - Add tests and handle building block alerts
(#155903)\n\n## Summary\r\n\r\nThis PR accomplishes a few
things:\r\n\r\n1. Make sure eql building block alerts show up when
redirecting directly\r\nto the alerts page (demo of this fix
below)\r\n2. Bumps up the time window from 1 ms to 5 min, to make it
easier to see\r\nother alerts when clearing out the filters\r\n3. Add
unit tests for the `alert_details_redirect.tsx` component\r\n4. Adds a
cypress test to test the presence of `kibana.alert.url` in an\r\nalert
document and updates the config with the `publicBaseUrl` field\r\nwhich
is needed for the field to be present.\r\n\r\n**Before the eql
fix:**\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/17211684/234636355-507b33fc-5211-4b02-9818-d1ba78fee115.mov\r\n\r\n\r\n\r\n**After
the eql
fix:**\r\n\r\n\r\nhttps://user-images.githubusercontent.com/17211684/234635657-bdbdc2cf-8a3e-4e5c-a14e-04f878f09e7b.mov\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d4477976e6ccf4bd91bb6852d19345492524f063"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155903","number":155903,"mergeCommit":{"message":"[Security
Solution][Investigations] - Add tests and handle building block alerts
(#155903)\n\n## Summary\r\n\r\nThis PR accomplishes a few
things:\r\n\r\n1. Make sure eql building block alerts show up when
redirecting directly\r\nto the alerts page (demo of this fix
below)\r\n2. Bumps up the time window from 1 ms to 5 min, to make it
easier to see\r\nother alerts when clearing out the filters\r\n3. Add
unit tests for the `alert_details_redirect.tsx` component\r\n4. Adds a
cypress test to test the presence of `kibana.alert.url` in an\r\nalert
document and updates the config with the `publicBaseUrl` field\r\nwhich
is needed for the field to be present.\r\n\r\n**Before the eql
fix:**\r\n\r\n\r\n\r\nhttps://user-images.githubusercontent.com/17211684/234636355-507b33fc-5211-4b02-9818-d1ba78fee115.mov\r\n\r\n\r\n\r\n**After
the eql
fix:**\r\n\r\n\r\nhttps://user-images.githubusercontent.com/17211684/234635657-bdbdc2cf-8a3e-4e5c-a14e-04f878f09e7b.mov\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"d4477976e6ccf4bd91bb6852d19345492524f063"}}]}]
BACKPORT-->
Co-authored-by: Michael Olorunnisola <michael.olorunnisola@elastic.co>
# Backport
This will backport the following commits from `main` to `8.8`:
- [[ML] Fix retention policy date field should list destination index
date fields (#155765)](https://github.com/elastic/kibana/pull/155765)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Quynh Nguyen
(Quinn)","email":"43350163+qn895@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-04-27T16:50:13Z","message":"[ML]
Fix retention policy date field should list destination index date
fields (#155765)\n\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"dcc280b5d81109e10ad8c738c33de2d8c19f6f90","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix",":ml","Feature:Transforms","v8.8.0","v8.7.2","v8.9.0"],"number":155765,"url":"https://github.com/elastic/kibana/pull/155765","mergeCommit":{"message":"[ML]
Fix retention policy date field should list destination index date
fields (#155765)\n\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"dcc280b5d81109e10ad8c738c33de2d8c19f6f90"}},"sourceBranch":"main","suggestedTargetBranches":["8.8","8.7"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.7","label":"v8.7.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155765","number":155765,"mergeCommit":{"message":"[ML]
Fix retention policy date field should list destination index date
fields (#155765)\n\nCo-authored-by: Kibana Machine
<42973632+kibanamachine@users.noreply.github.com>","sha":"dcc280b5d81109e10ad8c738c33de2d8c19f6f90"}}]}]
BACKPORT-->
Co-authored-by: Quynh Nguyen (Quinn) <43350163+qn895@users.noreply.github.com>
# Backport
This will backport the following commits from `main` to `8.8`:
- [[Cases] Fixing a few more integration tests with arraysToEqual
(#155942)](https://github.com/elastic/kibana/pull/155942)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Jonathan
Buttner","email":"56361221+jonathan-buttner@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-04-27T15:13:30Z","message":"[Cases]
Fixing a few more integration tests with arraysToEqual (#155942)\n\nThis
PR fixes a few integration tests that were failing because
the\r\nordering of the bulk creation of attachments isn't guaranteed.
The\r\nsolution is to compare the results ignoring ordering within the
arrays.\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/154640\r\n\r\nFlaky test runner
results:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2178\r\n🟢","sha":"7000f0d38d8827327bf90b025008643d3c7208dd","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","v8.8.0","v8.9.0"],"number":155942,"url":"https://github.com/elastic/kibana/pull/155942","mergeCommit":{"message":"[Cases]
Fixing a few more integration tests with arraysToEqual (#155942)\n\nThis
PR fixes a few integration tests that were failing because
the\r\nordering of the bulk creation of attachments isn't guaranteed.
The\r\nsolution is to compare the results ignoring ordering within the
arrays.\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/154640\r\n\r\nFlaky test runner
results:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2178\r\n🟢","sha":"7000f0d38d8827327bf90b025008643d3c7208dd"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155942","number":155942,"mergeCommit":{"message":"[Cases]
Fixing a few more integration tests with arraysToEqual (#155942)\n\nThis
PR fixes a few integration tests that were failing because
the\r\nordering of the bulk creation of attachments isn't guaranteed.
The\r\nsolution is to compare the results ignoring ordering within the
arrays.\r\n\r\nFixes:
https://github.com/elastic/kibana/issues/154640\r\n\r\nFlaky test runner
results:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2178\r\n🟢","sha":"7000f0d38d8827327bf90b025008643d3c7208dd"}}]}]
BACKPORT-->
Co-authored-by: Jonathan Buttner <56361221+jonathan-buttner@users.noreply.github.com>
# Backport
This will backport the following commits from `main` to `8.8`:
- [[Visualize2Lens] Transfers the custom timerange to the converted
panel (#155113)](https://github.com/elastic/kibana/pull/155113)
<!--- Backport version: 8.9.7 -->
### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)
<!--BACKPORT [{"author":{"name":"Stratoula
Kalafateli","email":"efstratia.kalafateli@elastic.co"},"sourceCommit":{"committedDate":"2023-04-27T09:11:35Z","message":"[Visualize2Lens]
Transfers the custom timerange to the converted panel (#155113)\n\n##
Summary\r\n\r\nPart of
https://github.com/elastic/kibana/issues/147646\r\n\r\nIt passes the
custom timerange to the converted Lens panel for both by\r\nref and by
value legacy visualizations.\r\nIt works for all paths:\r\n- Edit
visualization--> Edit in Lens--> Replace in dashboard\r\n- Convert to
Lens --> Replace in
dashboard\r\n\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Liberati
<dej611@users.noreply.github.com>","sha":"61c82dc8682edc33bc7a8483befed136052d95dc","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Feature:Visualizations","Team:Visualizations","Feature:Lens","backport:prev-minor","v8.8.0","v8.9.0"],"number":155113,"url":"https://github.com/elastic/kibana/pull/155113","mergeCommit":{"message":"[Visualize2Lens]
Transfers the custom timerange to the converted panel (#155113)\n\n##
Summary\r\n\r\nPart of
https://github.com/elastic/kibana/issues/147646\r\n\r\nIt passes the
custom timerange to the converted Lens panel for both by\r\nref and by
value legacy visualizations.\r\nIt works for all paths:\r\n- Edit
visualization--> Edit in Lens--> Replace in dashboard\r\n- Convert to
Lens --> Replace in
dashboard\r\n\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Liberati
<dej611@users.noreply.github.com>","sha":"61c82dc8682edc33bc7a8483befed136052d95dc"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155113","number":155113,"mergeCommit":{"message":"[Visualize2Lens]
Transfers the custom timerange to the converted panel (#155113)\n\n##
Summary\r\n\r\nPart of
https://github.com/elastic/kibana/issues/147646\r\n\r\nIt passes the
custom timerange to the converted Lens panel for both by\r\nref and by
value legacy visualizations.\r\nIt works for all paths:\r\n- Edit
visualization--> Edit in Lens--> Replace in dashboard\r\n- Convert to
Lens --> Replace in
dashboard\r\n\r\n\r\n\r\n\r\n###
Checklist\r\n\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Marco Liberati
<dej611@users.noreply.github.com>","sha":"61c82dc8682edc33bc7a8483befed136052d95dc"}}]}]
BACKPORT-->
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
## Summary
When running a local registry it fails to start because this package is
invalid, I dont know why this doesn't break CI!
```
"reading packages from filesystem failed: loading package failed (path: /packages/test-packages/dynamic_datastream/0.2.0): version in manifest file is not consistent with path: inconsistent versions (path: 0.2.0, manifest: 1.2.0) accessing config"
```
I have just renamed the 0.2.0 directory to 1.2.0
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Fixes https://github.com/elastic/kibana/issues/155409https://github.com/elastic/kibana/pull/152516 incorrectly attempted to
resolve https://github.com/elastic/kibana/issues/151221.
https://github.com/elastic/kibana/pull/152516 updated shouldFetch$ to
only check searchSessionId to determine if re-fetching is required. This
logic did not work when custom time ranges are applied to panels since
custom time ranges do not require new search session id yet the time
range changed.
This PR reverts shouldFetch$ logic of only checking searchSessionId to
determine if re-fetching is required.
Instead, this PR moves searchSessionId out of input and into dashboard
instance state. That way, `input` updates, such as query, do not trigger
additional `input` updates. The PR also updates seachSessionId logic
from async to sync so that dashboard can update seachSessionId on input
changes prior to child embeddables updating to parent input changes.
This avoids the double fetch and allows children to only have a single
input update on query state change.
There was a functional test, panel_time_range, that should have caught
the regression but that test had a bug in it. The assertion that the
custom time range was applied looked like `expect(await
testSubjects.exists('emptyPlaceholder'))` which will never fail the test
because the last part of the expect is missing. Instead, the statements
should be `expect(await
testSubjects.exists('emptyPlaceholder')).to.be(true)`. These updates to
the functional test would have caught the regression (I verified this by
making these changes on main and running the test. They do indeed fail).
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: nreese <reese.nathan@elastic.co>
## Summary
Fixes https://github.com/elastic/kibana/issues/149132
This PR adds a Kibana feature for the guided onboarding plugin for
better permissions handling. By default `kibana_admin` and `editor`
roles are granted access to guided onboarding. The role `viewer` on the
other hand doesn't have enough permissions to see or use guided
onboarding. For any roles that don't have the correct permissions,
guided onboarding is completely disabled, the same as it's disabled
on-prem.
When creating a new role, the feature "Setup guides" can be enabled or
disabled.
### How to test
1. Add `xpack.cloud.id: 'testID'` to `/config/kibana.dev.yml`
1. Start ES with `yarn es snapshot` and Kibana with `yarn start``
2. Login as elastic and create a test user with the role `viewer`
3. Clear everything from your browser's local storage
4. Login as the test user and check the following
- On the first visit, the "on-prem" welcome message is shown (not the
guided onboarding landing page)
- The url `/app/home#/getting_started` is unknown and redirects back to
the home page
- There is no button "Setup guides" in the header
- There is no link "Setup guides" in the help menu
### Checklist
- [x] 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)
- [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: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Stabilize flaky functional tests: Empty the query input before adding
new content and retry, don't assert results for runs with random
sampling being triggered.
## Summary
These changes enable triggering of "per-alert" actions.
Closes#153611
### Checklist
Delete any items that are not applicable to this PR.
- [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>
Co-authored-by: Ying <ying.mao@elastic.co>
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
## Summary
This PR prevents saving synthetics params to arbitrary Kibana spaces.
Previously, we accepted a `namespaces` array which could be used to save
a param to spaces that do not exist. In the past, the client would send
this value as `namespaces: ['*']` when a param is meant to e shared
across spaces.
This PR replaces the `namespaces` array with a simple
`share_across_spaces` boolean.
Params are now only allowed to be saved to the current active space, or
`*`.
---------
Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
From 8.8 `responseActionExecuteEnabled` is set to `true` by default
## Summary
Enables the `responseActionExecuteEnabled` feature flag by default for
`execute` response action.
### 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
## Summary
Fixes https://github.com/elastic/kibana/issues/155611
This PR changes the API prefix to indicate that the endpoints are
intended for internal use only. The plugin has been setup incorrectly
initially with the prefix `/api` that is intended for a public API.
There should not be any changes to the UI or functionality of the
plugin.
### Release Note
Fixed the guided onboarding API prefix to indicate that it's intended
for internal use
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This PR fixes some flaky tests. I believe there were two issues.
1. There were a few places we were only waiting for 1 alert to be
created but we were expecting 2 alerts to be there which resulted in
undefined when accessing the second alert and produced the _can't find
_id_
2. The bulk create attachments code doesn't _**really**_ guarantee
creating the attachments in the order they are listed within the
request. This is because we do a `Promise.all` and quickly loop over the
attachments to create the timestamp. I believe this was creating
attachments with the same `created_at` value which means that they could
be returned in the `case.comments` in a different order. The solution
here is to compare the arrays ignoring the ordering.
Fixes: #154469#154558#154676#154751#154859#154849#154858#154850#154875#155067#155062#155046#155160#155235#155555#155557#155569,
#155703, #155666
Flaky test run:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2164🟢
## 📓 Summary
Part of #152617
This PR does some refactoring on the presentational components used to
render the saved views on both Infra Inventory and Metrics Explorer,
preparing for the additional work required once [[Infrastructure UI]
Saved object hooks that use the SO client are removed in favour of the
new endpoints#154725](https://github.com/elastic/kibana/issues/154725)
will be implemented.
## 🐞 Bug fixes
While working on this code, some pre-existing issues have been
discovered and fixed:
- "Make default" star icon was not aligned correctly when rendered
alone:
<img width="751" alt="Screenshot 2023-04-19 at 15 22 24"
src="https://user-images.githubusercontent.com/34506779/233088425-34992395-4d18-46bc-9124-5d99101406ce.png">
- Delete view confirm prompt not closed after removing a view:
https://user-images.githubusercontent.com/34506779/233088780-9b1bfe57-170c-4e66-9303-f41448eb8447.mov
---------
Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Closes https://github.com/elastic/kibana/issues/146877
Notes:
- Crash rate is calculated per sessions, the same session ID is kept
after a crash, so a session can have more than one crash.
- App number of launches is not available
- Error rate stays out for now
- Http requests, `host.os.version` and `service.version` is only
available on transactions, metrics and errors. Not spans for now, there
are two issues opened to fix this for the apm mobile agents team
- Instead of the View Load (not available), we show Throughput
- The filters (+ -) will be added in a follow-up PR
Pending:
- [x] API tests
- [x] e2e tests
https://user-images.githubusercontent.com/31922082/234267965-e5e1e411-87c6-40b8-9e94-31d792f9d806.mov
---------
Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
## Summary
Create separate Slack Web API connector
### 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
---------
Co-authored-by: Xavier Mouligneau <xavier.mouligneau@elastic.co>
Co-authored-by: Julian Gernun <17549662+jcger@users.noreply.github.com>
## Summary
- Adds cypress test that stands up a real endpoint and validates that it
can trigger alerts and send those to ES/Kbn and that they show up on the
Alerts list
## Description
Fix https://github.com/elastic/kibana/issues/104081
This PR move some of the SO types from the `.kibana` index into the
following ones:
- `.kibana_alerting_cases`
- `.kibana_analytics`
- `.kibana_security_solution`
- `.kibana_ingest`
This split/reallocation will occur during the `8.8.0` Kibana upgrade
(*meaning: from any version older than `8.8.0` to any version greater or
equal to `8.8.0`*)
**This PR main changes are:**
- implement the changes required in the SO migration algorithm to
support this reallocation
- update the FTR tools (looking at you esArchiver) to support these new
indices
- update hardcoded references to `.kibana` and usage of the
`core.savedObjects.getKibanaIndex()` to use new APIs to target the
correct index/indices
- update FTR datasets, tests and utility accordingly
## To reviewers
**Overall estimated risk of regressions: low**
But, still, please take the time to review changes in your code. The
parts of the production code that were the most impacted are the
telemetry collectors, as most of them were performing direct requests
against the `.kibana` index, so we had to adapt them. Most other
contributor-owned changes are in FTR tests and datasets.
If you think a type is misplaced (either we missed some types that
should be moved to a specific index, or some types were moved and
shouldn't have been) please tell us, and we'll fix the reallocation
either in this PR or in a follow-up.
## .Kibana split
The following new indices are introduced by this PR, with the following
SO types being moved to it. (any SO type not listed here will be staying
in its current index)
Note: The complete **_type => index_** breakdown is available in [this
spreadsheet](https://docs.google.com/spreadsheets/d/1b_MG_E_aBksZ4Vkd9cVayij1oBpdhvH4XC8NVlChiio/edit#gid=145920788).
#### `.kibana_alerting_cases`
- action
- action_task_params
- alert
- api_key_pending_invalidation
- cases
- cases-comments
- cases-configure
- cases-connector-mappings
- cases-telemetry
- cases-user-actions
- connector_token
- rules-settings
- maintenance-window
#### `.kibana_security_solution`
- csp-rule-template
- endpoint:user-artifact
- endpoint:user-artifact-manifest
- exception-list
- exception-list-agnostic
- osquery-manager-usage-metric
- osquery-pack
- osquery-pack-asset
- osquery-saved-query
- security-rule
- security-solution-signals-migration
- siem-detection-engine-rule-actions
- siem-ui-timeline
- siem-ui-timeline-note
- siem-ui-timeline-pinned-event
#### `.kibana_analytics`
- canvas-element
- canvas-workpad-template
- canvas-workpad
- dashboard
- graph-workspace
- index-pattern
- kql-telemetry
- lens
- lens-ui-telemetry
- map
- search
- search-session
- search-telemetry
- visualization
#### `.kibana_ingest`
- epm-packages
- epm-packages-assets
- fleet-fleet-server-host
- fleet-message-signing-keys
- fleet-preconfiguration-deletion-record
- fleet-proxy
- ingest_manager_settings
- ingest-agent-policies
- ingest-download-sources
- ingest-outputs
- ingest-package-policies
## Tasks / PRs
### Sub-PRs
**Implementation**
- 🟣https://github.com/elastic/kibana/pull/154846
- 🟣https://github.com/elastic/kibana/pull/154892
- 🟣https://github.com/elastic/kibana/pull/154882
- 🟣https://github.com/elastic/kibana/pull/154884
- 🟣https://github.com/elastic/kibana/pull/155155
**Individual index split**
- 🟣https://github.com/elastic/kibana/pull/154897
- 🟣https://github.com/elastic/kibana/pull/155129
- 🟣https://github.com/elastic/kibana/pull/155140
- 🟣https://github.com/elastic/kibana/pull/155130
### Improvements / follow-ups
- 👷🏼 Extract logic into
[runV2Migration](https://github.com/elastic/kibana/pull/154151#discussion_r1158470566)
@gsoldevila
- Make `getCurrentIndexTypesMap` resillient to intermittent failures
https://github.com/elastic/kibana/pull/154151#discussion_r1169289717
- 🚧 Build a more structured
[MigratorSynchronizer](https://github.com/elastic/kibana/pull/154151#discussion_r1158469918)
- 🟣https://github.com/elastic/kibana/pull/155035
- 🟣https://github.com/elastic/kibana/pull/155116
- 🟣https://github.com/elastic/kibana/pull/155366
## Reallocation tweaks
Tweaks to the reallocation can be done after the initial merge, as long
as it's done before the public release of 8.8
- `url` should get back to `.kibana` (see
[comment](https://github.com/elastic/kibana/pull/154888#discussion_r1172317133))
## Release Note
For performance purposes, Kibana is now using more system indices to
store its internal data.
The following system indices will be created when upgrading to `8.8.0`:
- `.kibana_alerting_cases`
- `.kibana_analytics`
- `.kibana_security_solution`
- `.kibana_ingest`
---------
Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Georgii Gorbachev <georgii.gorbachev@elastic.co>
Resolves https://github.com/elastic/kibana/issues/151695
Auto regenerates the synthetics api key when it does not include
`synthetics-*` read permissions.
Also ensures key are regenerated when deleted via stack management.
A user without permissions to enable monitor management will see this
callout when monitor management is disabled for either reason

## Testing lack of read permissions
This PR is hard to test. I did so by adjusting the code to force the
creation of an api key without read permissions. Here's how I did it:
1. connect to a clean ES instance by creating a new oblt cluster or
running `yarn es snapshot
2. Remove read permissions for the api key
https://github.com/elastic/kibana/pull/155203/files#diff-e38e55402aedfdb1a8a17bdd557364cd3649e1590b5e92fb44ed639f03ba880dR30
3. Remove read permission check here
https://github.com/elastic/kibana/pull/155203/files#diff-e38e55402aedfdb1a8a17bdd557364cd3649e1590b5e92fb44ed639f03ba880dR60
4. Navigate to Synthetics app and create your first monitor
5. Navigate to Stack Management -> Api Keys. Click on he api key to
inspect it's privileges. You should not see `read` permissions.
6. Remove the changes listed in step 2 and 3 and make sure the branch is
back in sync with this PR
7. Navigate to the Synthetics app again.
9. Navigate to stack management -> api keys. Ensure there is only one
synthetics monitor management api key. Click on he api key to inspect
it's privileges. You should now see `read` permissions.
10. Delete this api key
11. Navigate back to the Synthetics app
12. Navigate back to stack management -> api keys. Notice tha api key
has been regenerated
partially resolves some issues in https://github.com/elastic/kibana/issues/84217
Adds Mustache lambdas for alerting actions to format dates with `{{#FormatDate}}`, evaluate math expressions with `{{#EvalMath}}`, and provide easier JSON formatting with `{{#ParseHjson}}` and a new `asJSON` property added to arrays.
closes [#154443](https://github.com/elastic/kibana/issues/154443)
## Summary
This PR replaces the usage of the Snapshot API in favor of the new
`metrics/infra` endpoint and also includes a new control in the Search
Bar to allow users to select how many hosts they want the API to return.
https://user-images.githubusercontent.com/2767137/233728658-bccc7258-6955-47fb-8f7b-85ef6ec5d0f9.mov
Because the KPIs now needs to show an "Average (of X hosts)", they will
only start fetching the data once the table has been loaded.
The hosts count KPI tile was not converted to Lens, because the page
needs to know the total number of hosts.
### Possible follow-up
Since now everything depends on the table to be loaded, I have been
experimenting with batched requests to the new API. The idea is to fetch
at least the host names as soon as possible.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
closes [#152186](https://github.com/elastic/kibana/issues/152186)
## Summary
This PR makes the metric charts show data for the hosts on the current
page. With this change, the charts will **only** load after the table
has finished loading its data - or after Snapshot API has responded
It also changes the current behavior of the table pagination and
sorting. Instead of relying on the `EuiInMemoryTable` the pagination and
sorting are done manually, and the EuiInMemoryTable has been replaced by
the `EuiBasicTable`.
The loading indicator has also been replaced.
Paginating and sorting:
https://user-images.githubusercontent.com/2767137/233161166-2bd719e1-7259-4ecc-96a7-50493bc6c0a3.mov
Open in lens
https://user-images.githubusercontent.com/2767137/233161134-621afd76-44b5-42ab-b58c-7f51ef944ac2.mov
### How to test
- Go to Hosts view
- Paginate and sort the table data
- Select a page size and check if the select has been stored in the
localStorage (`hostsView:pageSizeSelection` key)
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
E2E coverage of TestRail "Isolate" suite.
These tests are run against mocked documents. We intercept REST request
whenever `Isolate` button is used and mock `response action response`
with `success`.
## Summary
[Main ticket](https://github.com/elastic/kibana/issues/151916)
This PR dependant on [these
changes](https://github.com/elastic/kibana/pull/153101)
These changes cover next two tickets:
- [RAM][SECURITYSOLUTION][ALERTS] - Integrate per-action frequency field
in security solution APIs #154532
- [RAM][SECURITYSOLUTION][ALERTS] - Integrate per-action frequency UI in
security solution #154534
With this PR we will integrate per-action `frequency` field which
already works within alert framework and will update security solution
UI to incorporate the possibility to select "summary" vs "for each
alert" type of actions.

## NOTES:
- There will be no more "Perform no actions" option which mutes all the
actions of the rule. For back compatibility, we need to show that rule
is muted in the UI cc @peluja1012 @ARWNightingale
- The ability to generate per-alert action will be done as part of
https://github.com/elastic/kibana/issues/153611
## Technical Notes:
Here are the overview of the conversions and transformations that we are
going to do as part of these changes for devs who are going to review.
On rule **create**/**read**/**update**/**patch**:
- We always gonna set rule level `throttle` to `undefined` from now on
- If each action has `frequency` attribute set, then we just use those
values
- If actions do not have `frequency` attribute set (or for some reason
there is a mix of actions with some of them having `frequency` attribute
and some not), then we transform rule level `throttle` into `frequency`
and set it for each action in the rule
On rule **bulk editing**:
- We always gonna set rule level `throttle` to `undefined`
- If each action has `frequency` attribute set, then we just use those
values
- If actions do not have `frequency` attribute set, then we transform
rule level `throttle` into `frequency` and set it for each action in the
rule
- If user passed only `throttle` attribute with empty actions (`actions
= []`), this will only remove all actions from the rule
This will bring breaking changes which we agreed on with the Advanced
Correlation Group
cc @XavierM @vitaliidm @peluja1012
### Checklist
Delete any items that are not applicable to this PR.
- [x] 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
- [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>
Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>