Commit graph

6696 commits

Author SHA1 Message Date
Alejandro Fernández Haro
cd00c41781
[9.0] Update dependency @elastic/ebt to ^1.2.0 (main) (#222852) (#223112)
# Backport

This will backport the following commits from `main` to `9.0`:
- [Update dependency @elastic/ebt to ^1.2.0 (main)
(#222852)](https://github.com/elastic/kibana/pull/222852)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"elastic-renovate-prod[bot]","email":"174716857+elastic-renovate-prod[bot]@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-06-06T08:13:25Z","message":"Update
dependency @elastic/ebt to ^1.2.0 (main)
(#222852)","sha":"6540ec423cb6f6364accfb99dd837898f8c5adc9","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:version","v9.1.0","v8.19.0"],"title":"Update
dependency @elastic/ebt to ^1.2.0
(main)","number":222852,"url":"https://github.com/elastic/kibana/pull/222852","mergeCommit":{"message":"Update
dependency @elastic/ebt to ^1.2.0 (main)
(#222852)","sha":"6540ec423cb6f6364accfb99dd837898f8c5adc9"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/222852","number":222852,"mergeCommit":{"message":"Update
dependency @elastic/ebt to ^1.2.0 (main)
(#222852)","sha":"6540ec423cb6f6364accfb99dd837898f8c5adc9"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-06-10 08:54:47 +02:00
Tomasz Kajtoch
26dc21021d
[9.0] Add conditional switching between EUI releases (#219818) (#221917)
# Backport

This will backport the following commits from `main` to `9.0`:
- [Add conditional switching between EUI releases
(#219818)](https://github.com/elastic/kibana/pull/219818)

<!--- Backport version: 10.0.0 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Tomasz
Kajtoch","email":"tomasz.kajtoch@elastic.co"},"sourceCommit":{"committedDate":"2025-05-28T13:41:19Z","message":"Add
conditional switching between EUI releases (#219818)\n\n##
Summary\n\nThis PR simplifies the weekly EUI upgrade and backport
process by\nconditionally aliasing `@elastic/eui` in shared deps
webpack\nconfigurations.\n\n# Backstory\n\nThe EUI team
(@elastic/eui-team) is responsible for keeping EUI up to\ndate in
Kibana. Historically, this has been a relatively straightforward\n(yet
time-consuming) process, however, due to `8.x` backport\ncomplexities
caused by it using a different theme, it has become way\nmore demanding
on everybody involved.\n\nEUI is released on weekly basis. Each week, we
release official EUI\nversions tagged `latest` in npmjs and get a PR
open that updates the\npackage in kibana `main`.\n\nOur upgrade PRs tend
to require anywhere between 2 and 25 codeowner\nreviews due to the
number of snapshots we need to update while working\non the EUI upgrade
PRs. These snapshot changes are 99% of the time\nharmless, yet it still
takes 2+ full workdays to ping teams and get all\nreviews necessary to
get the PR merged. Generally speaking, we aim to\nhave the upgrade PR
open on Monday and merged by Friday.\n\n## The issue with `8.x`
backports\n\nKibana 8.x uses the Amsterdam theme instead of Borealis,
which is used\nin Kibana 9.0 and up. To keep 8.x up to date, for each
official EUI\nrelease we prepare another special Kibana 8.x only release
of EUI (e.g.,\n`101.2.0-amsterdam.0`). These special releases have the
theme hardcoded\nto Amsterdam at compile-time to avoid any initial theme
errors Kibana\ncould otherwise experience. This is done primarily
because some areas in\nKibana read EUI theme values outside of React
components, and we have no\nstable way to determine what the active
theme is since there's no\ncontext information. This is where we need to
fall back to Amsterdam in\n8.x and Borealis in 9.x.\n\n**Since there are
two different EUI versions - one for Kibana `main` and\n9.0, and another
for 8.x branches, we cannot use the automated backports\nfeature**.
Instead, we open two separate PRs and configure backport\nlabels
accordingly. Having two PRs is far from ideal since codeowners\nneed to
review our changes twice, and we're more likely to make\nmistakes.\n\n#
Our proposal\n\nFollowing the recently introduced React version
switching logic, we want\nto conditionally switch between two
`@elastic/eui` releases depending on\nthe kibana branch/version while
keeping automated backports possible.\n\nTo achieve that, I added a
dependency alias `@elastic/eui-amsterdam`\nthat points to the Amsterdam
EUI release and configured `resolve.alias`\nin shared deps to resolve
the correct dependency based on the optional\n`EUI_AMSTERDAM`
environment variable. When this change is merged to\n`main` and
backported to `9.0` and `8.19`, I'll open a follow-up PR to\nthe `8.19`
branch updating the default value of `EUI_AMSTERDAM` to\n`\"true\"`.
This should result in no conflicts and be easy to follow.\n\nSince 8.19
[uses the Amsterdam release
of\n`@elastic/eui`](https://github.com/elastic/kibana/blob/8.19/package.json#L126)\n(e.g.,
`101.2.0-amsterdam.0`), there's no risk backporting this PR
as-is\nwithout `EUI_AMSTERDAM` configured beforehand.\n\n## What does it
change?\n\nWith this setup, we'll be able to update versions of
`@elastic/eui` and\n`@elastic/eui-amsterdam` at the same time in a
single PR and make use of\nautomated kibana backports. There will be
only one set of changes to\nreview by codeowners, and if there are any
failing tests when\nbackporting to `8.19` due to, for example, changed
color values, we can\nfollow the regular kibana procedures and fix them
right in the created\nbackport PR. It'll simplify our workflow quite
drastically while keeping\nthe same level of
quality.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ac3fc27a5397456630f974f84bee64f597500b55","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.1.0","v8.19.0","v9.0.3"],"title":"Add
conditional switching between EUI
releases","number":219818,"url":"https://github.com/elastic/kibana/pull/219818","mergeCommit":{"message":"Add
conditional switching between EUI releases (#219818)\n\n##
Summary\n\nThis PR simplifies the weekly EUI upgrade and backport
process by\nconditionally aliasing `@elastic/eui` in shared deps
webpack\nconfigurations.\n\n# Backstory\n\nThe EUI team
(@elastic/eui-team) is responsible for keeping EUI up to\ndate in
Kibana. Historically, this has been a relatively straightforward\n(yet
time-consuming) process, however, due to `8.x` backport\ncomplexities
caused by it using a different theme, it has become way\nmore demanding
on everybody involved.\n\nEUI is released on weekly basis. Each week, we
release official EUI\nversions tagged `latest` in npmjs and get a PR
open that updates the\npackage in kibana `main`.\n\nOur upgrade PRs tend
to require anywhere between 2 and 25 codeowner\nreviews due to the
number of snapshots we need to update while working\non the EUI upgrade
PRs. These snapshot changes are 99% of the time\nharmless, yet it still
takes 2+ full workdays to ping teams and get all\nreviews necessary to
get the PR merged. Generally speaking, we aim to\nhave the upgrade PR
open on Monday and merged by Friday.\n\n## The issue with `8.x`
backports\n\nKibana 8.x uses the Amsterdam theme instead of Borealis,
which is used\nin Kibana 9.0 and up. To keep 8.x up to date, for each
official EUI\nrelease we prepare another special Kibana 8.x only release
of EUI (e.g.,\n`101.2.0-amsterdam.0`). These special releases have the
theme hardcoded\nto Amsterdam at compile-time to avoid any initial theme
errors Kibana\ncould otherwise experience. This is done primarily
because some areas in\nKibana read EUI theme values outside of React
components, and we have no\nstable way to determine what the active
theme is since there's no\ncontext information. This is where we need to
fall back to Amsterdam in\n8.x and Borealis in 9.x.\n\n**Since there are
two different EUI versions - one for Kibana `main` and\n9.0, and another
for 8.x branches, we cannot use the automated backports\nfeature**.
Instead, we open two separate PRs and configure backport\nlabels
accordingly. Having two PRs is far from ideal since codeowners\nneed to
review our changes twice, and we're more likely to make\nmistakes.\n\n#
Our proposal\n\nFollowing the recently introduced React version
switching logic, we want\nto conditionally switch between two
`@elastic/eui` releases depending on\nthe kibana branch/version while
keeping automated backports possible.\n\nTo achieve that, I added a
dependency alias `@elastic/eui-amsterdam`\nthat points to the Amsterdam
EUI release and configured `resolve.alias`\nin shared deps to resolve
the correct dependency based on the optional\n`EUI_AMSTERDAM`
environment variable. When this change is merged to\n`main` and
backported to `9.0` and `8.19`, I'll open a follow-up PR to\nthe `8.19`
branch updating the default value of `EUI_AMSTERDAM` to\n`\"true\"`.
This should result in no conflicts and be easy to follow.\n\nSince 8.19
[uses the Amsterdam release
of\n`@elastic/eui`](https://github.com/elastic/kibana/blob/8.19/package.json#L126)\n(e.g.,
`101.2.0-amsterdam.0`), there's no risk backporting this PR
as-is\nwithout `EUI_AMSTERDAM` configured beforehand.\n\n## What does it
change?\n\nWith this setup, we'll be able to update versions of
`@elastic/eui` and\n`@elastic/eui-amsterdam` at the same time in a
single PR and make use of\nautomated kibana backports. There will be
only one set of changes to\nreview by codeowners, and if there are any
failing tests when\nbackporting to `8.19` due to, for example, changed
color values, we can\nfollow the regular kibana procedures and fix them
right in the created\nbackport PR. It'll simplify our workflow quite
drastically while keeping\nthe same level of
quality.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ac3fc27a5397456630f974f84bee64f597500b55"}},"sourceBranch":"main","suggestedTargetBranches":["8.19","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/219818","number":219818,"mergeCommit":{"message":"Add
conditional switching between EUI releases (#219818)\n\n##
Summary\n\nThis PR simplifies the weekly EUI upgrade and backport
process by\nconditionally aliasing `@elastic/eui` in shared deps
webpack\nconfigurations.\n\n# Backstory\n\nThe EUI team
(@elastic/eui-team) is responsible for keeping EUI up to\ndate in
Kibana. Historically, this has been a relatively straightforward\n(yet
time-consuming) process, however, due to `8.x` backport\ncomplexities
caused by it using a different theme, it has become way\nmore demanding
on everybody involved.\n\nEUI is released on weekly basis. Each week, we
release official EUI\nversions tagged `latest` in npmjs and get a PR
open that updates the\npackage in kibana `main`.\n\nOur upgrade PRs tend
to require anywhere between 2 and 25 codeowner\nreviews due to the
number of snapshots we need to update while working\non the EUI upgrade
PRs. These snapshot changes are 99% of the time\nharmless, yet it still
takes 2+ full workdays to ping teams and get all\nreviews necessary to
get the PR merged. Generally speaking, we aim to\nhave the upgrade PR
open on Monday and merged by Friday.\n\n## The issue with `8.x`
backports\n\nKibana 8.x uses the Amsterdam theme instead of Borealis,
which is used\nin Kibana 9.0 and up. To keep 8.x up to date, for each
official EUI\nrelease we prepare another special Kibana 8.x only release
of EUI (e.g.,\n`101.2.0-amsterdam.0`). These special releases have the
theme hardcoded\nto Amsterdam at compile-time to avoid any initial theme
errors Kibana\ncould otherwise experience. This is done primarily
because some areas in\nKibana read EUI theme values outside of React
components, and we have no\nstable way to determine what the active
theme is since there's no\ncontext information. This is where we need to
fall back to Amsterdam in\n8.x and Borealis in 9.x.\n\n**Since there are
two different EUI versions - one for Kibana `main` and\n9.0, and another
for 8.x branches, we cannot use the automated backports\nfeature**.
Instead, we open two separate PRs and configure backport\nlabels
accordingly. Having two PRs is far from ideal since codeowners\nneed to
review our changes twice, and we're more likely to make\nmistakes.\n\n#
Our proposal\n\nFollowing the recently introduced React version
switching logic, we want\nto conditionally switch between two
`@elastic/eui` releases depending on\nthe kibana branch/version while
keeping automated backports possible.\n\nTo achieve that, I added a
dependency alias `@elastic/eui-amsterdam`\nthat points to the Amsterdam
EUI release and configured `resolve.alias`\nin shared deps to resolve
the correct dependency based on the optional\n`EUI_AMSTERDAM`
environment variable. When this change is merged to\n`main` and
backported to `9.0` and `8.19`, I'll open a follow-up PR to\nthe `8.19`
branch updating the default value of `EUI_AMSTERDAM` to\n`\"true\"`.
This should result in no conflicts and be easy to follow.\n\nSince 8.19
[uses the Amsterdam release
of\n`@elastic/eui`](https://github.com/elastic/kibana/blob/8.19/package.json#L126)\n(e.g.,
`101.2.0-amsterdam.0`), there's no risk backporting this PR
as-is\nwithout `EUI_AMSTERDAM` configured beforehand.\n\n## What does it
change?\n\nWith this setup, we'll be able to update versions of
`@elastic/eui` and\n`@elastic/eui-amsterdam` at the same time in a
single PR and make use of\nautomated kibana backports. There will be
only one set of changes to\nreview by codeowners, and if there are any
failing tests when\nbackporting to `8.19` due to, for example, changed
color values, we can\nfollow the regular kibana procedures and fix them
right in the created\nbackport PR. It'll simplify our workflow quite
drastically while keeping\nthe same level of
quality.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ac3fc27a5397456630f974f84bee64f597500b55"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-05-30 20:33:19 +02:00
Kibana Machine
66dc5bb5e2
[9.0] [Kibana Dev Server] Fix DELETE requests without a body in Safari (#220899) (#220968)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Kibana Dev Server] Fix `DELETE` requests without a body in Safari
(#220899)](https://github.com/elastic/kibana/pull/220899)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Robert
Jaszczurek","email":"92210485+rbrtj@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-05-20T07:35:30Z","message":"[Kibana
Dev Server] Fix `DELETE` requests without a body in Safari
(#220899)\n\nRecently, we discovered that a `DELETE` request to one of
our ML\nendpoints does not work correctly in Safari.\nAfter further
investigation, it turns out that `DELETE` requests without\na body fail
in Safari.\nThe issue occurs only within the Kibana Dev server, so there
is no\nimpact on end users.\nThis is most likely due to a header set in
the\n`packages/kbn-cli-dev-mode/src/base_path_proxy/http1.ts` file. The
issue\nmentioned in the comment has already been resolved, and
everything\nappears to work correctly without this outdated
workaround.\n\nTo reproduce the error:\n1. Start Kibana locally and open
it with Safari.\n2. Find an endpoint that uses the `DELETE` method and
does not have a\nbody specified.\n3. ^ For example, go to Observability
-> Cases and create a new case.\n4. Go back to the cases list and try to
delete the
case","sha":"fa0500c346389758fb09935be246752dcdbbb6f3","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:http","Team:Operations","release_note:skip","backport:version","v9.1.0","v8.19.0","v8.17.7","v8.18.2","v9.0.2"],"title":"[Kibana
Dev Server] Fix `DELETE` requests without a body in
Safari","number":220899,"url":"https://github.com/elastic/kibana/pull/220899","mergeCommit":{"message":"[Kibana
Dev Server] Fix `DELETE` requests without a body in Safari
(#220899)\n\nRecently, we discovered that a `DELETE` request to one of
our ML\nendpoints does not work correctly in Safari.\nAfter further
investigation, it turns out that `DELETE` requests without\na body fail
in Safari.\nThe issue occurs only within the Kibana Dev server, so there
is no\nimpact on end users.\nThis is most likely due to a header set in
the\n`packages/kbn-cli-dev-mode/src/base_path_proxy/http1.ts` file. The
issue\nmentioned in the comment has already been resolved, and
everything\nappears to work correctly without this outdated
workaround.\n\nTo reproduce the error:\n1. Start Kibana locally and open
it with Safari.\n2. Find an endpoint that uses the `DELETE` method and
does not have a\nbody specified.\n3. ^ For example, go to Observability
-> Cases and create a new case.\n4. Go back to the cases list and try to
delete the
case","sha":"fa0500c346389758fb09935be246752dcdbbb6f3"}},"sourceBranch":"main","suggestedTargetBranches":["8.17","8.18","9.0"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/220899","number":220899,"mergeCommit":{"message":"[Kibana
Dev Server] Fix `DELETE` requests without a body in Safari
(#220899)\n\nRecently, we discovered that a `DELETE` request to one of
our ML\nendpoints does not work correctly in Safari.\nAfter further
investigation, it turns out that `DELETE` requests without\na body fail
in Safari.\nThe issue occurs only within the Kibana Dev server, so there
is no\nimpact on end users.\nThis is most likely due to a header set in
the\n`packages/kbn-cli-dev-mode/src/base_path_proxy/http1.ts` file. The
issue\nmentioned in the comment has already been resolved, and
everything\nappears to work correctly without this outdated
workaround.\n\nTo reproduce the error:\n1. Start Kibana locally and open
it with Safari.\n2. Find an endpoint that uses the `DELETE` method and
does not have a\nbody specified.\n3. ^ For example, go to Observability
-> Cases and create a new case.\n4. Go back to the cases list and try to
delete the
case","sha":"fa0500c346389758fb09935be246752dcdbbb6f3"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/220964","number":220964,"state":"OPEN"},{"branch":"8.17","label":"v8.17.7","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.2","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Robert Jaszczurek <92210485+rbrtj@users.noreply.github.com>
2025-05-21 10:44:06 +01:00
Kibana Machine
d9fb304521
[9.0] [Security Solution] Add rule upgrade preview FE integration tests (Rule Upgrade Flyout) (#210377) (#219828)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Solution] Add rule upgrade preview FE integration tests
(Rule Upgrade Flyout)
(#210377)](https://github.com/elastic/kibana/pull/210377)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Maxim
Palenov","email":"maxim.palenov@elastic.co"},"sourceCommit":{"committedDate":"2025-05-01T09:39:17Z","message":"[Security
Solution] Add rule upgrade preview FE integration tests (Rule Upgrade
Flyout) (#210377)\n\n**Partially addresses:**
https://github.com/elastic/kibana/pull/205645\n\n## Summary\n\nThis PR
implements Frontend integration tests from the [upgrading prebuilt rules
one-by-one with preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\n##
Details\n\nThis PR add Jest integration tests
(`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test
scenarios are described in [upgrading prebuilt rules one-by-one with
preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\nTests
cover each `diffable rule` field separately to guarantee visibility on
broken functionality.\n\n`esql_query` and `threat_mapping` fields were
skipped due to mocking difficulties.\n\n### Tests setup\n\n- Rules
Management page is used as the root component to test functionality in
integration\n- HTTP responses are mocked via mocking return values from
`Kibana.http.fetch()` method\n- Test scenarios are the same for each
diffable rule field and moved out to reusable utility
functions","sha":"ea7cccab0884923d46e9bcf3a2b4106b0c3dd0f2","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["test","release_note:skip","impact:high","v9.0.0","Team:Detections
and Resp","Team: SecuritySolution","Team:Detection Rule
Management","Feature:Prebuilt Detection
Rules","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[Security
Solution] Add rule upgrade preview FE integration tests (Rule Upgrade
Flyout)","number":210377,"url":"https://github.com/elastic/kibana/pull/210377","mergeCommit":{"message":"[Security
Solution] Add rule upgrade preview FE integration tests (Rule Upgrade
Flyout) (#210377)\n\n**Partially addresses:**
https://github.com/elastic/kibana/pull/205645\n\n## Summary\n\nThis PR
implements Frontend integration tests from the [upgrading prebuilt rules
one-by-one with preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\n##
Details\n\nThis PR add Jest integration tests
(`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test
scenarios are described in [upgrading prebuilt rules one-by-one with
preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\nTests
cover each `diffable rule` field separately to guarantee visibility on
broken functionality.\n\n`esql_query` and `threat_mapping` fields were
skipped due to mocking difficulties.\n\n### Tests setup\n\n- Rules
Management page is used as the root component to test functionality in
integration\n- HTTP responses are mocked via mocking return values from
`Kibana.http.fetch()` method\n- Test scenarios are the same for each
diffable rule field and moved out to reusable utility
functions","sha":"ea7cccab0884923d46e9bcf3a2b4106b0c3dd0f2"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.19"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210377","number":210377,"mergeCommit":{"message":"[Security
Solution] Add rule upgrade preview FE integration tests (Rule Upgrade
Flyout) (#210377)\n\n**Partially addresses:**
https://github.com/elastic/kibana/pull/205645\n\n## Summary\n\nThis PR
implements Frontend integration tests from the [upgrading prebuilt rules
one-by-one with preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\n##
Details\n\nThis PR add Jest integration tests
(`@kbn/test/jest_integration` preset) for Rule Upgrade Flyout. Test
scenarios are described in [upgrading prebuilt rules one-by-one with
preview test
plan](https://github.com/elastic/kibana/blob/main/x-pack/solutions/security/plugins/security_solution/docs/testing/test_plans/detection_response/prebuilt_rules/prebuilt_rule_upgrade_with_preview.md).\n\nTests
cover each `diffable rule` field separately to guarantee visibility on
broken functionality.\n\n`esql_query` and `threat_mapping` fields were
skipped due to mocking difficulties.\n\n### Tests setup\n\n- Rules
Management page is used as the root component to test functionality in
integration\n- HTTP responses are mocked via mocking return values from
`Kibana.http.fetch()` method\n- Test scenarios are the same for each
diffable rule field and moved out to reusable utility
functions","sha":"ea7cccab0884923d46e9bcf3a2b4106b0c3dd0f2"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
2025-05-01 13:25:20 +02:00
Tiago Costa
9dd50143ed
[9.0] chore(NA): updating used polyfills using 3rd party library (#218020) (#219799)
# Backport

This will backport the following commits from `main` to `9.0`:
- [chore(NA): updating used polyfills using 3rd party library
(#218020)](https://github.com/elastic/kibana/pull/218020)

<!--- Backport version: 9.6.6 -->

### 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-04-30T20:35:22Z","message":"chore(NA):
updating used polyfills using 3rd party library (#218020)\n\nCloses
https://github.com/elastic/kibana-operations/issues/267\n\nThis PR is a
follow up from the webpack v5 upgrade which makes sure we\nstop using
the old non maintained webpack v4 polyfills library and use\ninstead a
new supported library called
`node-stdlib-browser`.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"aac2d4788ae588e3a999f90772a62fcfe2ad7755","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","backport:prev-minor","backport:prev-major","ci:build-webpack-bundle-analyzer","v9.1.0"],"title":"chore(NA):
updating used polyfills using 3rd party
library","number":218020,"url":"https://github.com/elastic/kibana/pull/218020","mergeCommit":{"message":"chore(NA):
updating used polyfills using 3rd party library (#218020)\n\nCloses
https://github.com/elastic/kibana-operations/issues/267\n\nThis PR is a
follow up from the webpack v5 upgrade which makes sure we\nstop using
the old non maintained webpack v4 polyfills library and use\ninstead a
new supported library called
`node-stdlib-browser`.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"aac2d4788ae588e3a999f90772a62fcfe2ad7755"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218020","number":218020,"mergeCommit":{"message":"chore(NA):
updating used polyfills using 3rd party library (#218020)\n\nCloses
https://github.com/elastic/kibana-operations/issues/267\n\nThis PR is a
follow up from the webpack v5 upgrade which makes sure we\nstop using
the old non maintained webpack v4 polyfills library and use\ninstead a
new supported library called
`node-stdlib-browser`.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"aac2d4788ae588e3a999f90772a62fcfe2ad7755"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-05-01 04:51:41 +01:00
Kibana Machine
d6b244241a
[9.0] Disable allowAbsoluteUrls for axios (#215138) (#215830)
# Backport

This will backport the following commits from `main` to `9.0`:
- [Disable `allowAbsoluteUrls` for axios
(#215138)](https://github.com/elastic/kibana/pull/215138)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2025-03-25T08:52:36Z","message":"Disable
`allowAbsoluteUrls` for axios (#215138)\n\n## Summary\nAfter
https://github.com/elastic/kibana/pull/214843, `axios` client\nusages
need to set a flag to prevent the vulnerable behavior.\n\nTo reviewers:
if you think it's a mistake, and you created a client to\nrequest for
absolute URLs, consider unsetting the `baseURL` to\ncommunicate
intent.","sha":"e40b17aa22ec1a2fbc56ae8651e12f658099ec14","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","Team:QA","Team:Security","release_note:skip","backport:all-open","Team:obs-ux-logs","Team:obs-ux-infra_services","v9.1.0"],"title":"Disable
`allowAbsoluteUrls` for
axios","number":215138,"url":"https://github.com/elastic/kibana/pull/215138","mergeCommit":{"message":"Disable
`allowAbsoluteUrls` for axios (#215138)\n\n## Summary\nAfter
https://github.com/elastic/kibana/pull/214843, `axios` client\nusages
need to set a flag to prevent the vulnerable behavior.\n\nTo reviewers:
if you think it's a mistake, and you created a client to\nrequest for
absolute URLs, consider unsetting the `baseURL` to\ncommunicate
intent.","sha":"e40b17aa22ec1a2fbc56ae8651e12f658099ec14"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215138","number":215138,"mergeCommit":{"message":"Disable
`allowAbsoluteUrls` for axios (#215138)\n\n## Summary\nAfter
https://github.com/elastic/kibana/pull/214843, `axios` client\nusages
need to set a flag to prevent the vulnerable behavior.\n\nTo reviewers:
if you think it's a mistake, and you created a client to\nrequest for
absolute URLs, consider unsetting the `baseURL` to\ncommunicate
intent.","sha":"e40b17aa22ec1a2fbc56ae8651e12f658099ec14"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
2025-03-25 12:43:09 +02:00
Tiago Costa
02bf213f4e
[9.0] fix(NA): use filesystem apis on kbn/optimizer populate_bundle_cache plugin (#211231) (#215028)
# Backport

This will backport the following commits from `main` to `9.0`:
- [fix(NA): use filesystem apis on kbn/optimizer populate_bundle_cache
plugin (#211231)](https://github.com/elastic/kibana/pull/211231)

<!--- Backport version: 9.6.6 -->

### 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-14T17:07:41Z","message":"fix(NA):
use filesystem apis on kbn/optimizer populate_bundle_cache plugin
(#211231)\n\nThis PR solves an issue detected in the populate bundle
cache plugin\nafter the webpack v5 migration. On the new version webpack
v5 returns a\nlot of incomplete paths when we walk over file
dependencies or internal\nmodules. The heuristic logic used previously
was faulty so the fixes\nturns to use a cached filesystem api
instead.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"16a9136b93e2b9bc2e5d86ff7167a8ae0a563cdb","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["chore","Team:Operations","release_note:skip","backport:prev-major","v8.18.0","v9.1.0","v8.19.0","v8.17.3","v8.16.5"],"title":"fix(NA):
use filesystem apis on kbn/optimizer populate_bundle_cache
plugin","number":211231,"url":"https://github.com/elastic/kibana/pull/211231","mergeCommit":{"message":"fix(NA):
use filesystem apis on kbn/optimizer populate_bundle_cache plugin
(#211231)\n\nThis PR solves an issue detected in the populate bundle
cache plugin\nafter the webpack v5 migration. On the new version webpack
v5 returns a\nlot of incomplete paths when we walk over file
dependencies or internal\nmodules. The heuristic logic used previously
was faulty so the fixes\nturns to use a cached filesystem api
instead.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"16a9136b93e2b9bc2e5d86ff7167a8ae0a563cdb"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/211284","number":211284,"state":"MERGED","mergeCommit":{"sha":"4bcd166b3aabbccbca03bd0a86110e29f0812171","message":"[8.18]
fix(NA): use filesystem apis on kbn/optimizer populate_bundle_cache
plugin (#211231) (#211284)\n\n# Backport\n\nThis will backport the
following commits from `main` to `8.18`:\n- [fix(NA): use filesystem
apis on kbn/optimizer populate_bundle_cache\nplugin
(#211231)](https://github.com/elastic/kibana/pull/211231)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by:
Tiago Costa
<tiago.costa@elastic.co>"}},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211231","number":211231,"mergeCommit":{"message":"fix(NA):
use filesystem apis on kbn/optimizer populate_bundle_cache plugin
(#211231)\n\nThis PR solves an issue detected in the populate bundle
cache plugin\nafter the webpack v5 migration. On the new version webpack
v5 returns a\nlot of incomplete paths when we walk over file
dependencies or internal\nmodules. The heuristic logic used previously
was faulty so the fixes\nturns to use a cached filesystem api
instead.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"16a9136b93e2b9bc2e5d86ff7167a8ae0a563cdb"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/211285","number":211285,"state":"MERGED","mergeCommit":{"sha":"73a5339547c64f9060465c4368e216744ce8d514","message":"[8.x]
fix(NA): use filesystem apis on kbn/optimizer populate_bundle_cache
plugin (#211231) (#211285)\n\n# Backport\n\nThis will backport the
following commits from `main` to `8.x`:\n- [fix(NA): use filesystem apis
on kbn/optimizer populate_bundle_cache\nplugin
(#211231)](https://github.com/elastic/kibana/pull/211231)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by:
Tiago Costa
<tiago.costa@elastic.co>"}},{"branch":"8.17","label":"v8.17.3","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/211672","number":211672,"state":"MERGED","mergeCommit":{"sha":"8f8369753beb6ed6ebd6ac705948b917d5abefc4","message":"[8.17]
fix(NA): use filesystem apis on kbn/optimizer populate_bundle_cache
plugin (#211231) (#211672)\n\n# Backport\n\nThis will backport the
following commits from `main` to `8.17`:\n- [fix(NA): use filesystem
apis on kbn/optimizer populate_bundle_cache\nplugin
(#211231)](https://github.com/elastic/kibana/pull/211231)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}},{"branch":"8.16","label":"v8.16.5","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/211674","number":211674,"state":"MERGED","mergeCommit":{"sha":"851913bd02ee74230a43a8c2788f606be0189dd2","message":"[8.16]
fix(NA): use filesystem apis on kbn/optimizer populate_bundle_cache
plugin (#211231) (#211674)\n\n# Backport\n\nThis will backport the
following commits from `main` to `8.16`:\n- [fix(NA): use filesystem
apis on kbn/optimizer populate_bundle_cache\nplugin
(#211231)](https://github.com/elastic/kibana/pull/211231)\n\n\n\n###
Questions ?\nPlease refer to the [Backport
tool\ndocumentation](https://github.com/sorenlouv/backport)\n\n"}}]}]
BACKPORT-->
2025-03-18 17:37:02 +00:00
Kibana Machine
bc32304513
[9.0] [CI] Only emit .d.ts when running typecheck (#209259) (#214944)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[CI] Only emit .d.ts when running typecheck
(#209259)](https://github.com/elastic/kibana/pull/209259)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Alex
Szabo","email":"alex.szabo@elastic.co"},"sourceCommit":{"committedDate":"2025-03-18T10:48:14Z","message":"[CI]
Only emit .d.ts when running typecheck (#209259)\n\n## Summary\nStop
emitting any `.js` files during typechecking. We only depend on
the\ndeclarations, not the emitted, compiled javascript files.\n\nAn
added benefit, is making some bad import errors more obvious. \nWe'll no
longer try to build javascript files in place if a poor\nimport/require
is made, rather the error of importing outside projects\n(in the forest
of a bunch of errors possibly) will be visible in the\ntypescript
logs:\n```\n# instead of:\nproc [tsc] error TS5055: Cannot write file
'/opt/buildkite-agent/builds/bk-agent-prod-gcp-1741789017236110254/elastic/kibana-pull-request/kibana/src/platform/packages/shared/kbn-babel-register/cache/no_cache_cache.js'
because it would overwrite input file.\n\n# we'll see:\n... several
others like this\n proc [tsc]
src/platform/packages/shared/kbn-grok-ui/scripts/generate_patterns.js:10:9
- error TS6307: File
'/Users/alex/Git/elastic-kibana/src/setup_node_env/index.js' is not
listed within the file list of project
'/Users/alex/Git/elastic-kibana/src/platform/packages/shared/kbn-grok-ui/tsconfig.type_check.json'.
Projects must list all files or use an 'include' pattern.\n proc [tsc]
\n proc [tsc] 10 require('../../../../../setup_node_env');\n... several
others like
this\n```","sha":"702c9c49dcbc9036af80ba5473c961cf96573030","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:all-open","v9.1.0"],"title":"[CI]
Only emit .d.ts when running
typecheck","number":209259,"url":"https://github.com/elastic/kibana/pull/209259","mergeCommit":{"message":"[CI]
Only emit .d.ts when running typecheck (#209259)\n\n## Summary\nStop
emitting any `.js` files during typechecking. We only depend on
the\ndeclarations, not the emitted, compiled javascript files.\n\nAn
added benefit, is making some bad import errors more obvious. \nWe'll no
longer try to build javascript files in place if a poor\nimport/require
is made, rather the error of importing outside projects\n(in the forest
of a bunch of errors possibly) will be visible in the\ntypescript
logs:\n```\n# instead of:\nproc [tsc] error TS5055: Cannot write file
'/opt/buildkite-agent/builds/bk-agent-prod-gcp-1741789017236110254/elastic/kibana-pull-request/kibana/src/platform/packages/shared/kbn-babel-register/cache/no_cache_cache.js'
because it would overwrite input file.\n\n# we'll see:\n... several
others like this\n proc [tsc]
src/platform/packages/shared/kbn-grok-ui/scripts/generate_patterns.js:10:9
- error TS6307: File
'/Users/alex/Git/elastic-kibana/src/setup_node_env/index.js' is not
listed within the file list of project
'/Users/alex/Git/elastic-kibana/src/platform/packages/shared/kbn-grok-ui/tsconfig.type_check.json'.
Projects must list all files or use an 'include' pattern.\n proc [tsc]
\n proc [tsc] 10 require('../../../../../setup_node_env');\n... several
others like
this\n```","sha":"702c9c49dcbc9036af80ba5473c961cf96573030"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209259","number":209259,"mergeCommit":{"message":"[CI]
Only emit .d.ts when running typecheck (#209259)\n\n## Summary\nStop
emitting any `.js` files during typechecking. We only depend on
the\ndeclarations, not the emitted, compiled javascript files.\n\nAn
added benefit, is making some bad import errors more obvious. \nWe'll no
longer try to build javascript files in place if a poor\nimport/require
is made, rather the error of importing outside projects\n(in the forest
of a bunch of errors possibly) will be visible in the\ntypescript
logs:\n```\n# instead of:\nproc [tsc] error TS5055: Cannot write file
'/opt/buildkite-agent/builds/bk-agent-prod-gcp-1741789017236110254/elastic/kibana-pull-request/kibana/src/platform/packages/shared/kbn-babel-register/cache/no_cache_cache.js'
because it would overwrite input file.\n\n# we'll see:\n... several
others like this\n proc [tsc]
src/platform/packages/shared/kbn-grok-ui/scripts/generate_patterns.js:10:9
- error TS6307: File
'/Users/alex/Git/elastic-kibana/src/setup_node_env/index.js' is not
listed within the file list of project
'/Users/alex/Git/elastic-kibana/src/platform/packages/shared/kbn-grok-ui/tsconfig.type_check.json'.
Projects must list all files or use an 'include' pattern.\n proc [tsc]
\n proc [tsc] 10 require('../../../../../setup_node_env');\n... several
others like
this\n```","sha":"702c9c49dcbc9036af80ba5473c961cf96573030"}}]}]
BACKPORT-->

Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
2025-03-18 14:37:28 +02:00
Candace Park
46933aaf1f
[9.0] [Defend Workflows][Eui Visual Refresh] Removed transparentize usage in responder (#208457) (#214860)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Defend Workflows][Eui Visual Refresh] Removed transparentize usage
in responder (#208457)](https://github.com/elastic/kibana/pull/208457)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Candace
Park","email":"56409205+parkiino@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-11T22:28:46Z","message":"[Defend
Workflows][Eui Visual Refresh] Removed transparentize usage in responder
(#208457)\n\n## Summary\r\n\r\n- [x] Removed use of color calculating
function `transparentize()` \r\n- [x] Begin removal of JSON tokens when
possible in favor of
colors\r\ntokens\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"eac85d4d9971e6bc5164a7ff1abc20985af53159","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Defend
Workflows","EUI Visual Refresh","v9.1.0"],"title":"[Defend
Workflows][Eui Visual Refresh] Removed transparentize usage in
responder","number":208457,"url":"https://github.com/elastic/kibana/pull/208457","mergeCommit":{"message":"[Defend
Workflows][Eui Visual Refresh] Removed transparentize usage in responder
(#208457)\n\n## Summary\r\n\r\n- [x] Removed use of color calculating
function `transparentize()` \r\n- [x] Begin removal of JSON tokens when
possible in favor of
colors\r\ntokens\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"eac85d4d9971e6bc5164a7ff1abc20985af53159"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208457","number":208457,"mergeCommit":{"message":"[Defend
Workflows][Eui Visual Refresh] Removed transparentize usage in responder
(#208457)\n\n## Summary\r\n\r\n- [x] Removed use of color calculating
function `transparentize()` \r\n- [x] Begin removal of JSON tokens when
possible in favor of
colors\r\ntokens\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"eac85d4d9971e6bc5164a7ff1abc20985af53159"}}]}]
BACKPORT-->
2025-03-17 21:20:21 +00:00
Kibana Machine
6452ad4240
[9.0] Make Amsterdam an opt-in theme (#212787) (#213093)
# Backport

This will backport the following commits from `main` to `9.0`:
- [Make Amsterdam an opt-in theme
(#212787)](https://github.com/elastic/kibana/pull/212787)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Tomasz
Kajtoch","email":"tomasz.kajtoch@elastic.co"},"sourceCommit":{"committedDate":"2025-03-04T12:40:06Z","message":"Make
Amsterdam an opt-in theme (#212787)\n\n## Summary\n\nThis PR updates
`DEFAULT_THEME_TAGS` used to determine what theme tags\nare bundled in
Kibana by default to only include the Borealis theme,\nspecifically
`borealislight` and `borealisdark` theme tags. This change\nis expected
to decrease bundle sizes significantly and get back to\nbundling a
single theme, not two (4 → 2 theme tags).\n\nNow that Serverless, `9.0`,
and `main` all run with Borealis, there's no\nrisk in removing Amsterdam
from the bundle and decreasing Kibana bundle\nsizes.\n\nWe need to keep
the feature flag in code for the time being to easily\ntest future
Borealis iterations.\n\nAmsterdam will still be available as an opt-in
theme and is meant to be\nused locally when testing changes to be
backported to 8.x versions that\nuse Amsterdam. To do so, Kibana needs
to be started/built with\n`KBN_OPTIMIZER_THEMES` environment variable
set and the feature flag\noverridden in `kibana.dev.yml`.\n\n```yml\n#
config/kibana.dev.yml\nfeature_flags.overrides.coreRendering.defaultThemeName:
amsterdam\n```\n\n```shell\n# Run dev server with both borealis and
Amsterdam theme
tags\nKBN_OPTIMIZER_THEMES=\"borealislight,borealisdark,v8light,v8dark\"
yarn start\n```\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"4dd8de807ae8a9d1b00a2a99c98510f7a21382db","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","v9.1.0"],"title":"Make
Amsterdam an opt-in
theme","number":212787,"url":"https://github.com/elastic/kibana/pull/212787","mergeCommit":{"message":"Make
Amsterdam an opt-in theme (#212787)\n\n## Summary\n\nThis PR updates
`DEFAULT_THEME_TAGS` used to determine what theme tags\nare bundled in
Kibana by default to only include the Borealis theme,\nspecifically
`borealislight` and `borealisdark` theme tags. This change\nis expected
to decrease bundle sizes significantly and get back to\nbundling a
single theme, not two (4 → 2 theme tags).\n\nNow that Serverless, `9.0`,
and `main` all run with Borealis, there's no\nrisk in removing Amsterdam
from the bundle and decreasing Kibana bundle\nsizes.\n\nWe need to keep
the feature flag in code for the time being to easily\ntest future
Borealis iterations.\n\nAmsterdam will still be available as an opt-in
theme and is meant to be\nused locally when testing changes to be
backported to 8.x versions that\nuse Amsterdam. To do so, Kibana needs
to be started/built with\n`KBN_OPTIMIZER_THEMES` environment variable
set and the feature flag\noverridden in `kibana.dev.yml`.\n\n```yml\n#
config/kibana.dev.yml\nfeature_flags.overrides.coreRendering.defaultThemeName:
amsterdam\n```\n\n```shell\n# Run dev server with both borealis and
Amsterdam theme
tags\nKBN_OPTIMIZER_THEMES=\"borealislight,borealisdark,v8light,v8dark\"
yarn start\n```\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"4dd8de807ae8a9d1b00a2a99c98510f7a21382db"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212787","number":212787,"mergeCommit":{"message":"Make
Amsterdam an opt-in theme (#212787)\n\n## Summary\n\nThis PR updates
`DEFAULT_THEME_TAGS` used to determine what theme tags\nare bundled in
Kibana by default to only include the Borealis theme,\nspecifically
`borealislight` and `borealisdark` theme tags. This change\nis expected
to decrease bundle sizes significantly and get back to\nbundling a
single theme, not two (4 → 2 theme tags).\n\nNow that Serverless, `9.0`,
and `main` all run with Borealis, there's no\nrisk in removing Amsterdam
from the bundle and decreasing Kibana bundle\nsizes.\n\nWe need to keep
the feature flag in code for the time being to easily\ntest future
Borealis iterations.\n\nAmsterdam will still be available as an opt-in
theme and is meant to be\nused locally when testing changes to be
backported to 8.x versions that\nuse Amsterdam. To do so, Kibana needs
to be started/built with\n`KBN_OPTIMIZER_THEMES` environment variable
set and the feature flag\noverridden in `kibana.dev.yml`.\n\n```yml\n#
config/kibana.dev.yml\nfeature_flags.overrides.coreRendering.defaultThemeName:
amsterdam\n```\n\n```shell\n# Run dev server with both borealis and
Amsterdam theme
tags\nKBN_OPTIMIZER_THEMES=\"borealislight,borealisdark,v8light,v8dark\"
yarn start\n```\n\n### Checklist\n\nCheck the PR satisfies following
conditions. \n\nReviewers should verify this PR satisfies this list as
well.\n\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios\n\n---------\n\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"4dd8de807ae8a9d1b00a2a99c98510f7a21382db"}}]}]
BACKPORT-->

Co-authored-by: Tomasz Kajtoch <tomasz.kajtoch@elastic.co>
2025-03-04 15:54:28 +01:00
Gerard Soldevila
19db8f87a9
[9.0] SKA: Relocate "platform" packages that remain on /packages (#208704) (#212224)
# Backport

This will backport the following commits from `main` to `9.0`:
- [SKA: Relocate "platform" packages that remain on `/packages`
(#208704)](https://github.com/elastic/kibana/pull/208704)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-02-24T11:03:30Z","message":"SKA:
Relocate \"platform\" packages that remain on `/packages`
(#208704)\n\n## Summary\n\nThe `/packages` folder at the root of the
Kibana repository used to\ncontain a lot of packages.\nIn the context of
SKA, they have been gradually moved to various\nlocations:\n*
`src/platform/packages`\n* `x-pack/platform/packages`\n*
`src/core/packages`\n\nCurrently, only `devOnly: true` packages are left
in this folder. This\ncomprises libraries for CLI scripts as well as
testing utilities.\n\nWith this PR, we are moving ~half of these
packages under\n`src/platform/packages/(private|shared)/`.\nIn
particular, we are moving those packages that are being used
from\nplatform and/or solutions.\n\nSince they are `\"devOnly\": true`,
this means they are ONLY used from\ntests, cypress tests, storybook
configs, ./scripts/ folders inside some\nmodules, or other non-prod-time
logic. Nonetheless, they are effectively\nreferenced from platform
and/or solutions code, hence I decided they\nshould be placed under
`platform` folders.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6a7c904f921434fe21dfa00eceabfb5e64e915dc","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"SKA:
Relocate \"platform\" packages that remain on
`/packages`","number":208704,"url":"https://github.com/elastic/kibana/pull/208704","mergeCommit":{"message":"SKA:
Relocate \"platform\" packages that remain on `/packages`
(#208704)\n\n## Summary\n\nThe `/packages` folder at the root of the
Kibana repository used to\ncontain a lot of packages.\nIn the context of
SKA, they have been gradually moved to various\nlocations:\n*
`src/platform/packages`\n* `x-pack/platform/packages`\n*
`src/core/packages`\n\nCurrently, only `devOnly: true` packages are left
in this folder. This\ncomprises libraries for CLI scripts as well as
testing utilities.\n\nWith this PR, we are moving ~half of these
packages under\n`src/platform/packages/(private|shared)/`.\nIn
particular, we are moving those packages that are being used
from\nplatform and/or solutions.\n\nSince they are `\"devOnly\": true`,
this means they are ONLY used from\ntests, cypress tests, storybook
configs, ./scripts/ folders inside some\nmodules, or other non-prod-time
logic. Nonetheless, they are effectively\nreferenced from platform
and/or solutions code, hence I decided they\nshould be placed under
`platform` folders.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6a7c904f921434fe21dfa00eceabfb5e64e915dc"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208704","number":208704,"mergeCommit":{"message":"SKA:
Relocate \"platform\" packages that remain on `/packages`
(#208704)\n\n## Summary\n\nThe `/packages` folder at the root of the
Kibana repository used to\ncontain a lot of packages.\nIn the context of
SKA, they have been gradually moved to various\nlocations:\n*
`src/platform/packages`\n* `x-pack/platform/packages`\n*
`src/core/packages`\n\nCurrently, only `devOnly: true` packages are left
in this folder. This\ncomprises libraries for CLI scripts as well as
testing utilities.\n\nWith this PR, we are moving ~half of these
packages under\n`src/platform/packages/(private|shared)/`.\nIn
particular, we are moving those packages that are being used
from\nplatform and/or solutions.\n\nSince they are `\"devOnly\": true`,
this means they are ONLY used from\ntests, cypress tests, storybook
configs, ./scripts/ folders inside some\nmodules, or other non-prod-time
logic. Nonetheless, they are effectively\nreferenced from platform
and/or solutions code, hence I decided they\nshould be placed under
`platform` folders.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"6a7c904f921434fe21dfa00eceabfb5e64e915dc"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-02-28 10:10:29 +01:00
Gerard Soldevila
e0faf07b61
[9.0] SKA: Misc cleanup and enhancements (#212207) (#212349)
# Backport

This will backport the following commits from `main` to `9.0`:
- [SKA: Misc cleanup and enhancements
(#212207)](https://github.com/elastic/kibana/pull/212207)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-02-24T13:31:00Z","message":"SKA:
Misc cleanup and enhancements (#212207)\n\n## Summary\n\n* Remove some
old paths pointing to `packages/kbn-pm` (no longer\nexists).\n* ~Fix
group and visibility for `@kbn/streams-app-wrapper-plugin`~.\n(done in
https://github.com/elastic/kibana/pull/212210)\n* Update
`scripts/relocate` logic with latest enhancements.\n* Convert
`@kbn/observability-synthetics-test-data` folder name to\ncamel-case
(messes up with pre-commit
hook).","sha":"a41badf96496c81587fca3d56c1c891abeb1a3a9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"SKA:
Misc cleanup and
enhancements","number":212207,"url":"https://github.com/elastic/kibana/pull/212207","mergeCommit":{"message":"SKA:
Misc cleanup and enhancements (#212207)\n\n## Summary\n\n* Remove some
old paths pointing to `packages/kbn-pm` (no longer\nexists).\n* ~Fix
group and visibility for `@kbn/streams-app-wrapper-plugin`~.\n(done in
https://github.com/elastic/kibana/pull/212210)\n* Update
`scripts/relocate` logic with latest enhancements.\n* Convert
`@kbn/observability-synthetics-test-data` folder name to\ncamel-case
(messes up with pre-commit
hook).","sha":"a41badf96496c81587fca3d56c1c891abeb1a3a9"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212207","number":212207,"mergeCommit":{"message":"SKA:
Misc cleanup and enhancements (#212207)\n\n## Summary\n\n* Remove some
old paths pointing to `packages/kbn-pm` (no longer\nexists).\n* ~Fix
group and visibility for `@kbn/streams-app-wrapper-plugin`~.\n(done in
https://github.com/elastic/kibana/pull/212210)\n* Update
`scripts/relocate` logic with latest enhancements.\n* Convert
`@kbn/observability-synthetics-test-data` folder name to\ncamel-case
(messes up with pre-commit
hook).","sha":"a41badf96496c81587fca3d56c1c891abeb1a3a9"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-25 12:35:31 +00:00
Kibana Machine
83e37babbf
[9.0] [Synthetics] Fix overview error popover !! (#211431) (#212123)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Synthetics] Fix overview error popover !!
(#211431)](https://github.com/elastic/kibana/pull/211431)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT
[{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2025-02-21T16:38:54Z","message":"[Synthetics]
Fix overview error popover !! (#211431)\n\n## Summary\n\nFix overview
error popover !!\n\nPings aren't being returned as part of overview data
anymore, so had to\nadd redux actions to fetch it separately via an
existing API\n\nFixes
https://github.com/elastic/kibana/issues/211745\n\n\n<img width=\"1728\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2244948f-e42d-443d-b6e7-42e0a72b1bfa\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Justin Kambic
<jk@elastic.co>","sha":"aaf73ff5f67a9163773ff43868f329e3b5693242","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:obs-ux-management","backport:version","v8.18.0","v9.1.0"],"title":"[Synthetics]
Fix overview error popover
!!","number":211431,"url":"https://github.com/elastic/kibana/pull/211431","mergeCommit":{"message":"[Synthetics]
Fix overview error popover !! (#211431)\n\n## Summary\n\nFix overview
error popover !!\n\nPings aren't being returned as part of overview data
anymore, so had to\nadd redux actions to fetch it separately via an
existing API\n\nFixes
https://github.com/elastic/kibana/issues/211745\n\n\n<img width=\"1728\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2244948f-e42d-443d-b6e7-42e0a72b1bfa\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Justin Kambic
<jk@elastic.co>","sha":"aaf73ff5f67a9163773ff43868f329e3b5693242"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211431","number":211431,"mergeCommit":{"message":"[Synthetics]
Fix overview error popover !! (#211431)\n\n## Summary\n\nFix overview
error popover !!\n\nPings aren't being returned as part of overview data
anymore, so had to\nadd redux actions to fetch it separately via an
existing API\n\nFixes
https://github.com/elastic/kibana/issues/211745\n\n\n<img width=\"1728\"
alt=\"image\"\nsrc=\"https://github.com/user-attachments/assets/2244948f-e42d-443d-b6e7-42e0a72b1bfa\"\n/>\n\n---------\n\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by:
Justin Kambic
<jk@elastic.co>","sha":"aaf73ff5f67a9163773ff43868f329e3b5693242"}}]}]
BACKPORT-->

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2025-02-21 18:31:54 +00:00
Kibana Machine
444aa4cb94
[9.0] [Synthtrace] Improve URL discovery when running locally in Serverless mode (#211670) (#212112)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Synthtrace] Improve URL discovery when running locally in Serverless
mode (#211670)](https://github.com/elastic/kibana/pull/211670)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Abdul Wahab
Zahid","email":"awahab07@yahoo.com"},"sourceCommit":{"committedDate":"2025-02-21T15:58:07Z","message":"[Synthtrace]
Improve URL discovery when running locally in Serverless mode
(#211670)\n\n## Summary\n\nThis PR improves how **Synthtrace** resolves
the Kibana URL when only\n`--target` (Elasticsearch) is provided or when
neither `--target` nor\n`--kibana` is specified. The CLI now attempts to
**automatically\ndiscover** the appropriate URLs based on the provided
arguments.\n\nSome adjustments were made to improve this discovery
process, especially\nwhen running **locally in Serverless mode**, where
Kibana may be using\n`http`, while Elasticsearch (ES) is on `https`.
Additionally,\nself-signed certificates do not work with the IP address
`127.0.0.1`, so\nthis PR defaults to `localhost` and warns the user if
`127.0.0.1` is\ndetected in Serverless mode.\n\n### **Improvements**\n-
If either of `--target` or `--kibana` or neither provided, the
CLI\nattempts to **discovers the URLs** dynamically now in both Stateful
and\nServerless.\n- Defaults to `localhost` instead of `127.0.0.1` to
avoid SSL\ncertificate issues.\n- Provides a **clear error message and
hint** when Kibana and ES use\ndifferent protocols (http vs https) and
either or both are unreachable.\n\n### **Expected Behavior After This
PR**\nThese commands should now work **seamlessly** in both **local
Stateful**\nand **Serverless** modes:\n\n```sh\n✗ node
scripts/synthtrace simple_logs\n```\n\nFor **Serverless mode**, these
also work:\n\n```sh\n✗ node scripts/synthtrace simple_logs
--kibana=http://elastic_serverless:changeme@localhost:5601\n```\n\n```sh\n✗
node scripts/synthtrace simple_logs
--target=https://elastic_serverless:changeme@localhost:9200
--kibana=http://elastic_serverless:changeme@localhost:5601\n```\n\n###
**(Side Note) Serverless Kibana with SSL Disabled**\nHowever, the
following command will **fail** with an error message if\nKibana is
running without SSL, while Elasticsearch is using `https`:\n\n```sh\n✗
node scripts/synthtrace simple_logs
--target=https://elastic_serverless:changeme@localhost:9200\n```\n\n####
**Error Output:**\n```sh\nLoading scenario from
kibana/packages/kbn-apm-synthtrace/src/scenarios/simple_logs.ts\nError:
Could not connect to Kibana. request to
https://elastic_serverless:changeme@localhost:5601/ failed, reason:
write EPROTO 400882F501000000:error:0A00010B:SSL
routines:ssl3_get_record:wrong version
number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\n\nIf your
Kibana URL differs, consider using the '--kibana' parameter to customize
it.\n```\n\n**Solution:** \nIf you must have to provide `--target` (non
defaults), also provide\n`--kibana` or start Kibana with SSL
enabled.\n```sh\n✗ yarn start --serverless=oblt
--ssl\n```","sha":"cb71dff86e042a088aa13cc11f90b0673438b365","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","backport:version","v9.1.0","v8.19.0"],"title":"[Synthtrace]
Improve URL discovery when running locally in Serverless
mode","number":211670,"url":"https://github.com/elastic/kibana/pull/211670","mergeCommit":{"message":"[Synthtrace]
Improve URL discovery when running locally in Serverless mode
(#211670)\n\n## Summary\n\nThis PR improves how **Synthtrace** resolves
the Kibana URL when only\n`--target` (Elasticsearch) is provided or when
neither `--target` nor\n`--kibana` is specified. The CLI now attempts to
**automatically\ndiscover** the appropriate URLs based on the provided
arguments.\n\nSome adjustments were made to improve this discovery
process, especially\nwhen running **locally in Serverless mode**, where
Kibana may be using\n`http`, while Elasticsearch (ES) is on `https`.
Additionally,\nself-signed certificates do not work with the IP address
`127.0.0.1`, so\nthis PR defaults to `localhost` and warns the user if
`127.0.0.1` is\ndetected in Serverless mode.\n\n### **Improvements**\n-
If either of `--target` or `--kibana` or neither provided, the
CLI\nattempts to **discovers the URLs** dynamically now in both Stateful
and\nServerless.\n- Defaults to `localhost` instead of `127.0.0.1` to
avoid SSL\ncertificate issues.\n- Provides a **clear error message and
hint** when Kibana and ES use\ndifferent protocols (http vs https) and
either or both are unreachable.\n\n### **Expected Behavior After This
PR**\nThese commands should now work **seamlessly** in both **local
Stateful**\nand **Serverless** modes:\n\n```sh\n✗ node
scripts/synthtrace simple_logs\n```\n\nFor **Serverless mode**, these
also work:\n\n```sh\n✗ node scripts/synthtrace simple_logs
--kibana=http://elastic_serverless:changeme@localhost:5601\n```\n\n```sh\n✗
node scripts/synthtrace simple_logs
--target=https://elastic_serverless:changeme@localhost:9200
--kibana=http://elastic_serverless:changeme@localhost:5601\n```\n\n###
**(Side Note) Serverless Kibana with SSL Disabled**\nHowever, the
following command will **fail** with an error message if\nKibana is
running without SSL, while Elasticsearch is using `https`:\n\n```sh\n✗
node scripts/synthtrace simple_logs
--target=https://elastic_serverless:changeme@localhost:9200\n```\n\n####
**Error Output:**\n```sh\nLoading scenario from
kibana/packages/kbn-apm-synthtrace/src/scenarios/simple_logs.ts\nError:
Could not connect to Kibana. request to
https://elastic_serverless:changeme@localhost:5601/ failed, reason:
write EPROTO 400882F501000000:error:0A00010B:SSL
routines:ssl3_get_record:wrong version
number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\n\nIf your
Kibana URL differs, consider using the '--kibana' parameter to customize
it.\n```\n\n**Solution:** \nIf you must have to provide `--target` (non
defaults), also provide\n`--kibana` or start Kibana with SSL
enabled.\n```sh\n✗ yarn start --serverless=oblt
--ssl\n```","sha":"cb71dff86e042a088aa13cc11f90b0673438b365"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211670","number":211670,"mergeCommit":{"message":"[Synthtrace]
Improve URL discovery when running locally in Serverless mode
(#211670)\n\n## Summary\n\nThis PR improves how **Synthtrace** resolves
the Kibana URL when only\n`--target` (Elasticsearch) is provided or when
neither `--target` nor\n`--kibana` is specified. The CLI now attempts to
**automatically\ndiscover** the appropriate URLs based on the provided
arguments.\n\nSome adjustments were made to improve this discovery
process, especially\nwhen running **locally in Serverless mode**, where
Kibana may be using\n`http`, while Elasticsearch (ES) is on `https`.
Additionally,\nself-signed certificates do not work with the IP address
`127.0.0.1`, so\nthis PR defaults to `localhost` and warns the user if
`127.0.0.1` is\ndetected in Serverless mode.\n\n### **Improvements**\n-
If either of `--target` or `--kibana` or neither provided, the
CLI\nattempts to **discovers the URLs** dynamically now in both Stateful
and\nServerless.\n- Defaults to `localhost` instead of `127.0.0.1` to
avoid SSL\ncertificate issues.\n- Provides a **clear error message and
hint** when Kibana and ES use\ndifferent protocols (http vs https) and
either or both are unreachable.\n\n### **Expected Behavior After This
PR**\nThese commands should now work **seamlessly** in both **local
Stateful**\nand **Serverless** modes:\n\n```sh\n✗ node
scripts/synthtrace simple_logs\n```\n\nFor **Serverless mode**, these
also work:\n\n```sh\n✗ node scripts/synthtrace simple_logs
--kibana=http://elastic_serverless:changeme@localhost:5601\n```\n\n```sh\n✗
node scripts/synthtrace simple_logs
--target=https://elastic_serverless:changeme@localhost:9200
--kibana=http://elastic_serverless:changeme@localhost:5601\n```\n\n###
**(Side Note) Serverless Kibana with SSL Disabled**\nHowever, the
following command will **fail** with an error message if\nKibana is
running without SSL, while Elasticsearch is using `https`:\n\n```sh\n✗
node scripts/synthtrace simple_logs
--target=https://elastic_serverless:changeme@localhost:9200\n```\n\n####
**Error Output:**\n```sh\nLoading scenario from
kibana/packages/kbn-apm-synthtrace/src/scenarios/simple_logs.ts\nError:
Could not connect to Kibana. request to
https://elastic_serverless:changeme@localhost:5601/ failed, reason:
write EPROTO 400882F501000000:error:0A00010B:SSL
routines:ssl3_get_record:wrong version
number:../deps/openssl/openssl/ssl/record/ssl3_record.c:355:\n\nIf your
Kibana URL differs, consider using the '--kibana' parameter to customize
it.\n```\n\n**Solution:** \nIf you must have to provide `--target` (non
defaults), also provide\n`--kibana` or start Kibana with SSL
enabled.\n```sh\n✗ yarn start --serverless=oblt
--ssl\n```","sha":"cb71dff86e042a088aa13cc11f90b0673438b365"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Abdul Wahab Zahid <awahab07@yahoo.com>
2025-02-21 17:40:11 +00:00
Kibana Machine
a88cbe0dca
[9.0] [scout] disable reporter for config validation command (#212072) (#212109)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[scout] disable reporter for config validation command
(#212072)](https://github.com/elastic/kibana/pull/212072)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-02-21T15:42:32Z","message":"[scout]
disable reporter for config validation command (#212072)\n\n##
Summary\n\nIn #211918 I added config validation check to skip run if
there are no\ntests in playwright config.\n\nIt turned out that
Playwright init reporters even when `--list` command\nis passed and no
tests are executed, that lead to Scout reports being\nloaded and then
causing reporter error when the other command runs the\ntests:\n\n```\n
proc [playwright] info Calling save with destination:
/Users/dmle/github/kibana/.scout/reports/scout-playwright-9518363d47816953\n
proc [playwright] ERROR Error: Save destination path
'/Users/dmle/github/kibana/.scout/reports/scout-playwright-9518363d47816953'
already exists\n proc [playwright] at ScoutEventsReport.save
(/Users/dmle/github/kibana/packages/kbn-scout-reporting/src/reporting/report/events/report.ts:56:13)\n
proc [playwright] at ScoutPlaywrightReporter.onEnd
(/Users/dmle/github/kibana/packages/kbn-scout-reporting/src/reporting/playwright/events/playwright_reporter.ts:277:19)\n
proc [playwright] at ReporterV2Wrapper.onEnd
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/reporterV2.js:91:165)\n
proc [playwright] at
/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:71:117\n
proc [playwright] at wrapAsync
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:112:18)\n
proc [playwright] at Multiplexer.onEnd
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:69:31)\n
proc [playwright] at InternalReporter.onEnd
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/internalReporter.js:77:12)\n
proc [playwright] at finishTaskRun
(/Users/dmle/github/kibana/node_modules/playwright/lib/runner/tasks.js:90:26)\n
proc [playwright] at runTasks
(/Users/dmle/github/kibana/node_modules/playwright/lib/runner/tasks.js:73:10)\n
proc [playwright] at Runner.runAllTests
(/Users/dmle/github/kibana/node_modules/playwright/lib/runner/runner.js:72:20)\n
proc [playwright] at runTests
(/Users/dmle/github/kibana/node_modules/playwright/lib/program.js:211:18)\n
proc [playwright] at t.<anonymous>
(/Users/dmle/github/kibana/node_modules/playwright/lib/program.js:54:7)\n```\n\nThe
simplest solution is to explicitly disable Scout reporter for
config\nvalidation
command.","sha":"f5a1ead8cf053168cd94fdc45facaca8f2dbc35a","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:QA","release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout]
disable reporter for config validation
command","number":212072,"url":"https://github.com/elastic/kibana/pull/212072","mergeCommit":{"message":"[scout]
disable reporter for config validation command (#212072)\n\n##
Summary\n\nIn #211918 I added config validation check to skip run if
there are no\ntests in playwright config.\n\nIt turned out that
Playwright init reporters even when `--list` command\nis passed and no
tests are executed, that lead to Scout reports being\nloaded and then
causing reporter error when the other command runs the\ntests:\n\n```\n
proc [playwright] info Calling save with destination:
/Users/dmle/github/kibana/.scout/reports/scout-playwright-9518363d47816953\n
proc [playwright] ERROR Error: Save destination path
'/Users/dmle/github/kibana/.scout/reports/scout-playwright-9518363d47816953'
already exists\n proc [playwright] at ScoutEventsReport.save
(/Users/dmle/github/kibana/packages/kbn-scout-reporting/src/reporting/report/events/report.ts:56:13)\n
proc [playwright] at ScoutPlaywrightReporter.onEnd
(/Users/dmle/github/kibana/packages/kbn-scout-reporting/src/reporting/playwright/events/playwright_reporter.ts:277:19)\n
proc [playwright] at ReporterV2Wrapper.onEnd
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/reporterV2.js:91:165)\n
proc [playwright] at
/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:71:117\n
proc [playwright] at wrapAsync
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:112:18)\n
proc [playwright] at Multiplexer.onEnd
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:69:31)\n
proc [playwright] at InternalReporter.onEnd
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/internalReporter.js:77:12)\n
proc [playwright] at finishTaskRun
(/Users/dmle/github/kibana/node_modules/playwright/lib/runner/tasks.js:90:26)\n
proc [playwright] at runTasks
(/Users/dmle/github/kibana/node_modules/playwright/lib/runner/tasks.js:73:10)\n
proc [playwright] at Runner.runAllTests
(/Users/dmle/github/kibana/node_modules/playwright/lib/runner/runner.js:72:20)\n
proc [playwright] at runTests
(/Users/dmle/github/kibana/node_modules/playwright/lib/program.js:211:18)\n
proc [playwright] at t.<anonymous>
(/Users/dmle/github/kibana/node_modules/playwright/lib/program.js:54:7)\n```\n\nThe
simplest solution is to explicitly disable Scout reporter for
config\nvalidation
command.","sha":"f5a1ead8cf053168cd94fdc45facaca8f2dbc35a"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212072","number":212072,"mergeCommit":{"message":"[scout]
disable reporter for config validation command (#212072)\n\n##
Summary\n\nIn #211918 I added config validation check to skip run if
there are no\ntests in playwright config.\n\nIt turned out that
Playwright init reporters even when `--list` command\nis passed and no
tests are executed, that lead to Scout reports being\nloaded and then
causing reporter error when the other command runs the\ntests:\n\n```\n
proc [playwright] info Calling save with destination:
/Users/dmle/github/kibana/.scout/reports/scout-playwright-9518363d47816953\n
proc [playwright] ERROR Error: Save destination path
'/Users/dmle/github/kibana/.scout/reports/scout-playwright-9518363d47816953'
already exists\n proc [playwright] at ScoutEventsReport.save
(/Users/dmle/github/kibana/packages/kbn-scout-reporting/src/reporting/report/events/report.ts:56:13)\n
proc [playwright] at ScoutPlaywrightReporter.onEnd
(/Users/dmle/github/kibana/packages/kbn-scout-reporting/src/reporting/playwright/events/playwright_reporter.ts:277:19)\n
proc [playwright] at ReporterV2Wrapper.onEnd
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/reporterV2.js:91:165)\n
proc [playwright] at
/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:71:117\n
proc [playwright] at wrapAsync
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:112:18)\n
proc [playwright] at Multiplexer.onEnd
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/multiplexer.js:69:31)\n
proc [playwright] at InternalReporter.onEnd
(/Users/dmle/github/kibana/node_modules/playwright/lib/reporters/internalReporter.js:77:12)\n
proc [playwright] at finishTaskRun
(/Users/dmle/github/kibana/node_modules/playwright/lib/runner/tasks.js:90:26)\n
proc [playwright] at runTasks
(/Users/dmle/github/kibana/node_modules/playwright/lib/runner/tasks.js:73:10)\n
proc [playwright] at Runner.runAllTests
(/Users/dmle/github/kibana/node_modules/playwright/lib/runner/runner.js:72:20)\n
proc [playwright] at runTests
(/Users/dmle/github/kibana/node_modules/playwright/lib/program.js:211:18)\n
proc [playwright] at t.<anonymous>
(/Users/dmle/github/kibana/node_modules/playwright/lib/program.js:54:7)\n```\n\nThe
simplest solution is to explicitly disable Scout reporter for
config\nvalidation
command.","sha":"f5a1ead8cf053168cd94fdc45facaca8f2dbc35a"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-02-21 17:36:29 +00:00
Kibana Machine
6b1a23bc2c
[9.0] [scout] validate config has tests before starting servers (#211918) (#211941)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[scout] validate config has tests before starting servers
(#211918)](https://github.com/elastic/kibana/pull/211918)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-02-20T17:20:21Z","message":"[scout]
validate config has tests before starting servers (#211918)\n\n##
Summary\n\nThere is no need to start servers (~1.5 min run time) if
there are no\ntests matching filters or maybe config itself has all
tests skipped.\n\nThis PR uses Playwright cli with `--list` flag to
quickly validate\nplaywright config and exit with status code `2` (`1`
is reserved for\nerrors during servers start or test failures). it also
useful to know in\nadvance how many tests were about to run:\n\ncase 1:
tests found\n\n```\n$ node scripts/scout.js run-tests --config
x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts
--serverless=security\n info scout: Test server configuration saved at
/Users/dmle/github/kibana/.scout/servers/local.json\n info scout:
Validate Playwright config has tests\n info scout: Total: 5 tests in 2
files\n info Verifying Docker is installed.\n │ info Docker version
20.10.14, build a224086349\n...\n```\n\ncase 2: no tests found\n```\n$
node scripts/scout.js run-tests --config
x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts
--stateful\n info scout: Test server configuration saved at
/Users/dmle/github/kibana/.scout/servers/local.json\n info scout:
Validate Playwright config has tests\nERROR scout: No tests found in
[x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts]\n```","sha":"30c4275462bfb975f4eb86d45fc608971ebfcfbc","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:QA","release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout]
validate config has tests before starting
servers","number":211918,"url":"https://github.com/elastic/kibana/pull/211918","mergeCommit":{"message":"[scout]
validate config has tests before starting servers (#211918)\n\n##
Summary\n\nThere is no need to start servers (~1.5 min run time) if
there are no\ntests matching filters or maybe config itself has all
tests skipped.\n\nThis PR uses Playwright cli with `--list` flag to
quickly validate\nplaywright config and exit with status code `2` (`1`
is reserved for\nerrors during servers start or test failures). it also
useful to know in\nadvance how many tests were about to run:\n\ncase 1:
tests found\n\n```\n$ node scripts/scout.js run-tests --config
x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts
--serverless=security\n info scout: Test server configuration saved at
/Users/dmle/github/kibana/.scout/servers/local.json\n info scout:
Validate Playwright config has tests\n info scout: Total: 5 tests in 2
files\n info Verifying Docker is installed.\n │ info Docker version
20.10.14, build a224086349\n...\n```\n\ncase 2: no tests found\n```\n$
node scripts/scout.js run-tests --config
x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts
--stateful\n info scout: Test server configuration saved at
/Users/dmle/github/kibana/.scout/servers/local.json\n info scout:
Validate Playwright config has tests\nERROR scout: No tests found in
[x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts]\n```","sha":"30c4275462bfb975f4eb86d45fc608971ebfcfbc"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211918","number":211918,"mergeCommit":{"message":"[scout]
validate config has tests before starting servers (#211918)\n\n##
Summary\n\nThere is no need to start servers (~1.5 min run time) if
there are no\ntests matching filters or maybe config itself has all
tests skipped.\n\nThis PR uses Playwright cli with `--list` flag to
quickly validate\nplaywright config and exit with status code `2` (`1`
is reserved for\nerrors during servers start or test failures). it also
useful to know in\nadvance how many tests were about to run:\n\ncase 1:
tests found\n\n```\n$ node scripts/scout.js run-tests --config
x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts
--serverless=security\n info scout: Test server configuration saved at
/Users/dmle/github/kibana/.scout/servers/local.json\n info scout:
Validate Playwright config has tests\n info scout: Total: 5 tests in 2
files\n info Verifying Docker is installed.\n │ info Docker version
20.10.14, build a224086349\n...\n```\n\ncase 2: no tests found\n```\n$
node scripts/scout.js run-tests --config
x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts
--stateful\n info scout: Test server configuration saved at
/Users/dmle/github/kibana/.scout/servers/local.json\n info scout:
Validate Playwright config has tests\nERROR scout: No tests found in
[x-pack/solutions/observability/plugins/observability_onboarding/ui_tests/playwright.config.ts]\n```","sha":"30c4275462bfb975f4eb86d45fc608971ebfcfbc"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-02-20 20:17:05 +01:00
Kibana Machine
4656c203bf
[9.0] [scout] Don't mix await with promise callbacks (#211905) (#211916)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[scout] Don't mix `await` with promise callbacks
(#211905)](https://github.com/elastic/kibana/pull/211905)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"David
Olaru","email":"dolaru@elastic.co"},"sourceCommit":{"committedDate":"2025-02-20T15:05:17Z","message":"[scout]
Don't mix `await` with promise callbacks (#211905)\n\n##
Summary\n\nThere's a high likelihood that this causes some unwanted
behavior where\nthe promise is not resolved and the `node` process just
exists without\nany
error.","sha":"1147bb65dd655d9dac42f866c61eb23af42d2d74","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[scout]
Don't mix `await` with promise
callbacks","number":211905,"url":"https://github.com/elastic/kibana/pull/211905","mergeCommit":{"message":"[scout]
Don't mix `await` with promise callbacks (#211905)\n\n##
Summary\n\nThere's a high likelihood that this causes some unwanted
behavior where\nthe promise is not resolved and the `node` process just
exists without\nany
error.","sha":"1147bb65dd655d9dac42f866c61eb23af42d2d74"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211905","number":211905,"mergeCommit":{"message":"[scout]
Don't mix `await` with promise callbacks (#211905)\n\n##
Summary\n\nThere's a high likelihood that this causes some unwanted
behavior where\nthe promise is not resolved and the `node` process just
exists without\nany
error.","sha":"1147bb65dd655d9dac42f866c61eb23af42d2d74"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: David Olaru <dolaru@elastic.co>
2025-02-20 18:00:07 +01:00
Gerard Soldevila
1b941bcd42
[9.0] SKA: Categorise platform devOnly packages under /packages (#211560) (#211739)
# Backport

This will backport the following commits from `main` to `9.0`:
- [SKA: Categorise platform devOnly packages under `/packages`
(#211560)](https://github.com/elastic/kibana/pull/211560)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-02-19T09:38:42Z","message":"SKA:
Categorise platform devOnly packages under `/packages` (#211560)\n\n##
Summary\r\n\r\nMost of the packages under `/packages` have been
relocated in the\r\ncontext of _Sustainable Kibana
Architecture_.\r\n\r\nThe remaining packages are `devOnly: true`, and
they can be grouped as\r\nfollows:\r\n\r\n1. Packages that are ONLY used
from /scripts/\r\n2. Packages that are used from platform and solutions
modules (they are\r\nused from tests, cypress tests, storybook configs,
./scripts/ folders\r\ninside some modules, or other non-prod-time
logic).\r\n\r\nThis PR categorises the packages in (2) as
`platform/(private|shared)`\r\nto reflect that they are being used from
platform and solutions modules\r\n(even though they're used from
non-production code).\r\n\r\nNext, we're gonna have to decide whether we
want to relocate some of\r\nthem (1, 2 or both) under a different
path.","sha":"a1fde9776552bae822f380195951f34996665c12","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"SKA:
Categorise platform devOnly packages under
`/packages`","number":211560,"url":"https://github.com/elastic/kibana/pull/211560","mergeCommit":{"message":"SKA:
Categorise platform devOnly packages under `/packages` (#211560)\n\n##
Summary\r\n\r\nMost of the packages under `/packages` have been
relocated in the\r\ncontext of _Sustainable Kibana
Architecture_.\r\n\r\nThe remaining packages are `devOnly: true`, and
they can be grouped as\r\nfollows:\r\n\r\n1. Packages that are ONLY used
from /scripts/\r\n2. Packages that are used from platform and solutions
modules (they are\r\nused from tests, cypress tests, storybook configs,
./scripts/ folders\r\ninside some modules, or other non-prod-time
logic).\r\n\r\nThis PR categorises the packages in (2) as
`platform/(private|shared)`\r\nto reflect that they are being used from
platform and solutions modules\r\n(even though they're used from
non-production code).\r\n\r\nNext, we're gonna have to decide whether we
want to relocate some of\r\nthem (1, 2 or both) under a different
path.","sha":"a1fde9776552bae822f380195951f34996665c12"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211560","number":211560,"mergeCommit":{"message":"SKA:
Categorise platform devOnly packages under `/packages` (#211560)\n\n##
Summary\r\n\r\nMost of the packages under `/packages` have been
relocated in the\r\ncontext of _Sustainable Kibana
Architecture_.\r\n\r\nThe remaining packages are `devOnly: true`, and
they can be grouped as\r\nfollows:\r\n\r\n1. Packages that are ONLY used
from /scripts/\r\n2. Packages that are used from platform and solutions
modules (they are\r\nused from tests, cypress tests, storybook configs,
./scripts/ folders\r\ninside some modules, or other non-prod-time
logic).\r\n\r\nThis PR categorises the packages in (2) as
`platform/(private|shared)`\r\nto reflect that they are being used from
platform and solutions modules\r\n(even though they're used from
non-production code).\r\n\r\nNext, we're gonna have to decide whether we
want to relocate some of\r\nthem (1, 2 or both) under a different
path.","sha":"a1fde9776552bae822f380195951f34996665c12"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/211702","number":211702,"state":"OPEN"}]}]
BACKPORT-->
2025-02-19 14:01:39 +01:00
Kibana Machine
d8ea454929
[9.0] SKA: Fix kebab-case issues in security-threat-hunting packages (#211349) (#211722)
# Backport

This will backport the following commits from `main` to `9.0`:
- [SKA: Fix kebab-case issues in security-threat-hunting packages
(#211349)](https://github.com/elastic/kibana/pull/211349)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-02-19T10:21:45Z","message":"SKA:
Fix kebab-case issues in security-threat-hunting packages
(#211349)\n\n## Summary\r\n\r\nThis PR aims at relocating some of the
Kibana modules (plugins and\r\npackages) into a new folder structure,
according to the _Sustainable\r\nKibana Architecture_
initiative.\r\n\r\n> [!IMPORTANT]\r\n> * We kindly ask you to:\r\n> *
Manually fix the errors in the error section below (if there
are\r\nany).\r\n> * Search for the `packages[\\/\\\\]` and
`plugins[\\/\\\\]` patterns in the\r\nsource code (Babel and Eslint
config files), and update them\r\nappropriately.\r\n> * Manually
review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\r\nany CI pipeline customizations continue to be correctly
applied after\r\nthe changed path names\r\n> * Review all of the updated
files, specially the `.ts` and `.js` files\r\nlisted in the sections
below, as some of them contain relative paths\r\nthat have been
updated.\r\n> * Think of potential impact of the move, including tooling
and\r\nconfiguration files that can be pointing to the relocated
modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to
source code\r\n\r\n> [!NOTE]\r\n> * This PR has been
auto-generated.\r\n> * Any manual contributions will be lost if the
'relocate' script is\r\nre-run.\r\n> * Try to obtain the missing reviews
/ approvals before applying manual\r\nfixes, and/or keep your changes in
a .patch / git stash.\r\n> * Please
use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack
channel for feedback.\r\n\r\nAre you trying to rebase this PR to solve
merge conflicts? Please follow\r\nthe steps
describe\r\n[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).\r\n\r\n####
3 packages(s) are going to be relocated:\r\n\r\n| Id | Target folder
|\r\n| -- | ------------- |\r\n| `@kbn/securitysolution-data-table`
|\r\n`x-pack/solutions/security/packages/data-table` |\r\n|
`@kbn/ecs-data-quality-dashboard`
|\r\n`x-pack/solutions/security/packages/ecs-data-quality-dashboard`
|\r\n| `@kbn/security-solution-side-nav`
|\r\n`x-pack/solutions/security/packages/side-nav` |\r\n\r\n\r\n<details
>\r\n<summary>Updated
references</summary>\r\n\r\n```\r\n./.i18nrc.json\r\n./package.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/platform/packages/private/kbn-repo-packages/package-map.json\r\n./tsconfig.base.json\r\n./tsconfig.base.type_check.json\r\n./tsconfig.refs.json\r\n./x-pack/solutions/security/packages/data-table/jest.config.js\r\n./x-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js\r\n./x-pack/solutions/security/packages/side-nav/jest.config.js\r\n./yarn.lock\r\n.github/CODEOWNERS\r\n```\r\n\r\n</details><details
>\r\n<summary>Updated relative
paths</summary>\r\n\r\n```\r\nx-pack/solutions/security/packages/data-table/jest.config.js:11\r\nx-pack/solutions/security/packages/data-table/tsconfig.json:2\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js:24\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:10\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:2\r\nx-pack/solutions/security/packages/side-nav/jest.config.js:10\r\nx-pack/solutions/security/packages/side-nav/tsconfig.json:2\r\n```\r\n\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"69a87194d17a8228d1643845c306a01201e921b7","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"SKA:
Fix kebab-case issues in security-threat-hunting
packages","number":211349,"url":"https://github.com/elastic/kibana/pull/211349","mergeCommit":{"message":"SKA:
Fix kebab-case issues in security-threat-hunting packages
(#211349)\n\n## Summary\r\n\r\nThis PR aims at relocating some of the
Kibana modules (plugins and\r\npackages) into a new folder structure,
according to the _Sustainable\r\nKibana Architecture_
initiative.\r\n\r\n> [!IMPORTANT]\r\n> * We kindly ask you to:\r\n> *
Manually fix the errors in the error section below (if there
are\r\nany).\r\n> * Search for the `packages[\\/\\\\]` and
`plugins[\\/\\\\]` patterns in the\r\nsource code (Babel and Eslint
config files), and update them\r\nappropriately.\r\n> * Manually
review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\r\nany CI pipeline customizations continue to be correctly
applied after\r\nthe changed path names\r\n> * Review all of the updated
files, specially the `.ts` and `.js` files\r\nlisted in the sections
below, as some of them contain relative paths\r\nthat have been
updated.\r\n> * Think of potential impact of the move, including tooling
and\r\nconfiguration files that can be pointing to the relocated
modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to
source code\r\n\r\n> [!NOTE]\r\n> * This PR has been
auto-generated.\r\n> * Any manual contributions will be lost if the
'relocate' script is\r\nre-run.\r\n> * Try to obtain the missing reviews
/ approvals before applying manual\r\nfixes, and/or keep your changes in
a .patch / git stash.\r\n> * Please
use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack
channel for feedback.\r\n\r\nAre you trying to rebase this PR to solve
merge conflicts? Please follow\r\nthe steps
describe\r\n[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).\r\n\r\n####
3 packages(s) are going to be relocated:\r\n\r\n| Id | Target folder
|\r\n| -- | ------------- |\r\n| `@kbn/securitysolution-data-table`
|\r\n`x-pack/solutions/security/packages/data-table` |\r\n|
`@kbn/ecs-data-quality-dashboard`
|\r\n`x-pack/solutions/security/packages/ecs-data-quality-dashboard`
|\r\n| `@kbn/security-solution-side-nav`
|\r\n`x-pack/solutions/security/packages/side-nav` |\r\n\r\n\r\n<details
>\r\n<summary>Updated
references</summary>\r\n\r\n```\r\n./.i18nrc.json\r\n./package.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/platform/packages/private/kbn-repo-packages/package-map.json\r\n./tsconfig.base.json\r\n./tsconfig.base.type_check.json\r\n./tsconfig.refs.json\r\n./x-pack/solutions/security/packages/data-table/jest.config.js\r\n./x-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js\r\n./x-pack/solutions/security/packages/side-nav/jest.config.js\r\n./yarn.lock\r\n.github/CODEOWNERS\r\n```\r\n\r\n</details><details
>\r\n<summary>Updated relative
paths</summary>\r\n\r\n```\r\nx-pack/solutions/security/packages/data-table/jest.config.js:11\r\nx-pack/solutions/security/packages/data-table/tsconfig.json:2\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js:24\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:10\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:2\r\nx-pack/solutions/security/packages/side-nav/jest.config.js:10\r\nx-pack/solutions/security/packages/side-nav/tsconfig.json:2\r\n```\r\n\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"69a87194d17a8228d1643845c306a01201e921b7"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211349","number":211349,"mergeCommit":{"message":"SKA:
Fix kebab-case issues in security-threat-hunting packages
(#211349)\n\n## Summary\r\n\r\nThis PR aims at relocating some of the
Kibana modules (plugins and\r\npackages) into a new folder structure,
according to the _Sustainable\r\nKibana Architecture_
initiative.\r\n\r\n> [!IMPORTANT]\r\n> * We kindly ask you to:\r\n> *
Manually fix the errors in the error section below (if there
are\r\nany).\r\n> * Search for the `packages[\\/\\\\]` and
`plugins[\\/\\\\]` patterns in the\r\nsource code (Babel and Eslint
config files), and update them\r\nappropriately.\r\n> * Manually
review\r\n`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to
ensure that\r\nany CI pipeline customizations continue to be correctly
applied after\r\nthe changed path names\r\n> * Review all of the updated
files, specially the `.ts` and `.js` files\r\nlisted in the sections
below, as some of them contain relative paths\r\nthat have been
updated.\r\n> * Think of potential impact of the move, including tooling
and\r\nconfiguration files that can be pointing to the relocated
modules. E.g.:\r\n> * customised eslint rules\r\n> * docs pointing to
source code\r\n\r\n> [!NOTE]\r\n> * This PR has been
auto-generated.\r\n> * Any manual contributions will be lost if the
'relocate' script is\r\nre-run.\r\n> * Try to obtain the missing reviews
/ approvals before applying manual\r\nfixes, and/or keep your changes in
a .patch / git stash.\r\n> * Please
use\r\n[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)\r\nSlack
channel for feedback.\r\n\r\nAre you trying to rebase this PR to solve
merge conflicts? Please follow\r\nthe steps
describe\r\n[here](https://elastic.slack.com/archives/C07TCKTA22E/p1734019532879269?thread_ts=1734019339.935419&cid=C07TCKTA22E).\r\n\r\n####
3 packages(s) are going to be relocated:\r\n\r\n| Id | Target folder
|\r\n| -- | ------------- |\r\n| `@kbn/securitysolution-data-table`
|\r\n`x-pack/solutions/security/packages/data-table` |\r\n|
`@kbn/ecs-data-quality-dashboard`
|\r\n`x-pack/solutions/security/packages/ecs-data-quality-dashboard`
|\r\n| `@kbn/security-solution-side-nav`
|\r\n`x-pack/solutions/security/packages/side-nav` |\r\n\r\n\r\n<details
>\r\n<summary>Updated
references</summary>\r\n\r\n```\r\n./.i18nrc.json\r\n./package.json\r\n./packages/kbn-ts-projects/config-paths.json\r\n./src/platform/packages/private/kbn-repo-packages/package-map.json\r\n./tsconfig.base.json\r\n./tsconfig.base.type_check.json\r\n./tsconfig.refs.json\r\n./x-pack/solutions/security/packages/data-table/jest.config.js\r\n./x-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js\r\n./x-pack/solutions/security/packages/side-nav/jest.config.js\r\n./yarn.lock\r\n.github/CODEOWNERS\r\n```\r\n\r\n</details><details
>\r\n<summary>Updated relative
paths</summary>\r\n\r\n```\r\nx-pack/solutions/security/packages/data-table/jest.config.js:11\r\nx-pack/solutions/security/packages/data-table/tsconfig.json:2\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/jest.config.js:24\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:10\r\nx-pack/solutions/security/packages/ecs-data-quality-dashboard/tsconfig.json:2\r\nx-pack/solutions/security/packages/side-nav/jest.config.js:10\r\nx-pack/solutions/security/packages/side-nav/tsconfig.json:2\r\n```\r\n\r\n</details>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"69a87194d17a8228d1643845c306a01201e921b7"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
2025-02-19 13:13:48 +01:00
Gerard Soldevila
6bf12f7d34
[9.0] SKA: Unify kbn-management folders + storybook config (#211564) (#211688)
# Backport

This will backport the following commits from `main` to `9.0`:
- [SKA: Unify &#x60;kbn-management&#x60; folders + storybook config
(#211564)](https://github.com/elastic/kibana/pull/211564)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-02-19T08:10:22Z","message":"SKA:
Unify `kbn-management` folders + storybook config (#211564)\n\n##
Summary\r\n\r\nAs part of the SKA, some groups of modules have been
broken-down and\r\nrelocated in different folders, negatively impacting
DX. This is the\r\ncase for `kbn-management` modules, that are spread
across:\r\n```\r\n- packages/kbn-management (storybook config)\r\n-
src/platform/packages/private/kbn-management\r\n-
src/platform/packages/shared/kbn-management\r\n```\r\n\r\nThe goal of
this PR is to unify them back
under\r\n`src/platform/packages/shared/kbn-management`.\r\nIn this
scenario, I believe the simplification is worth the trade off.\r\n\r\nCC
@elastic/kibana-management WDYT?\r\n\r\nCo-authored-by: Matthew Kime
<matt@mattki.me>","sha":"b2b3fa9a84034bf6a49a38ea3b434245582c7909","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana
Management","release_note:skip","v9.0.0","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"SKA:
Unify `kbn-management` folders + storybook
config","number":211564,"url":"https://github.com/elastic/kibana/pull/211564","mergeCommit":{"message":"SKA:
Unify `kbn-management` folders + storybook config (#211564)\n\n##
Summary\r\n\r\nAs part of the SKA, some groups of modules have been
broken-down and\r\nrelocated in different folders, negatively impacting
DX. This is the\r\ncase for `kbn-management` modules, that are spread
across:\r\n```\r\n- packages/kbn-management (storybook config)\r\n-
src/platform/packages/private/kbn-management\r\n-
src/platform/packages/shared/kbn-management\r\n```\r\n\r\nThe goal of
this PR is to unify them back
under\r\n`src/platform/packages/shared/kbn-management`.\r\nIn this
scenario, I believe the simplification is worth the trade off.\r\n\r\nCC
@elastic/kibana-management WDYT?\r\n\r\nCo-authored-by: Matthew Kime
<matt@mattki.me>","sha":"b2b3fa9a84034bf6a49a38ea3b434245582c7909"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211564","number":211564,"mergeCommit":{"message":"SKA:
Unify `kbn-management` folders + storybook config (#211564)\n\n##
Summary\r\n\r\nAs part of the SKA, some groups of modules have been
broken-down and\r\nrelocated in different folders, negatively impacting
DX. This is the\r\ncase for `kbn-management` modules, that are spread
across:\r\n```\r\n- packages/kbn-management (storybook config)\r\n-
src/platform/packages/private/kbn-management\r\n-
src/platform/packages/shared/kbn-management\r\n```\r\n\r\nThe goal of
this PR is to unify them back
under\r\n`src/platform/packages/shared/kbn-management`.\r\nIn this
scenario, I believe the simplification is worth the trade off.\r\n\r\nCC
@elastic/kibana-management WDYT?\r\n\r\nCo-authored-by: Matthew Kime
<matt@mattki.me>","sha":"b2b3fa9a84034bf6a49a38ea3b434245582c7909"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-02-19 11:32:00 +01:00
Gerard Soldevila
30ba63d4a7
[9.0] SKA: Unify serverless modules + storybook config (#211570) (#211692)
# Backport

This will backport the following commits from `main` to `9.0`:
- [SKA: Unify `serverless` modules + storybook config
(#211570)](https://github.com/elastic/kibana/pull/211570)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-02-19T08:10:35Z","message":"SKA:
Unify `serverless` modules + storybook config (#211570)\n\n##
Summary\r\n\r\nAs part of the SKA, some groups of modules have been
broken-down and\r\nrelocated in different folders, negatively impacting
DX. This is the\r\ncase for `serverless` modules, that are spread
across:\r\n```\r\n- packages/serverless # storybook config\r\n-
src/platform/packages/private/serverless\r\n-
src/platform/packages/shared/serverless\r\n```\r\n\r\nThe goal of this
PR is to unify them back
under\r\n`src/platform/packages/shared/severless`.\r\nIn this scenario,
I believe the simplification is worth the trade off.\r\n\r\nCC
@elastic/kibana-management @elastic/appex-sharedux
WDYT?\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"8f7f6a7a81dd25d529b1d87c882f49afbe7bdf99","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Kibana
Management","release_note:skip","v9.0.0","Team:SharedUX","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"SKA:
Unify `serverless` modules + storybook
config","number":211570,"url":"https://github.com/elastic/kibana/pull/211570","mergeCommit":{"message":"SKA:
Unify `serverless` modules + storybook config (#211570)\n\n##
Summary\r\n\r\nAs part of the SKA, some groups of modules have been
broken-down and\r\nrelocated in different folders, negatively impacting
DX. This is the\r\ncase for `serverless` modules, that are spread
across:\r\n```\r\n- packages/serverless # storybook config\r\n-
src/platform/packages/private/serverless\r\n-
src/platform/packages/shared/serverless\r\n```\r\n\r\nThe goal of this
PR is to unify them back
under\r\n`src/platform/packages/shared/severless`.\r\nIn this scenario,
I believe the simplification is worth the trade off.\r\n\r\nCC
@elastic/kibana-management @elastic/appex-sharedux
WDYT?\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"8f7f6a7a81dd25d529b1d87c882f49afbe7bdf99"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211570","number":211570,"mergeCommit":{"message":"SKA:
Unify `serverless` modules + storybook config (#211570)\n\n##
Summary\r\n\r\nAs part of the SKA, some groups of modules have been
broken-down and\r\nrelocated in different folders, negatively impacting
DX. This is the\r\ncase for `serverless` modules, that are spread
across:\r\n```\r\n- packages/serverless # storybook config\r\n-
src/platform/packages/private/serverless\r\n-
src/platform/packages/shared/serverless\r\n```\r\n\r\nThe goal of this
PR is to unify them back
under\r\n`src/platform/packages/shared/severless`.\r\nIn this scenario,
I believe the simplification is worth the trade off.\r\n\r\nCC
@elastic/kibana-management @elastic/appex-sharedux
WDYT?\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"8f7f6a7a81dd25d529b1d87c882f49afbe7bdf99"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-02-19 11:29:13 +01:00
Kibana Machine
b064e1f5db
[9.0] fix: add REACT_18 env variable to kbn-plugin-helpers bazel config (#211121) (#211617)
# Backport

This will backport the following commits from `main` to `9.0`:
- [fix: add REACT_18 env variable to kbn-plugin-helpers bazel config
(#211121)](https://github.com/elastic/kibana/pull/211121)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Rafael
Lüder","email":"rlueder@pm.me"},"sourceCommit":{"committedDate":"2025-02-18T16:37:57Z","message":"fix:
add REACT_18 env variable to kbn-plugin-helpers bazel config
(#211121)\n\n## Summary\r\n\r\nAdds `REACT_18` to `kbn-plugin-helpers`
bazel config, this fixes an\r\nissue when trying to create plugins using
the automatic plugin\r\ngenerator. For context
see\r\nhttps://github.com/elastic/kibana/pull/210917#issuecomment-2657805726\r\n\r\nRelated
user report: [Custom
Plugin\r\nError](https://discuss.elastic.co/t/custom-plugin-error/366589)\r\n\r\nBefore
fix:\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/e7e9e524-719e-4fdb-8598-050ec9f2f036)\r\n\r\n\r\nAfter
fix:\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/63d69d1a-bfc8-4be6-83a0-1c567be4d101)\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\nCo-authored-by:
Jon
<jon@elastic.co>","sha":"9a6a349a466d4c21bd8d94b7be67996c102dbd5b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","backport:prev-minor","v8.18.0","v9.1.0"],"title":"fix:
add REACT_18 env variable to kbn-plugin-helpers bazel
config","number":211121,"url":"https://github.com/elastic/kibana/pull/211121","mergeCommit":{"message":"fix:
add REACT_18 env variable to kbn-plugin-helpers bazel config
(#211121)\n\n## Summary\r\n\r\nAdds `REACT_18` to `kbn-plugin-helpers`
bazel config, this fixes an\r\nissue when trying to create plugins using
the automatic plugin\r\ngenerator. For context
see\r\nhttps://github.com/elastic/kibana/pull/210917#issuecomment-2657805726\r\n\r\nRelated
user report: [Custom
Plugin\r\nError](https://discuss.elastic.co/t/custom-plugin-error/366589)\r\n\r\nBefore
fix:\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/e7e9e524-719e-4fdb-8598-050ec9f2f036)\r\n\r\n\r\nAfter
fix:\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/63d69d1a-bfc8-4be6-83a0-1c567be4d101)\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\nCo-authored-by:
Jon
<jon@elastic.co>","sha":"9a6a349a466d4c21bd8d94b7be67996c102dbd5b"}},"sourceBranch":"main","suggestedTargetBranches":["8.18"],"targetPullRequestStates":[{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211121","number":211121,"mergeCommit":{"message":"fix:
add REACT_18 env variable to kbn-plugin-helpers bazel config
(#211121)\n\n## Summary\r\n\r\nAdds `REACT_18` to `kbn-plugin-helpers`
bazel config, this fixes an\r\nissue when trying to create plugins using
the automatic plugin\r\ngenerator. For context
see\r\nhttps://github.com/elastic/kibana/pull/210917#issuecomment-2657805726\r\n\r\nRelated
user report: [Custom
Plugin\r\nError](https://discuss.elastic.co/t/custom-plugin-error/366589)\r\n\r\nBefore
fix:\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/e7e9e524-719e-4fdb-8598-050ec9f2f036)\r\n\r\n\r\nAfter
fix:\r\n\r\n\r\n![image](https://github.com/user-attachments/assets/63d69d1a-bfc8-4be6-83a0-1c567be4d101)\r\n\r\n\r\n###
Checklist\r\n\r\nCheck the PR satisfies following conditions.
\r\n\r\nReviewers should verify this PR satisfies this list as
well.\r\n\r\n- [ ] Any text added follows [EUI's
writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing),
uses\r\nsentence case text and includes
[i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)\r\n-
[
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [ ] [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- [ ] If a plugin
configuration key changed, check if it needs to be\r\nallowlisted in the
cloud and added to the
[docker\r\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)\r\n-
[ ] This was checked for breaking HTTP API changes, and any
breaking\r\nchanges have been approved by the breaking-change committee.
The\r\n`release_note:breaking` label should be applied in these
situations.\r\n- [ ] [Flaky
Test\r\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1)
was\r\nused on any tests changed\r\n- [ ] The PR description includes
the appropriate Release Notes section,\r\nand the correct
`release_note:*` label is applied per
the\r\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\r\n\r\nCo-authored-by:
Jon
<jon@elastic.co>","sha":"9a6a349a466d4c21bd8d94b7be67996c102dbd5b"}}]}]
BACKPORT-->

Co-authored-by: Rafael Lüder <rlueder@pm.me>
Co-authored-by: Jon <jon@elastic.co>
2025-02-19 01:43:49 +01:00
Kibana Machine
78c3965681
[9.0] [kbn-scout][maps] waitForRenderComplete (#211265) (#211446)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[kbn-scout][maps] waitForRenderComplete
(#211265)](https://github.com/elastic/kibana/pull/211265)

<!--- Backport version: 9.6.5 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2025-02-17T13:46:44Z","message":"[kbn-scout][maps]
waitForRenderComplete (#211265)\n\n## Summary\n\nThis PR add a method to
wait for map to be loaded to replace
generic\n`renderable.waitForRender()`.\n\nWhile investigating the recent
test failure on CI I found out that for\nmaps case we can simplify the
logic with few facts:\n- before start waiting for render to complete, we
need to wait for main\ncontainer `#maps-plugin` to be in DOM. It takes
2-3 seconds.\n- there is always a single div block with
`data-render-complete`\nattribute, and there is a comment in source code
stating `See if the\n\"data-render-complete\" attribute is \"true\". If
so we're done!` which\nmeans we can simply wait
for\n`div[data-dom-id][data-render-complete=\"true\"]`\n\n\n6de2ef0e6d/x-pack/platform/plugins/shared/maps/public/connected_components/map_container/map_container.tsx (L103-L116)\n\n`renderable.waitForRender()`
is a good waiter, but probably for\ndashboard with multiple
panels.","sha":"08400b1f4225bcc20b3c28262432ba269e117750","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[kbn-scout][maps]
waitForRenderComplete","number":211265,"url":"https://github.com/elastic/kibana/pull/211265","mergeCommit":{"message":"[kbn-scout][maps]
waitForRenderComplete (#211265)\n\n## Summary\n\nThis PR add a method to
wait for map to be loaded to replace
generic\n`renderable.waitForRender()`.\n\nWhile investigating the recent
test failure on CI I found out that for\nmaps case we can simplify the
logic with few facts:\n- before start waiting for render to complete, we
need to wait for main\ncontainer `#maps-plugin` to be in DOM. It takes
2-3 seconds.\n- there is always a single div block with
`data-render-complete`\nattribute, and there is a comment in source code
stating `See if the\n\"data-render-complete\" attribute is \"true\". If
so we're done!` which\nmeans we can simply wait
for\n`div[data-dom-id][data-render-complete=\"true\"]`\n\n\n6de2ef0e6d/x-pack/platform/plugins/shared/maps/public/connected_components/map_container/map_container.tsx (L103-L116)\n\n`renderable.waitForRender()`
is a good waiter, but probably for\ndashboard with multiple
panels.","sha":"08400b1f4225bcc20b3c28262432ba269e117750"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211265","number":211265,"mergeCommit":{"message":"[kbn-scout][maps]
waitForRenderComplete (#211265)\n\n## Summary\n\nThis PR add a method to
wait for map to be loaded to replace
generic\n`renderable.waitForRender()`.\n\nWhile investigating the recent
test failure on CI I found out that for\nmaps case we can simplify the
logic with few facts:\n- before start waiting for render to complete, we
need to wait for main\ncontainer `#maps-plugin` to be in DOM. It takes
2-3 seconds.\n- there is always a single div block with
`data-render-complete`\nattribute, and there is a comment in source code
stating `See if the\n\"data-render-complete\" attribute is \"true\". If
so we're done!` which\nmeans we can simply wait
for\n`div[data-dom-id][data-render-complete=\"true\"]`\n\n\n6de2ef0e6d/x-pack/platform/plugins/shared/maps/public/connected_components/map_container/map_container.tsx (L103-L116)\n\n`renderable.waitForRender()`
is a good waiter, but probably for\ndashboard with multiple
panels.","sha":"08400b1f4225bcc20b3c28262432ba269e117750"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-02-17 16:26:48 +01:00
Kibana Machine
5b6ff1cd6e
[9.0] [kbn-scout] Add Synthtrace as a fixture (#210505) (#211351)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[kbn-scout] Add Synthtrace as a fixture
(#210505)](https://github.com/elastic/kibana/pull/210505)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-02-14T18:52:22Z","message":"[kbn-scout]
Add Synthtrace as a fixture (#210505)\n\n## Summary\n\nCloses
#210340\n\nThis PR adds synthtrace clients to scout as a test fixture,
so you can\nuse it in your test to generate data.\n\nThe clients added
were `apmSynthtraceEsClient`,\n`infraSynthtraceEsClient` and
`otelSynthtraceEsClient`.\n\n## How to use them in parallel tests\n\nAs
`synthtrace` ingests data into our indices, and sequential runs
would\nbe the perfect way to introduce flakiness in our tests, there is
a\nbetter way to ingest data, using a hook, at the setup phase
with\n`globalSetup`.\nWe need to create a `global_setup.ts` file and
link it into our\nplaywright config.\nThen we can use something
like\n```\nasync function globalSetup(config: FullConfig) {\n const data
= {\n apm: [\n opbeans({\n from: new Date(start).getTime(),\n to: new
Date(end).getTime(),\n }),\n ],\n infra: [\n generateHosts({\n from: new
Date(start).toISOString(),\n to: new Date(end).toISOString(),\n }),\n
],\n otel: [\n sendotlp({\n from: new Date(start).getTime(),\n to: new
Date(end).getTime(),\n }),\n ],\n };\n\n return
ingestSynthtraceDataHook(config, data);\n}\n```\nEach key (apm, infra,
otel) accepts an array of generators.\n\n## How to use them in
sequential tests\n> [!WARNING] \n> This should not be the standard
behaviour, we should embrace\nparallelism and use sequential testing
when there is no other way.\n\n### apmSynthtraceEsClient\n```ts\n
test.before(\n async ({ apmSynthtraceEsClient }) => {\n await
apmSynthtraceEsClient.index(\n opbeans({\n from: new
Date(start).getTime(),\n to: new Date(end).getTime(),\n })\n );\n }\n
);\n```\n[opbeans\nfile](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/fixtures/synthtrace/opbeans.ts)\nused
in the example.\n\n### otelSynthtraceEsClient\n```ts\n test.before(\n
async ({otelSynthtraceEsClient }) => {\n await
otelSynthtraceEsClient.index(\n sendotlp({\n from: new
Date(start).getTime(),\n to: new Date(end).getTime(),\n })\n );\n }\n
);\n```\n[sendotlp\nfile](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/fixtures/synthtrace/sendotlp.ts)\nwhich
will create the data.\n\n### infraSynthtraceEsClient\n```ts\n
test.before(\n async ({ infraSynthtraceEsClient }) => {\n await
infraSynthtraceEsClient.index(\n generateHosts({\n from: new
Date(start).toISOString(),\n to: new Date(end).toISOString(),\n })\n
);\n }\n
);\n```\n[generateHosts\nfile](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/inventory/e2e/cypress/e2e/alert_count/generate_data.ts#L82)\nused
to generate data.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e21c5d0e9175ffd1bea0ad78ffe26cb973cc489f","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","apm:synthtrace","Team:obs-ux-infra_services","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[kbn-scout]
Add Synthtrace as a
fixture","number":210505,"url":"https://github.com/elastic/kibana/pull/210505","mergeCommit":{"message":"[kbn-scout]
Add Synthtrace as a fixture (#210505)\n\n## Summary\n\nCloses
#210340\n\nThis PR adds synthtrace clients to scout as a test fixture,
so you can\nuse it in your test to generate data.\n\nThe clients added
were `apmSynthtraceEsClient`,\n`infraSynthtraceEsClient` and
`otelSynthtraceEsClient`.\n\n## How to use them in parallel tests\n\nAs
`synthtrace` ingests data into our indices, and sequential runs
would\nbe the perfect way to introduce flakiness in our tests, there is
a\nbetter way to ingest data, using a hook, at the setup phase
with\n`globalSetup`.\nWe need to create a `global_setup.ts` file and
link it into our\nplaywright config.\nThen we can use something
like\n```\nasync function globalSetup(config: FullConfig) {\n const data
= {\n apm: [\n opbeans({\n from: new Date(start).getTime(),\n to: new
Date(end).getTime(),\n }),\n ],\n infra: [\n generateHosts({\n from: new
Date(start).toISOString(),\n to: new Date(end).toISOString(),\n }),\n
],\n otel: [\n sendotlp({\n from: new Date(start).getTime(),\n to: new
Date(end).getTime(),\n }),\n ],\n };\n\n return
ingestSynthtraceDataHook(config, data);\n}\n```\nEach key (apm, infra,
otel) accepts an array of generators.\n\n## How to use them in
sequential tests\n> [!WARNING] \n> This should not be the standard
behaviour, we should embrace\nparallelism and use sequential testing
when there is no other way.\n\n### apmSynthtraceEsClient\n```ts\n
test.before(\n async ({ apmSynthtraceEsClient }) => {\n await
apmSynthtraceEsClient.index(\n opbeans({\n from: new
Date(start).getTime(),\n to: new Date(end).getTime(),\n })\n );\n }\n
);\n```\n[opbeans\nfile](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/fixtures/synthtrace/opbeans.ts)\nused
in the example.\n\n### otelSynthtraceEsClient\n```ts\n test.before(\n
async ({otelSynthtraceEsClient }) => {\n await
otelSynthtraceEsClient.index(\n sendotlp({\n from: new
Date(start).getTime(),\n to: new Date(end).getTime(),\n })\n );\n }\n
);\n```\n[sendotlp\nfile](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/fixtures/synthtrace/sendotlp.ts)\nwhich
will create the data.\n\n### infraSynthtraceEsClient\n```ts\n
test.before(\n async ({ infraSynthtraceEsClient }) => {\n await
infraSynthtraceEsClient.index(\n generateHosts({\n from: new
Date(start).toISOString(),\n to: new Date(end).toISOString(),\n })\n
);\n }\n
);\n```\n[generateHosts\nfile](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/inventory/e2e/cypress/e2e/alert_count/generate_data.ts#L82)\nused
to generate data.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e21c5d0e9175ffd1bea0ad78ffe26cb973cc489f"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210505","number":210505,"mergeCommit":{"message":"[kbn-scout]
Add Synthtrace as a fixture (#210505)\n\n## Summary\n\nCloses
#210340\n\nThis PR adds synthtrace clients to scout as a test fixture,
so you can\nuse it in your test to generate data.\n\nThe clients added
were `apmSynthtraceEsClient`,\n`infraSynthtraceEsClient` and
`otelSynthtraceEsClient`.\n\n## How to use them in parallel tests\n\nAs
`synthtrace` ingests data into our indices, and sequential runs
would\nbe the perfect way to introduce flakiness in our tests, there is
a\nbetter way to ingest data, using a hook, at the setup phase
with\n`globalSetup`.\nWe need to create a `global_setup.ts` file and
link it into our\nplaywright config.\nThen we can use something
like\n```\nasync function globalSetup(config: FullConfig) {\n const data
= {\n apm: [\n opbeans({\n from: new Date(start).getTime(),\n to: new
Date(end).getTime(),\n }),\n ],\n infra: [\n generateHosts({\n from: new
Date(start).toISOString(),\n to: new Date(end).toISOString(),\n }),\n
],\n otel: [\n sendotlp({\n from: new Date(start).getTime(),\n to: new
Date(end).getTime(),\n }),\n ],\n };\n\n return
ingestSynthtraceDataHook(config, data);\n}\n```\nEach key (apm, infra,
otel) accepts an array of generators.\n\n## How to use them in
sequential tests\n> [!WARNING] \n> This should not be the standard
behaviour, we should embrace\nparallelism and use sequential testing
when there is no other way.\n\n### apmSynthtraceEsClient\n```ts\n
test.before(\n async ({ apmSynthtraceEsClient }) => {\n await
apmSynthtraceEsClient.index(\n opbeans({\n from: new
Date(start).getTime(),\n to: new Date(end).getTime(),\n })\n );\n }\n
);\n```\n[opbeans\nfile](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/fixtures/synthtrace/opbeans.ts)\nused
in the example.\n\n### otelSynthtraceEsClient\n```ts\n test.before(\n
async ({otelSynthtraceEsClient }) => {\n await
otelSynthtraceEsClient.index(\n sendotlp({\n from: new
Date(start).getTime(),\n to: new Date(end).getTime(),\n })\n );\n }\n
);\n```\n[sendotlp\nfile](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/apm/ftr_e2e/cypress/fixtures/synthtrace/sendotlp.ts)\nwhich
will create the data.\n\n### infraSynthtraceEsClient\n```ts\n
test.before(\n async ({ infraSynthtraceEsClient }) => {\n await
infraSynthtraceEsClient.index(\n generateHosts({\n from: new
Date(start).toISOString(),\n to: new Date(end).toISOString(),\n })\n
);\n }\n
);\n```\n[generateHosts\nfile](https://github.com/elastic/kibana/blob/main/x-pack/solutions/observability/plugins/inventory/e2e/cypress/e2e/alert_count/generate_data.ts#L82)\nused
to generate data.\n\n---------\n\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"e21c5d0e9175ffd1bea0ad78ffe26cb973cc489f"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
2025-02-15 14:22:16 +01:00
Karen Grigoryan
267f57d063
[9.0] [Security Solution][Explore] Migrate from styled-components in shared (#210311) (#211221)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Solution][Explore] Migrate from styled-components in shared
(#210311)](https://github.com/elastic/kibana/pull/210311)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Karen
Grigoryan","email":"karen.grigoryan@elastic.co"},"sourceCommit":{"committedDate":"2025-02-13T16:14:34Z","message":"[Security
Solution][Explore] Migrate from styled-components in shared
(#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with
@emotion/react and @emotion/styled\r\nacross multiple components\r\n-
Remove `@kbn/ui-theme` instances\r\n- Update test cases to use
@emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n-
Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused
imports and updated
snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting","Team:Threat Hunting:Explore","backport:version","v8.18.0","EUI
Visual Refresh","v9.1.0","v8.19.0"],"title":"[Security
Solution][Explore] Migrate from styled-components in
shared","number":210311,"url":"https://github.com/elastic/kibana/pull/210311","mergeCommit":{"message":"[Security
Solution][Explore] Migrate from styled-components in shared
(#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with
@emotion/react and @emotion/styled\r\nacross multiple components\r\n-
Remove `@kbn/ui-theme` instances\r\n- Update test cases to use
@emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n-
Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused
imports and updated
snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210311","number":210311,"mergeCommit":{"message":"[Security
Solution][Explore] Migrate from styled-components in shared
(#210311)\n\nAddresses #206436\r\n\r\n- Replace styled-components with
@emotion/react and @emotion/styled\r\nacross multiple components\r\n-
Remove `@kbn/ui-theme` instances\r\n- Update test cases to use
@emotion/jest matchers for toHaveStyleRule to\r\nwork properly\r\n-
Adjust styles to use `css` from `@emotion/react`\r\n- Remove unused
imports and updated
snapshots\r\n\r\n\r\nhttps://github.com/user-attachments/assets/48b9ab41-23fd-4c00-ace9-c0cbe58c91f7","sha":"4b4c5ce491aa6539867c3de789ff604880a7fc2e"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-02-14 18:23:10 +01:00
Kibana Machine
df2fdc10fb
[9.0] [scout] enable authc debug logs for ES (#211055) (#211193)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[scout] enable authc debug logs for ES
(#211055)](https://github.com/elastic/kibana/pull/211055)

<!--- Backport version: 9.4.3 -->

### 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":"2025-02-14T10:20:25Z","message":"[scout]
enable authc debug logs for ES (#211055)\n\n##
Summary\r\n\r\nTemporarily enabling ES authc debug logging to get more
details for 401\r\nSAML callback
response.","sha":"4f0eafc7c38e441ffa35cf822b042288d35d9ebe","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout]
enable authc debug logs for
ES","number":211055,"url":"https://github.com/elastic/kibana/pull/211055","mergeCommit":{"message":"[scout]
enable authc debug logs for ES (#211055)\n\n##
Summary\r\n\r\nTemporarily enabling ES authc debug logging to get more
details for 401\r\nSAML callback
response.","sha":"4f0eafc7c38e441ffa35cf822b042288d35d9ebe"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/211055","number":211055,"mergeCommit":{"message":"[scout]
enable authc debug logs for ES (#211055)\n\n##
Summary\r\n\r\nTemporarily enabling ES authc debug logging to get more
details for 401\r\nSAML callback
response.","sha":"4f0eafc7c38e441ffa35cf822b042288d35d9ebe"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-02-14 13:04:15 +01:00
Kibana Machine
c6ae8292a1
[9.0] [scout] enable eslint plugin playwright (#210666) (#211172)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[scout] enable eslint plugin playwright
(#210666)](https://github.com/elastic/kibana/pull/210666)

<!--- Backport version: 9.4.3 -->

### 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":"2025-02-14T09:21:49Z","message":"[scout]
enable eslint plugin playwright (#210666)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/21030\r\n\r\nIt was a quick
work to do while we don't have many tests yet. \r\n\r\nFor reviewers: we
most likely will review and update the rules to align\r\nbetter with
final test design for Scout before GA. I don't think we have\r\nto deep
dive into what rules are missing, but just to make sure I
didn't\r\nrestrict something important from your
perspective.\r\n\r\nRules are described
in\r\nhttps://github.com/playwright-community/eslint-plugin-playwright?tab=readme-ov-file#rules\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ddd0fdb4794b71f7c500f5d7d03a846bf21174b9","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout]
enable eslint plugin
playwright","number":210666,"url":"https://github.com/elastic/kibana/pull/210666","mergeCommit":{"message":"[scout]
enable eslint plugin playwright (#210666)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/21030\r\n\r\nIt was a quick
work to do while we don't have many tests yet. \r\n\r\nFor reviewers: we
most likely will review and update the rules to align\r\nbetter with
final test design for Scout before GA. I don't think we have\r\nto deep
dive into what rules are missing, but just to make sure I
didn't\r\nrestrict something important from your
perspective.\r\n\r\nRules are described
in\r\nhttps://github.com/playwright-community/eslint-plugin-playwright?tab=readme-ov-file#rules\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ddd0fdb4794b71f7c500f5d7d03a846bf21174b9"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210666","number":210666,"mergeCommit":{"message":"[scout]
enable eslint plugin playwright (#210666)\n\n## Summary\r\n\r\nCloses
https://github.com/elastic/kibana/issues/21030\r\n\r\nIt was a quick
work to do while we don't have many tests yet. \r\n\r\nFor reviewers: we
most likely will review and update the rules to align\r\nbetter with
final test design for Scout before GA. I don't think we have\r\nto deep
dive into what rules are missing, but just to make sure I
didn't\r\nrestrict something important from your
perspective.\r\n\r\nRules are described
in\r\nhttps://github.com/playwright-community/eslint-plugin-playwright?tab=readme-ov-file#rules\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"ddd0fdb4794b71f7c500f5d7d03a846bf21174b9"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-02-14 12:05:14 +01:00
Tiago Costa
b6d9b01c4f
[9.0] chore(NA): upgrade to webpack 5 (#191106) (#211145)
# Backport

This will backport the following commits from `main` to `9.0`:
- [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":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/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"}}]}]
BACKPORT-->
2025-02-14 05:15:49 +00:00
Kibana Machine
15acdfaf9c
[9.0] [ObsUX] Fix chart colors for observability overview apm and hosts charts (#210847) (#210989)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[ObsUX] Fix chart colors for observability overview apm and hosts
charts (#210847)](https://github.com/elastic/kibana/pull/210847)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Miriam","email":"31922082+MiriamAparicio@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-13T11:54:43Z","message":"[ObsUX]
Fix chart colors for observability overview apm and hosts charts
(#210847)\n\n## Summary\r\n\r\nFixed the colors for the observability
overview charts on APM and Hosts\r\n\r\nBEFORE\r\n\r\n<img
width=\"1685\"
alt=\"image\"\r\nsrc=\"2d8f8970-0938-4ccb-8679-533760fb3622)\r\n\r\n\r\n>
[!NOTE] \r\n> For some reason CPU chart on Hosts it's not showing, seems
a bug, but\r\nthat's out of the scope of this
issue\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3bf3dad7a01d6eefd34013833e6d8e6f0c3614a0","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","Team:obs-ux-infra_services","Team:obs-ux-management","v9.1.0"],"title":"[ObsUX]
Fix chart colors for observability overview apm and hosts
charts","number":210847,"url":"https://github.com/elastic/kibana/pull/210847","mergeCommit":{"message":"[ObsUX]
Fix chart colors for observability overview apm and hosts charts
(#210847)\n\n## Summary\r\n\r\nFixed the colors for the observability
overview charts on APM and Hosts\r\n\r\nBEFORE\r\n\r\n<img
width=\"1685\"
alt=\"image\"\r\nsrc=\"2d8f8970-0938-4ccb-8679-533760fb3622)\r\n\r\n\r\n>
[!NOTE] \r\n> For some reason CPU chart on Hosts it's not showing, seems
a bug, but\r\nthat's out of the scope of this
issue\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3bf3dad7a01d6eefd34013833e6d8e6f0c3614a0"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210847","number":210847,"mergeCommit":{"message":"[ObsUX]
Fix chart colors for observability overview apm and hosts charts
(#210847)\n\n## Summary\r\n\r\nFixed the colors for the observability
overview charts on APM and Hosts\r\n\r\nBEFORE\r\n\r\n<img
width=\"1685\"
alt=\"image\"\r\nsrc=\"2d8f8970-0938-4ccb-8679-533760fb3622)\r\n\r\n\r\n>
[!NOTE] \r\n> For some reason CPU chart on Hosts it's not showing, seems
a bug, but\r\nthat's out of the scope of this
issue\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"3bf3dad7a01d6eefd34013833e6d8e6f0c3614a0"}}]}]
BACKPORT-->

Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
2025-02-13 15:05:07 +01:00
Karen Grigoryan
7dbbbc74d1
[9.0] [Security Solution] [EUI Refresh] styled component migration Dashboards (#208731) (#210886)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Security Solution] [EUI Refresh] styled component migration
Dashboards (#208731)](https://github.com/elastic/kibana/pull/208731)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Agustina Nahir
Ruidiaz","email":"61565784+agusruidiazgd@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-12T15:05:27Z","message":"[Security
Solution] [EUI Refresh] styled component migration Dashboards
(#208731)\n\n## Summary\r\n\r\nAddresses
https://github.com/elastic/kibana/issues/206439\r\nThis PR migrates
explore page from styled-components to @emotion/styled.\r\nIn the
process I also convert the kbn/ui-theme json tokens to
euiTheme\r\ncounterparts.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/6cdfbf15-9a77-488c-a0b9-42acc3fe1768\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Karen Grigoryan
<karen.grigoryan@elastic.co>","sha":"f92e50a4a1d9bdea781d1e0fb45b4f8560a27ab5","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Threat
Hunting:Explore","ci:cloud-deploy","backport:version","v8.18.0","EUI
Visual Refresh","v9.1.0","v8.19.0"],"title":"[Security Solution] [EUI
Refresh] styled component migration
Dashboards","number":208731,"url":"https://github.com/elastic/kibana/pull/208731","mergeCommit":{"message":"[Security
Solution] [EUI Refresh] styled component migration Dashboards
(#208731)\n\n## Summary\r\n\r\nAddresses
https://github.com/elastic/kibana/issues/206439\r\nThis PR migrates
explore page from styled-components to @emotion/styled.\r\nIn the
process I also convert the kbn/ui-theme json tokens to
euiTheme\r\ncounterparts.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/6cdfbf15-9a77-488c-a0b9-42acc3fe1768\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Karen Grigoryan
<karen.grigoryan@elastic.co>","sha":"f92e50a4a1d9bdea781d1e0fb45b4f8560a27ab5"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208731","number":208731,"mergeCommit":{"message":"[Security
Solution] [EUI Refresh] styled component migration Dashboards
(#208731)\n\n## Summary\r\n\r\nAddresses
https://github.com/elastic/kibana/issues/206439\r\nThis PR migrates
explore page from styled-components to @emotion/styled.\r\nIn the
process I also convert the kbn/ui-theme json tokens to
euiTheme\r\ncounterparts.\r\n\r\n\r\nhttps://github.com/user-attachments/assets/6cdfbf15-9a77-488c-a0b9-42acc3fe1768\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Karen Grigoryan
<karen.grigoryan@elastic.co>","sha":"f92e50a4a1d9bdea781d1e0fb45b4f8560a27ab5"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Agustina Nahir Ruidiaz <61565784+agusruidiazgd@users.noreply.github.com>
2025-02-13 12:52:37 +01:00
Kibana Machine
187b230722
[9.0] [scout] adding test helper &#x60;@kbn/scout-oblt&#x60; package and uptate onboarding tests (#209761) (#210675)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[scout] adding test helper &#x60;@kbn/scout-oblt&#x60; package and
uptate onboarding tests
(#209761)](https://github.com/elastic/kibana/pull/209761)

<!--- Backport version: 9.4.3 -->

### 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":"2025-02-11T17:38:41Z","message":"[scout]
adding test helper `@kbn/scout-oblt` package and uptate onboarding tests
(#209761)\n\n## Summary\r\n\r\n`@kbn/scout-oblt` is a test library that
extends `@kbn/scout` with test\r\nhelpers specifically designed to test
`Observability` applications in\r\nKibana. All Oblt plugins should only
import from `@kbn/scout-oblt`\r\n\r\nIts primary goal is to simplify the
test development experience for\r\nteams working on `Observability`
plugins by providing custom Playwright\r\nfixtures, page objects, and
utilities tailored for Observability-related\r\ntesting
scenarios.\r\n\r\nContributing:\r\n- when Fixture/Page Object is
sharable across all Solutions and Platform\r\n(`fleetApi` fixture), it
should be added in `@kbn/scout`\r\n- when Fixture/Page Object is
Oblt-specific but is shared across tests\r\nunder the multiple plugins
(`OnboardingHome` page), it should be added\r\nin `@kbn/scout-oblt`\r\n-
when Fixture/Page Object is only used in a single plugin
(`onboarding`\r\ninternal APIs ?), it should be added in this
plugin.\r\n\r\nI also re-worked existing tests with few ideas in
mind:\r\n- Scout is **e2e testing tool** and should target primary e2e
test\r\nscenarios; We have _API integration tests_ to test multiple
short\r\nscenarios for APIs behavior (response, status code) and
_jest/React\r\ntesting library_ to test components in isolation
(elements rendering,\r\nfields validation). Doing all the testing with
e2e tool like Playwright\r\nwill dramatically affect cost efficiency and
stability of tests, but\r\nalso slows overall CI execution and PRs
delivery. The goal is to follow\r\ntesting pyramid and keep in mind its
principles.\r\n- We on purpose spin up new browser context for each
`test` block to\r\nmake sure our **tests are independent**. Having too
many short `test`\r\nblocks in the file significantly slows down the
execution: every block\r\ntriggers browser context, saml authentication,
adding/removing Fleet\r\nintegrations (each call up to 2 seconds) and
other beforeEach/afterEach\r\nhooks. Real browser-based testing is
expensive. It is not about putting\r\nevery step into 1 `test` block,
but also not a Jest unit-test-style\r\ndesign. When it is possible to
group similar actions on the same page\r\nand if it is a part of the
same user flow - we should do it. It also\r\ndoesn't bring the testing
value repeating the same UI steps multiple\r\ntimes in different
scenarios. _Our CI costs are critical to cut when it\r\nis
possible_\r\n- Avoid **nesting describe** blocks: it complicates test
readability and\r\nalso complicates for CI bot to properly skip the
failing block (it will\r\nskip the top level one). We encourage **Scout
parallel test execution**\r\nbased on running test spec files in
multiple workers, not the `test`\r\nblocks within the same file. Having
too many `test` blocks in the same\r\nfile will be slowly run in the
single thread and in case of flakiness,\r\nit means Team lose more test
coverage than they probably expect.\r\n\r\nBefore (**59** test blocks -
**8-8.5 min** per distro):\r\n<img width=\"1709\" alt=\"Screenshot
2025-02-08 at 18 01
40\"\r\nsrc=\"https://github.com/user-attachments/assets/5fd65a1c-85f9-4594-9dae-3f8e99a005ab\"\r\n/>\r\n\r\nAfter
(**15** test blocks - **3.5-4 min** per distro):\r\n<img width=\"1578\"
alt=\"Screenshot 2025-02-10 at 18 14
42\"\r\nsrc=\"https://github.com/user-attachments/assets/6846898f-7dd2-4f6b-8bc5-d06741b0b120\"\r\n/>\r\n\r\nFor
reviewers: updated tests are possible to run in 2 parallel
workers\r\nagainst the same Kibana/ES instance and run time is dropping
to **2.5-3\r\nmin** 🚀 . It is up to UX-Logs team to decide if you want
to keep\r\nparallel run (new tests can be added either to parallel or
sequential\r\nrun)\r\n<img width=\"1578\" alt=\"Screenshot 2025-02-11 at
12 14
30\"\r\nsrc=\"https://github.com/user-attachments/assets/e94113f2-d7f1-470e-a6d5-cb5154d99c41\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"bd13e829498032c07bf8490f770a563f34e9f856","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","test:scout","v9.1.0","v8.19.0"],"title":"[scout]
adding test helper `@kbn/scout-oblt` package and uptate onboarding
tests","number":209761,"url":"https://github.com/elastic/kibana/pull/209761","mergeCommit":{"message":"[scout]
adding test helper `@kbn/scout-oblt` package and uptate onboarding tests
(#209761)\n\n## Summary\r\n\r\n`@kbn/scout-oblt` is a test library that
extends `@kbn/scout` with test\r\nhelpers specifically designed to test
`Observability` applications in\r\nKibana. All Oblt plugins should only
import from `@kbn/scout-oblt`\r\n\r\nIts primary goal is to simplify the
test development experience for\r\nteams working on `Observability`
plugins by providing custom Playwright\r\nfixtures, page objects, and
utilities tailored for Observability-related\r\ntesting
scenarios.\r\n\r\nContributing:\r\n- when Fixture/Page Object is
sharable across all Solutions and Platform\r\n(`fleetApi` fixture), it
should be added in `@kbn/scout`\r\n- when Fixture/Page Object is
Oblt-specific but is shared across tests\r\nunder the multiple plugins
(`OnboardingHome` page), it should be added\r\nin `@kbn/scout-oblt`\r\n-
when Fixture/Page Object is only used in a single plugin
(`onboarding`\r\ninternal APIs ?), it should be added in this
plugin.\r\n\r\nI also re-worked existing tests with few ideas in
mind:\r\n- Scout is **e2e testing tool** and should target primary e2e
test\r\nscenarios; We have _API integration tests_ to test multiple
short\r\nscenarios for APIs behavior (response, status code) and
_jest/React\r\ntesting library_ to test components in isolation
(elements rendering,\r\nfields validation). Doing all the testing with
e2e tool like Playwright\r\nwill dramatically affect cost efficiency and
stability of tests, but\r\nalso slows overall CI execution and PRs
delivery. The goal is to follow\r\ntesting pyramid and keep in mind its
principles.\r\n- We on purpose spin up new browser context for each
`test` block to\r\nmake sure our **tests are independent**. Having too
many short `test`\r\nblocks in the file significantly slows down the
execution: every block\r\ntriggers browser context, saml authentication,
adding/removing Fleet\r\nintegrations (each call up to 2 seconds) and
other beforeEach/afterEach\r\nhooks. Real browser-based testing is
expensive. It is not about putting\r\nevery step into 1 `test` block,
but also not a Jest unit-test-style\r\ndesign. When it is possible to
group similar actions on the same page\r\nand if it is a part of the
same user flow - we should do it. It also\r\ndoesn't bring the testing
value repeating the same UI steps multiple\r\ntimes in different
scenarios. _Our CI costs are critical to cut when it\r\nis
possible_\r\n- Avoid **nesting describe** blocks: it complicates test
readability and\r\nalso complicates for CI bot to properly skip the
failing block (it will\r\nskip the top level one). We encourage **Scout
parallel test execution**\r\nbased on running test spec files in
multiple workers, not the `test`\r\nblocks within the same file. Having
too many `test` blocks in the same\r\nfile will be slowly run in the
single thread and in case of flakiness,\r\nit means Team lose more test
coverage than they probably expect.\r\n\r\nBefore (**59** test blocks -
**8-8.5 min** per distro):\r\n<img width=\"1709\" alt=\"Screenshot
2025-02-08 at 18 01
40\"\r\nsrc=\"https://github.com/user-attachments/assets/5fd65a1c-85f9-4594-9dae-3f8e99a005ab\"\r\n/>\r\n\r\nAfter
(**15** test blocks - **3.5-4 min** per distro):\r\n<img width=\"1578\"
alt=\"Screenshot 2025-02-10 at 18 14
42\"\r\nsrc=\"https://github.com/user-attachments/assets/6846898f-7dd2-4f6b-8bc5-d06741b0b120\"\r\n/>\r\n\r\nFor
reviewers: updated tests are possible to run in 2 parallel
workers\r\nagainst the same Kibana/ES instance and run time is dropping
to **2.5-3\r\nmin** 🚀 . It is up to UX-Logs team to decide if you want
to keep\r\nparallel run (new tests can be added either to parallel or
sequential\r\nrun)\r\n<img width=\"1578\" alt=\"Screenshot 2025-02-11 at
12 14
30\"\r\nsrc=\"https://github.com/user-attachments/assets/e94113f2-d7f1-470e-a6d5-cb5154d99c41\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"bd13e829498032c07bf8490f770a563f34e9f856"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.x"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209761","number":209761,"mergeCommit":{"message":"[scout]
adding test helper `@kbn/scout-oblt` package and uptate onboarding tests
(#209761)\n\n## Summary\r\n\r\n`@kbn/scout-oblt` is a test library that
extends `@kbn/scout` with test\r\nhelpers specifically designed to test
`Observability` applications in\r\nKibana. All Oblt plugins should only
import from `@kbn/scout-oblt`\r\n\r\nIts primary goal is to simplify the
test development experience for\r\nteams working on `Observability`
plugins by providing custom Playwright\r\nfixtures, page objects, and
utilities tailored for Observability-related\r\ntesting
scenarios.\r\n\r\nContributing:\r\n- when Fixture/Page Object is
sharable across all Solutions and Platform\r\n(`fleetApi` fixture), it
should be added in `@kbn/scout`\r\n- when Fixture/Page Object is
Oblt-specific but is shared across tests\r\nunder the multiple plugins
(`OnboardingHome` page), it should be added\r\nin `@kbn/scout-oblt`\r\n-
when Fixture/Page Object is only used in a single plugin
(`onboarding`\r\ninternal APIs ?), it should be added in this
plugin.\r\n\r\nI also re-worked existing tests with few ideas in
mind:\r\n- Scout is **e2e testing tool** and should target primary e2e
test\r\nscenarios; We have _API integration tests_ to test multiple
short\r\nscenarios for APIs behavior (response, status code) and
_jest/React\r\ntesting library_ to test components in isolation
(elements rendering,\r\nfields validation). Doing all the testing with
e2e tool like Playwright\r\nwill dramatically affect cost efficiency and
stability of tests, but\r\nalso slows overall CI execution and PRs
delivery. The goal is to follow\r\ntesting pyramid and keep in mind its
principles.\r\n- We on purpose spin up new browser context for each
`test` block to\r\nmake sure our **tests are independent**. Having too
many short `test`\r\nblocks in the file significantly slows down the
execution: every block\r\ntriggers browser context, saml authentication,
adding/removing Fleet\r\nintegrations (each call up to 2 seconds) and
other beforeEach/afterEach\r\nhooks. Real browser-based testing is
expensive. It is not about putting\r\nevery step into 1 `test` block,
but also not a Jest unit-test-style\r\ndesign. When it is possible to
group similar actions on the same page\r\nand if it is a part of the
same user flow - we should do it. It also\r\ndoesn't bring the testing
value repeating the same UI steps multiple\r\ntimes in different
scenarios. _Our CI costs are critical to cut when it\r\nis
possible_\r\n- Avoid **nesting describe** blocks: it complicates test
readability and\r\nalso complicates for CI bot to properly skip the
failing block (it will\r\nskip the top level one). We encourage **Scout
parallel test execution**\r\nbased on running test spec files in
multiple workers, not the `test`\r\nblocks within the same file. Having
too many `test` blocks in the same\r\nfile will be slowly run in the
single thread and in case of flakiness,\r\nit means Team lose more test
coverage than they probably expect.\r\n\r\nBefore (**59** test blocks -
**8-8.5 min** per distro):\r\n<img width=\"1709\" alt=\"Screenshot
2025-02-08 at 18 01
40\"\r\nsrc=\"https://github.com/user-attachments/assets/5fd65a1c-85f9-4594-9dae-3f8e99a005ab\"\r\n/>\r\n\r\nAfter
(**15** test blocks - **3.5-4 min** per distro):\r\n<img width=\"1578\"
alt=\"Screenshot 2025-02-10 at 18 14
42\"\r\nsrc=\"https://github.com/user-attachments/assets/6846898f-7dd2-4f6b-8bc5-d06741b0b120\"\r\n/>\r\n\r\nFor
reviewers: updated tests are possible to run in 2 parallel
workers\r\nagainst the same Kibana/ES instance and run time is dropping
to **2.5-3\r\nmin** 🚀 . It is up to UX-Logs team to decide if you want
to keep\r\nparallel run (new tests can be added either to parallel or
sequential\r\nrun)\r\n<img width=\"1578\" alt=\"Screenshot 2025-02-11 at
12 14
30\"\r\nsrc=\"https://github.com/user-attachments/assets/e94113f2-d7f1-470e-a6d5-cb5154d99c41\"\r\n/>\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"bd13e829498032c07bf8490f770a563f34e9f856"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-02-11 21:04:21 +01:00
Kibana Machine
4492d993a8
[9.0] [Authz] Migrated routes with access tags to security config (#209756) (#210597)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Authz] Migrated routes with access tags to security config
(#209756)](https://github.com/elastic/kibana/pull/209756)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Elena
Shostak","email":"165678770+elena-shostak@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-11T14:36:38Z","message":"[Authz]
Migrated routes with access tags to security config (#209756)\n\n##
Summary\r\n\r\nThis PR migrates the last routes with
`access:<privilege>` tags used in\r\nroute definitions to new security
configuration.\r\nPlease refer to the documentation for more
information:
[Authorization\r\nAPI](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)\r\n\r\n###
**Before Migration:**\r\nAccess control tags were defined in the
`options` object of the route:\r\n\r\n```ts\r\nrouter.get({\r\n path:
'/api/path',\r\n options: {\r\n tags: ['access:<privilege_1>',
'access:<privilege_2>'],\r\n },\r\n ...\r\n},
handler);\r\n```\r\n\r\n### **After Migration:**\r\nTags have been
replaced with the more robust\r\n`security.authz.requiredPrivileges`
field under `security`:\r\n\r\n```ts\r\nrouter.get({\r\n path:
'/api/path',\r\n security: {\r\n authz: {\r\n requiredPrivileges:
['<privilege_1>', '<privilege_2>'],\r\n },\r\n },\r\n ...\r\n},
handler);\r\n```\r\n\r\n### Checklist\r\n\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"ad0e1d9d9d5ffba3c0bd7839affe0e885c3f2f03","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Security","release_note:skip","Feature:Security/Authorization","backport:prev-minor","backport:version","Authz:
API migration","v9.1.0","v8.19.0"],"title":"[Authz] Migrated routes with
access tags to security
config","number":209756,"url":"https://github.com/elastic/kibana/pull/209756","mergeCommit":{"message":"[Authz]
Migrated routes with access tags to security config (#209756)\n\n##
Summary\r\n\r\nThis PR migrates the last routes with
`access:<privilege>` tags used in\r\nroute definitions to new security
configuration.\r\nPlease refer to the documentation for more
information:
[Authorization\r\nAPI](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)\r\n\r\n###
**Before Migration:**\r\nAccess control tags were defined in the
`options` object of the route:\r\n\r\n```ts\r\nrouter.get({\r\n path:
'/api/path',\r\n options: {\r\n tags: ['access:<privilege_1>',
'access:<privilege_2>'],\r\n },\r\n ...\r\n},
handler);\r\n```\r\n\r\n### **After Migration:**\r\nTags have been
replaced with the more robust\r\n`security.authz.requiredPrivileges`
field under `security`:\r\n\r\n```ts\r\nrouter.get({\r\n path:
'/api/path',\r\n security: {\r\n authz: {\r\n requiredPrivileges:
['<privilege_1>', '<privilege_2>'],\r\n },\r\n },\r\n ...\r\n},
handler);\r\n```\r\n\r\n### Checklist\r\n\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"ad0e1d9d9d5ffba3c0bd7839affe0e885c3f2f03"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209756","number":209756,"mergeCommit":{"message":"[Authz]
Migrated routes with access tags to security config (#209756)\n\n##
Summary\r\n\r\nThis PR migrates the last routes with
`access:<privilege>` tags used in\r\nroute definitions to new security
configuration.\r\nPlease refer to the documentation for more
information:
[Authorization\r\nAPI](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)\r\n\r\n###
**Before Migration:**\r\nAccess control tags were defined in the
`options` object of the route:\r\n\r\n```ts\r\nrouter.get({\r\n path:
'/api/path',\r\n options: {\r\n tags: ['access:<privilege_1>',
'access:<privilege_2>'],\r\n },\r\n ...\r\n},
handler);\r\n```\r\n\r\n### **After Migration:**\r\nTags have been
replaced with the more robust\r\n`security.authz.requiredPrivileges`
field under `security`:\r\n\r\n```ts\r\nrouter.get({\r\n path:
'/api/path',\r\n security: {\r\n authz: {\r\n requiredPrivileges:
['<privilege_1>', '<privilege_2>'],\r\n },\r\n },\r\n ...\r\n},
handler);\r\n```\r\n\r\n### Checklist\r\n\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"ad0e1d9d9d5ffba3c0bd7839affe0e885c3f2f03"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Elena Shostak <165678770+elena-shostak@users.noreply.github.com>
2025-02-11 17:34:19 +01:00
Gerard Soldevila
7ea503ff34
[9.0] SKA: Follow-up relocations (#209477) (#210499)
# Backport

This will backport the following commits from `main` to `9.0`:
- [SKA: Follow-up relocations
(#209477)](https://github.com/elastic/kibana/pull/209477)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Gerard
Soldevila","email":"gerard.soldevila@elastic.co"},"sourceCommit":{"committedDate":"2025-02-05T18:53:36Z","message":"SKA:
Follow-up relocations (#209477)\n\n## Summary\r\n\r\n* Categorise and
move `@kbn/timelines-plugin` as _platform/shared_,\r\ntarget location:
`x-pack/platform/plugins/shared/timelines`.\r\nThis helps reduce the
scope of the illegal dependencies from `osquery`\r\nplugin towards
_security/private_ code.\r\ncc @tomsonpl \r\n\r\n* Simplify path and
rename
`@kbn/observability-alerting-rule-utils`\r\n(platform/shared):\r\n```\r\n#
Before
\r\n@kbn/observability-alerting-rule-utils\r\nx-pack/platform/packages/shared/observability/alerting_rule_utils/\r\n\r\n#
After\r\n@kbn/alerting-rule-utils\r\nx-pack/platform/packages/shared/alerting_rule_utils/\r\n```\r\n\r\n*
Simplify path and rename
`@kbn/observability-logs-overview`\r\n(platform/shared):\r\n```\r\n#
Before
\r\n@kbn/observability-logs-overview\r\nx-pack/platform/packages/shared/observability/logs_overview/\r\n\r\n#
After\r\n@kbn/logs-overview\r\nx-pack/platform/packages/shared/logs_overview/\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7b1c74a7a85c1e07449ab92dac7e4b62ad1b8f4b","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Core","release_note:skip","backport
missing","backport:prev-minor","backport:prev-major","Team:obs-ux-management","v9.1.0"],"title":"SKA:
Follow-up
relocations","number":209477,"url":"https://github.com/elastic/kibana/pull/209477","mergeCommit":{"message":"SKA:
Follow-up relocations (#209477)\n\n## Summary\r\n\r\n* Categorise and
move `@kbn/timelines-plugin` as _platform/shared_,\r\ntarget location:
`x-pack/platform/plugins/shared/timelines`.\r\nThis helps reduce the
scope of the illegal dependencies from `osquery`\r\nplugin towards
_security/private_ code.\r\ncc @tomsonpl \r\n\r\n* Simplify path and
rename
`@kbn/observability-alerting-rule-utils`\r\n(platform/shared):\r\n```\r\n#
Before
\r\n@kbn/observability-alerting-rule-utils\r\nx-pack/platform/packages/shared/observability/alerting_rule_utils/\r\n\r\n#
After\r\n@kbn/alerting-rule-utils\r\nx-pack/platform/packages/shared/alerting_rule_utils/\r\n```\r\n\r\n*
Simplify path and rename
`@kbn/observability-logs-overview`\r\n(platform/shared):\r\n```\r\n#
Before
\r\n@kbn/observability-logs-overview\r\nx-pack/platform/packages/shared/observability/logs_overview/\r\n\r\n#
After\r\n@kbn/logs-overview\r\nx-pack/platform/packages/shared/logs_overview/\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7b1c74a7a85c1e07449ab92dac7e4b62ad1b8f4b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209477","number":209477,"mergeCommit":{"message":"SKA:
Follow-up relocations (#209477)\n\n## Summary\r\n\r\n* Categorise and
move `@kbn/timelines-plugin` as _platform/shared_,\r\ntarget location:
`x-pack/platform/plugins/shared/timelines`.\r\nThis helps reduce the
scope of the illegal dependencies from `osquery`\r\nplugin towards
_security/private_ code.\r\ncc @tomsonpl \r\n\r\n* Simplify path and
rename
`@kbn/observability-alerting-rule-utils`\r\n(platform/shared):\r\n```\r\n#
Before
\r\n@kbn/observability-alerting-rule-utils\r\nx-pack/platform/packages/shared/observability/alerting_rule_utils/\r\n\r\n#
After\r\n@kbn/alerting-rule-utils\r\nx-pack/platform/packages/shared/alerting_rule_utils/\r\n```\r\n\r\n*
Simplify path and rename
`@kbn/observability-logs-overview`\r\n(platform/shared):\r\n```\r\n#
Before
\r\n@kbn/observability-logs-overview\r\nx-pack/platform/packages/shared/observability/logs_overview/\r\n\r\n#
After\r\n@kbn/logs-overview\r\nx-pack/platform/packages/shared/logs_overview/\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"7b1c74a7a85c1e07449ab92dac7e4b62ad1b8f4b"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-02-11 14:59:38 +01:00
Kibana Machine
177466455b
[9.0] [Synthtrace] Sanitize default value for error grouping key (#210010) (#210230)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Synthtrace] Sanitize default value for error grouping key
(#210010)](https://github.com/elastic/kibana/pull/210010)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Sergi
Romeu","email":"sergi.romeu@elastic.co"},"sourceCommit":{"committedDate":"2025-02-07T17:13:11Z","message":"[Synthtrace]
Sanitize default value for error grouping key (#210010)\n\n##
Summary\n\nCloses
#209096","sha":"ba5ae97569e59b83d6748bd0a8a5b52b573fda07","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","apm","backport:prev-minor","apm:synthtrace","ci:project-deploy-observability","Team:obs-ux-infra_services","v9.1.0"],"title":"[Synthtrace]
Sanitize default value for error grouping
key","number":210010,"url":"https://github.com/elastic/kibana/pull/210010","mergeCommit":{"message":"[Synthtrace]
Sanitize default value for error grouping key (#210010)\n\n##
Summary\n\nCloses
#209096","sha":"ba5ae97569e59b83d6748bd0a8a5b52b573fda07"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/210010","number":210010,"mergeCommit":{"message":"[Synthtrace]
Sanitize default value for error grouping key (#210010)\n\n##
Summary\n\nCloses
#209096","sha":"ba5ae97569e59b83d6748bd0a8a5b52b573fda07"}}]}]
BACKPORT-->

Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
2025-02-07 19:57:14 +01:00
Kibana Machine
a51bfa88db
[9.0] [kbn-test] retry 5xx in saml callback (#208977) (#210085)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[kbn-test] retry 5xx in saml callback
(#208977)](https://github.com/elastic/kibana/pull/208977)

<!--- Backport version: 9.4.3 -->

### 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":"2025-02-06T17:39:47Z","message":"[kbn-test]
retry 5xx in saml callback (#208977)\n\n## Summary\r\n\r\nWhen we run
Scout tests in parallel, we call SAML authentication in\r\nparallel too
and since by default `.security-profile-8` index does not\r\nexist, we
periodically getting 503 response:\r\n\r\n```\r\n proc [kibana]
[2025-01-29T11:13:10.420+01:00][ERROR][plugins.security.user-profile]
\r\nFailed to activate user profile:
{\"error\":{\"root_cause\":[{\"type\":\"unavailable_shards_exception\",\"reason\":\r\n\"at
least one search shard for the index [.security-profile-8] is
unavailable\"}],\r\n\"type\":\"unavailable_shards_exception\",\"reason\":\"at
least one search shard\r\nfor the index [.security-profile-8] is
unavailable\"},\"status\":503}.
{\"service\":{\"node\":\r\n{\"roles\":[\"background_tasks\",\"ui\"]}}}\r\n```\r\n\r\nThe
solution is to retry the SAML callback assuming that index will
be\r\ncreated and the issue will be solved.\r\nWe agreed with
Kibana-Security to retry only **5xx** errors, because for\r\n**4xx** we
most likely have to start the authentication from the start.\r\n\r\nFor
reviews: it is not 100% reproducible, so I added unit tests to\r\nverify
the retry logic is working only for 5xx requests. Please let me\r\nknow
if I miss something\r\n\r\nRetry was verified locally, you might be
seeing this logs output:\r\n\r\n```\r\n proc [kibana]
[2025-01-30T18:40:41.348+01:00][ERROR][plugins.security.user-profile]
Failed to activate user
profile:\r\n{\"error\":{\"root_cause\":[{\"type\":\"unavailable_shards_exception\",\"reason\":\"at
least one search shard for the index\r\n[.security-profile-8] is
unavailable\"}],\"type\":\"unavailable_shards_exception\",\"reason\":\"at
least one search shard\r\nfor the index [.security-profile-8] is
unavailable\"},\"status\":503}.
{\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\r\n
proc [kibana]
[2025-01-30T18:40:41.349+01:00][ERROR][plugins.security.authentication]
Login attempt with \"saml\"\r\nprovider failed due to unexpected error:
{\"error\":{\"root_cause\":[{\"type\":\"unavailable_shards_exception\",\"reason\":\r\n\"at
least one search shard for the index [.security-profile-8] is
unavailable\"}],\"type\":\"unavailable_shards_exception\",\r\n\"reason\":\"at
least one search shard for the index [.security-profile-8] is
unavailable\"},\"status\":503}\r\n{\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\r\n
proc [kibana] [2025-01-30T18:40:41.349+01:00][ERROR][http] 500 Server
Error
{\"http\":{\"response\":{\"status_code\":500},\"request\":{\"method\":\"post\",\"path\":\"/api/security/saml/callback\"}},\"error\":\r\n{\"message\":\"unavailable_shards_exception\\n\\tRoot
causes:\\n\\t\\tunavailable_shards_exception: at least one\r\nsearch
shard for the index [.security-profile-8] is\r\n ERROR [scout] SAML
callback failed: expected 302, got 500\r\n Waiting 939 ms before the
next attempt\r\n proc [playwright]\r\n info
[o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\"
message=\"Cluster health status changed\r\nfrom [YELLOW] to [GREEN]
(reason: [shards started
[[.security-profile-8][0]]]).\"\r\nprevious.health=\"YELLOW\"
reason=\"shards started [[.security-profile-8][0]]\"\r\n```\r\n\r\nTo
reproduce: \r\n```\r\nnode scripts/scout.js run-tests --stateful
--config
x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"2b5bbf8f86f0c6e0e05ab5e6381bba4919c64e33","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","test:scout","v9.1.0"],"title":"[kbn-test]
retry 5xx in saml
callback","number":208977,"url":"https://github.com/elastic/kibana/pull/208977","mergeCommit":{"message":"[kbn-test]
retry 5xx in saml callback (#208977)\n\n## Summary\r\n\r\nWhen we run
Scout tests in parallel, we call SAML authentication in\r\nparallel too
and since by default `.security-profile-8` index does not\r\nexist, we
periodically getting 503 response:\r\n\r\n```\r\n proc [kibana]
[2025-01-29T11:13:10.420+01:00][ERROR][plugins.security.user-profile]
\r\nFailed to activate user profile:
{\"error\":{\"root_cause\":[{\"type\":\"unavailable_shards_exception\",\"reason\":\r\n\"at
least one search shard for the index [.security-profile-8] is
unavailable\"}],\r\n\"type\":\"unavailable_shards_exception\",\"reason\":\"at
least one search shard\r\nfor the index [.security-profile-8] is
unavailable\"},\"status\":503}.
{\"service\":{\"node\":\r\n{\"roles\":[\"background_tasks\",\"ui\"]}}}\r\n```\r\n\r\nThe
solution is to retry the SAML callback assuming that index will
be\r\ncreated and the issue will be solved.\r\nWe agreed with
Kibana-Security to retry only **5xx** errors, because for\r\n**4xx** we
most likely have to start the authentication from the start.\r\n\r\nFor
reviews: it is not 100% reproducible, so I added unit tests to\r\nverify
the retry logic is working only for 5xx requests. Please let me\r\nknow
if I miss something\r\n\r\nRetry was verified locally, you might be
seeing this logs output:\r\n\r\n```\r\n proc [kibana]
[2025-01-30T18:40:41.348+01:00][ERROR][plugins.security.user-profile]
Failed to activate user
profile:\r\n{\"error\":{\"root_cause\":[{\"type\":\"unavailable_shards_exception\",\"reason\":\"at
least one search shard for the index\r\n[.security-profile-8] is
unavailable\"}],\"type\":\"unavailable_shards_exception\",\"reason\":\"at
least one search shard\r\nfor the index [.security-profile-8] is
unavailable\"},\"status\":503}.
{\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\r\n
proc [kibana]
[2025-01-30T18:40:41.349+01:00][ERROR][plugins.security.authentication]
Login attempt with \"saml\"\r\nprovider failed due to unexpected error:
{\"error\":{\"root_cause\":[{\"type\":\"unavailable_shards_exception\",\"reason\":\r\n\"at
least one search shard for the index [.security-profile-8] is
unavailable\"}],\"type\":\"unavailable_shards_exception\",\r\n\"reason\":\"at
least one search shard for the index [.security-profile-8] is
unavailable\"},\"status\":503}\r\n{\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\r\n
proc [kibana] [2025-01-30T18:40:41.349+01:00][ERROR][http] 500 Server
Error
{\"http\":{\"response\":{\"status_code\":500},\"request\":{\"method\":\"post\",\"path\":\"/api/security/saml/callback\"}},\"error\":\r\n{\"message\":\"unavailable_shards_exception\\n\\tRoot
causes:\\n\\t\\tunavailable_shards_exception: at least one\r\nsearch
shard for the index [.security-profile-8] is\r\n ERROR [scout] SAML
callback failed: expected 302, got 500\r\n Waiting 939 ms before the
next attempt\r\n proc [playwright]\r\n info
[o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\"
message=\"Cluster health status changed\r\nfrom [YELLOW] to [GREEN]
(reason: [shards started
[[.security-profile-8][0]]]).\"\r\nprevious.health=\"YELLOW\"
reason=\"shards started [[.security-profile-8][0]]\"\r\n```\r\n\r\nTo
reproduce: \r\n```\r\nnode scripts/scout.js run-tests --stateful
--config
x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"2b5bbf8f86f0c6e0e05ab5e6381bba4919c64e33"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208977","number":208977,"mergeCommit":{"message":"[kbn-test]
retry 5xx in saml callback (#208977)\n\n## Summary\r\n\r\nWhen we run
Scout tests in parallel, we call SAML authentication in\r\nparallel too
and since by default `.security-profile-8` index does not\r\nexist, we
periodically getting 503 response:\r\n\r\n```\r\n proc [kibana]
[2025-01-29T11:13:10.420+01:00][ERROR][plugins.security.user-profile]
\r\nFailed to activate user profile:
{\"error\":{\"root_cause\":[{\"type\":\"unavailable_shards_exception\",\"reason\":\r\n\"at
least one search shard for the index [.security-profile-8] is
unavailable\"}],\r\n\"type\":\"unavailable_shards_exception\",\"reason\":\"at
least one search shard\r\nfor the index [.security-profile-8] is
unavailable\"},\"status\":503}.
{\"service\":{\"node\":\r\n{\"roles\":[\"background_tasks\",\"ui\"]}}}\r\n```\r\n\r\nThe
solution is to retry the SAML callback assuming that index will
be\r\ncreated and the issue will be solved.\r\nWe agreed with
Kibana-Security to retry only **5xx** errors, because for\r\n**4xx** we
most likely have to start the authentication from the start.\r\n\r\nFor
reviews: it is not 100% reproducible, so I added unit tests to\r\nverify
the retry logic is working only for 5xx requests. Please let me\r\nknow
if I miss something\r\n\r\nRetry was verified locally, you might be
seeing this logs output:\r\n\r\n```\r\n proc [kibana]
[2025-01-30T18:40:41.348+01:00][ERROR][plugins.security.user-profile]
Failed to activate user
profile:\r\n{\"error\":{\"root_cause\":[{\"type\":\"unavailable_shards_exception\",\"reason\":\"at
least one search shard for the index\r\n[.security-profile-8] is
unavailable\"}],\"type\":\"unavailable_shards_exception\",\"reason\":\"at
least one search shard\r\nfor the index [.security-profile-8] is
unavailable\"},\"status\":503}.
{\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\r\n
proc [kibana]
[2025-01-30T18:40:41.349+01:00][ERROR][plugins.security.authentication]
Login attempt with \"saml\"\r\nprovider failed due to unexpected error:
{\"error\":{\"root_cause\":[{\"type\":\"unavailable_shards_exception\",\"reason\":\r\n\"at
least one search shard for the index [.security-profile-8] is
unavailable\"}],\"type\":\"unavailable_shards_exception\",\r\n\"reason\":\"at
least one search shard for the index [.security-profile-8] is
unavailable\"},\"status\":503}\r\n{\"service\":{\"node\":{\"roles\":[\"background_tasks\",\"ui\"]}}}\r\n
proc [kibana] [2025-01-30T18:40:41.349+01:00][ERROR][http] 500 Server
Error
{\"http\":{\"response\":{\"status_code\":500},\"request\":{\"method\":\"post\",\"path\":\"/api/security/saml/callback\"}},\"error\":\r\n{\"message\":\"unavailable_shards_exception\\n\\tRoot
causes:\\n\\t\\tunavailable_shards_exception: at least one\r\nsearch
shard for the index [.security-profile-8] is\r\n ERROR [scout] SAML
callback failed: expected 302, got 500\r\n Waiting 939 ms before the
next attempt\r\n proc [playwright]\r\n info
[o.e.c.r.a.AllocationService] [scout] current.health=\"GREEN\"
message=\"Cluster health status changed\r\nfrom [YELLOW] to [GREEN]
(reason: [shards started
[[.security-profile-8][0]]]).\"\r\nprevious.health=\"YELLOW\"
reason=\"shards started [[.security-profile-8][0]]\"\r\n```\r\n\r\nTo
reproduce: \r\n```\r\nnode scripts/scout.js run-tests --stateful
--config
x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts\r\n```\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>","sha":"2b5bbf8f86f0c6e0e05ab5e6381bba4919c64e33"}}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-02-06 21:49:39 +01:00
Kibana Machine
220a49402c
[9.0] [ci] Fix storybooks (#209887) (#209939)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[ci] Fix storybooks
(#209887)](https://github.com/elastic/kibana/pull/209887)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Jon","email":"jon@elastic.co"},"sourceCommit":{"committedDate":"2025-02-05T23:55:49Z","message":"[ci]
Fix storybooks
(#209887)","sha":"63d1f7474bd5fd25c76c52ad230adecfcb0af82c","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","ci:build-storybooks","v9.1.0","v8.19.0"],"title":"[ci]
Fix
storybooks","number":209887,"url":"https://github.com/elastic/kibana/pull/209887","mergeCommit":{"message":"[ci]
Fix storybooks
(#209887)","sha":"63d1f7474bd5fd25c76c52ad230adecfcb0af82c"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209887","number":209887,"mergeCommit":{"message":"[ci]
Fix storybooks
(#209887)","sha":"63d1f7474bd5fd25c76c52ad230adecfcb0af82c"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jon <jon@elastic.co>
2025-02-06 02:59:25 +01:00
Kibana Machine
5f6faf4cc9
[9.0] [Journeys] Set traceparent for Playwright (#189800) (#209860)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Journeys] Set traceparent for Playwright
(#189800)](https://github.com/elastic/kibana/pull/189800)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Dario
Gieselaar","email":"dario.gieselaar@elastic.co"},"sourceCommit":{"committedDate":"2025-02-05T17:53:34Z","message":"[Journeys]
Set traceparent for Playwright (#189800)\n\nSets the traceparent for
Playwright, so the trace from the test runner\nincludes the trace events
from the browser and Kibana server.\n\n---------\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"27893f5fcd8ef9775df54e8aadaa41f3b2d78c3a","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:version","v8.18.0","v9.1.0"],"title":"[Journeys]
Set traceparent for
Playwright","number":189800,"url":"https://github.com/elastic/kibana/pull/189800","mergeCommit":{"message":"[Journeys]
Set traceparent for Playwright (#189800)\n\nSets the traceparent for
Playwright, so the trace from the test runner\nincludes the trace events
from the browser and Kibana server.\n\n---------\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"27893f5fcd8ef9775df54e8aadaa41f3b2d78c3a"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/189800","number":189800,"mergeCommit":{"message":"[Journeys]
Set traceparent for Playwright (#189800)\n\nSets the traceparent for
Playwright, so the trace from the test runner\nincludes the trace events
from the browser and Kibana server.\n\n---------\n\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"27893f5fcd8ef9775df54e8aadaa41f3b2d78c3a"}}]}]
BACKPORT-->

Co-authored-by: Dario Gieselaar <dario.gieselaar@elastic.co>
2025-02-05 20:57:18 +01:00
Kibana Machine
f8094be915
[9.0] Remove dependency date-fns !! (#209539) (#209829)
# Backport

This will backport the following commits from `main` to `9.0`:
- [Remove dependency date-fns !!
(#209539)](https://github.com/elastic/kibana/pull/209539)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Shahzad","email":"shahzad31comp@gmail.com"},"sourceCommit":{"committedDate":"2025-02-05T16:34:16Z","message":"Remove
dependency date-fns !! (#209539)\n\n## Summary\r\n\r\nWhat's better than
upgrade? removing it alltogther
!!","sha":"679e2badafcf773024e37b3901bc8c241de41e85","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","v9.1.0"],"title":"Remove
dependency date-fns
!!","number":209539,"url":"https://github.com/elastic/kibana/pull/209539","mergeCommit":{"message":"Remove
dependency date-fns !! (#209539)\n\n## Summary\r\n\r\nWhat's better than
upgrade? removing it alltogther
!!","sha":"679e2badafcf773024e37b3901bc8c241de41e85"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209539","number":209539,"mergeCommit":{"message":"Remove
dependency date-fns !! (#209539)\n\n## Summary\r\n\r\nWhat's better than
upgrade? removing it alltogther
!!","sha":"679e2badafcf773024e37b3901bc8c241de41e85"}}]}] BACKPORT-->

Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2025-02-05 19:36:52 +01:00
Kibana Machine
2c04505bd6
[9.0] [scout] unique runId for reporting, disabled failed test reporter locally (#209507) (#209808)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[scout] unique runId for reporting, disabled failed test reporter
locally (#209507)](https://github.com/elastic/kibana/pull/209507)

<!--- Backport version: 9.4.3 -->

### 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":"2025-02-05T15:35:26Z","message":"[scout]
unique runId for reporting, disabled failed test reporter locally
(#209507)\n\n## Summary\r\n\r\nThis PR makes few changes to scout
reporter:\r\n\r\nRecently I found out that Playwright load configuration
file _multiple\r\ntimes_:\r\n- first time after you run `npx playwright
test -c ...`\r\n- on every worker start\r\n\r\nlog
before:\r\n\r\n```\r\n[main][~/github/kibana]$ npx playwright test
--config
x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\r\n[createPlaywrightConfig]
called with runId: 18f35f735a10155c\r\n\r\nRunning 1 test using 1
worker\r\n\r\n[createPlaywrightConfig] called with runId:
2633b4e4c20afa15\r\n[chromium] › full_screen_mode.spec.ts:28:9 › Maps ›
Full screen mode @svlSecurity @svlOblt @svlSearch
@ess\r\n```\r\n\r\nWith our current logic unique `runId` will be
generated on each\r\nconfiguration load, meaning for parallel run we
will report failures in\r\ndifferent directories instead of the same
one.\r\n\r\nPlaywright doesn't expose any unique identifier for the run,
so we have\r\ndo something similar described
in\r\n\r\nhttps://github.com/microsoft/playwright/issues/28941#issuecomment-1888008102\r\n\r\nlog
after fix:\r\n\r\n```\r\n[main][~/github/kibana]$ npx playwright test
--config
x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\r\n[createPlaywrightConfig]
called with runId: 310a576f32d3b8a5\r\n\r\nRunning 1 test using 1
worker\r\n\r\n[createPlaywrightConfig] called with runId:
310a576f32d3b8a5\r\n[chromium] › full_screen_mode.spec.ts:28:9 › Maps ›
Full screen mode @svlSecurity @svlOblt @svlSearch @ess\r\n```\r\n\r\nWe
also had a chat with @dolaru and agreed that Scout reporters to
be\r\ndisabled for local test run. Few reasons:\r\n- Scout custom
reporting targets CI execution: events-based reporter was\r\nalready
disabled\r\n- Failed test reporter purpose is to provide html
boilerplate to be\r\nannotated in pipeline build\r\n- When you run tests
with IDE playwright plugin it provides its own\r\nreporter / history,
should be
enough.","sha":"6635fe501c307d567afa71a346fc91a7675e3cc5","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor","test:scout","v9.1.0"],"title":"[scout]
unique runId for reporting, disabled failed test reporter
locally","number":209507,"url":"https://github.com/elastic/kibana/pull/209507","mergeCommit":{"message":"[scout]
unique runId for reporting, disabled failed test reporter locally
(#209507)\n\n## Summary\r\n\r\nThis PR makes few changes to scout
reporter:\r\n\r\nRecently I found out that Playwright load configuration
file _multiple\r\ntimes_:\r\n- first time after you run `npx playwright
test -c ...`\r\n- on every worker start\r\n\r\nlog
before:\r\n\r\n```\r\n[main][~/github/kibana]$ npx playwright test
--config
x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\r\n[createPlaywrightConfig]
called with runId: 18f35f735a10155c\r\n\r\nRunning 1 test using 1
worker\r\n\r\n[createPlaywrightConfig] called with runId:
2633b4e4c20afa15\r\n[chromium] › full_screen_mode.spec.ts:28:9 › Maps ›
Full screen mode @svlSecurity @svlOblt @svlSearch
@ess\r\n```\r\n\r\nWith our current logic unique `runId` will be
generated on each\r\nconfiguration load, meaning for parallel run we
will report failures in\r\ndifferent directories instead of the same
one.\r\n\r\nPlaywright doesn't expose any unique identifier for the run,
so we have\r\ndo something similar described
in\r\n\r\nhttps://github.com/microsoft/playwright/issues/28941#issuecomment-1888008102\r\n\r\nlog
after fix:\r\n\r\n```\r\n[main][~/github/kibana]$ npx playwright test
--config
x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\r\n[createPlaywrightConfig]
called with runId: 310a576f32d3b8a5\r\n\r\nRunning 1 test using 1
worker\r\n\r\n[createPlaywrightConfig] called with runId:
310a576f32d3b8a5\r\n[chromium] › full_screen_mode.spec.ts:28:9 › Maps ›
Full screen mode @svlSecurity @svlOblt @svlSearch @ess\r\n```\r\n\r\nWe
also had a chat with @dolaru and agreed that Scout reporters to
be\r\ndisabled for local test run. Few reasons:\r\n- Scout custom
reporting targets CI execution: events-based reporter was\r\nalready
disabled\r\n- Failed test reporter purpose is to provide html
boilerplate to be\r\nannotated in pipeline build\r\n- When you run tests
with IDE playwright plugin it provides its own\r\nreporter / history,
should be
enough.","sha":"6635fe501c307d567afa71a346fc91a7675e3cc5"}},"sourceBranch":"main","suggestedTargetBranches":["9.0"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209507","number":209507,"mergeCommit":{"message":"[scout]
unique runId for reporting, disabled failed test reporter locally
(#209507)\n\n## Summary\r\n\r\nThis PR makes few changes to scout
reporter:\r\n\r\nRecently I found out that Playwright load configuration
file _multiple\r\ntimes_:\r\n- first time after you run `npx playwright
test -c ...`\r\n- on every worker start\r\n\r\nlog
before:\r\n\r\n```\r\n[main][~/github/kibana]$ npx playwright test
--config
x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\r\n[createPlaywrightConfig]
called with runId: 18f35f735a10155c\r\n\r\nRunning 1 test using 1
worker\r\n\r\n[createPlaywrightConfig] called with runId:
2633b4e4c20afa15\r\n[chromium] › full_screen_mode.spec.ts:28:9 › Maps ›
Full screen mode @svlSecurity @svlOblt @svlSearch
@ess\r\n```\r\n\r\nWith our current logic unique `runId` will be
generated on each\r\nconfiguration load, meaning for parallel run we
will report failures in\r\ndifferent directories instead of the same
one.\r\n\r\nPlaywright doesn't expose any unique identifier for the run,
so we have\r\ndo something similar described
in\r\n\r\nhttps://github.com/microsoft/playwright/issues/28941#issuecomment-1888008102\r\n\r\nlog
after fix:\r\n\r\n```\r\n[main][~/github/kibana]$ npx playwright test
--config
x-pack/platform/plugins/shared/maps/ui_tests/playwright.config.ts\r\n[createPlaywrightConfig]
called with runId: 310a576f32d3b8a5\r\n\r\nRunning 1 test using 1
worker\r\n\r\n[createPlaywrightConfig] called with runId:
310a576f32d3b8a5\r\n[chromium] › full_screen_mode.spec.ts:28:9 › Maps ›
Full screen mode @svlSecurity @svlOblt @svlSearch @ess\r\n```\r\n\r\nWe
also had a chat with @dolaru and agreed that Scout reporters to
be\r\ndisabled for local test run. Few reasons:\r\n- Scout custom
reporting targets CI execution: events-based reporter was\r\nalready
disabled\r\n- Failed test reporter purpose is to provide html
boilerplate to be\r\nannotated in pipeline build\r\n- When you run tests
with IDE playwright plugin it provides its own\r\nreporter / history,
should be enough.","sha":"6635fe501c307d567afa71a346fc91a7675e3cc5"}}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-02-05 18:30:11 +01:00
Kibana Machine
bde102b11e
[9.0] [Synthtrace] Introducing teardown for scenarios (#209739) (#209800)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Synthtrace] Introducing teardown for scenarios
(#209739)](https://github.com/elastic/kibana/pull/209739)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Yngrid
Coello","email":"yngrid.coello@elastic.co"},"sourceCommit":{"committedDate":"2025-02-05T14:57:50Z","message":"[Synthtrace]
Introducing teardown for scenarios (#209739)\n\n### Background\r\n\r\nIn
some scenarios we need to perform some setup at bootstrap time,
this\r\nsetup could affect following scenarios.\r\nTake for
example\r\n[failed_logs](https://github.com/elastic/kibana/blob/main/packages/kbn-apm-synthtrace/src/scenarios/failed_logs.ts)\r\nscenario
where we create a pipeline that will do some checks in\r\n`log.level`
property, if we try to run an scenario after that one we\r\nwill enter
into some issues.\r\n\r\n### Changes\r\n\r\nThis PR aims to introduce a
`teardown` setup for scenarios where we\r\ncould undo the changes done
at `bootstrap`
time.","sha":"c56d7ea24a898cbf6943719af1ef37c03250e2ee","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-infra_services","v8.18.0","v9.1.0","v8.19.0"],"title":"[Synthtrace]
Introducing teardown for
scenarios","number":209739,"url":"https://github.com/elastic/kibana/pull/209739","mergeCommit":{"message":"[Synthtrace]
Introducing teardown for scenarios (#209739)\n\n### Background\r\n\r\nIn
some scenarios we need to perform some setup at bootstrap time,
this\r\nsetup could affect following scenarios.\r\nTake for
example\r\n[failed_logs](https://github.com/elastic/kibana/blob/main/packages/kbn-apm-synthtrace/src/scenarios/failed_logs.ts)\r\nscenario
where we create a pipeline that will do some checks in\r\n`log.level`
property, if we try to run an scenario after that one we\r\nwill enter
into some issues.\r\n\r\n### Changes\r\n\r\nThis PR aims to introduce a
`teardown` setup for scenarios where we\r\ncould undo the changes done
at `bootstrap`
time.","sha":"c56d7ea24a898cbf6943719af1ef37c03250e2ee"}},"sourceBranch":"main","suggestedTargetBranches":["8.18","8.x"],"targetPullRequestStates":[{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209739","number":209739,"mergeCommit":{"message":"[Synthtrace]
Introducing teardown for scenarios (#209739)\n\n### Background\r\n\r\nIn
some scenarios we need to perform some setup at bootstrap time,
this\r\nsetup could affect following scenarios.\r\nTake for
example\r\n[failed_logs](https://github.com/elastic/kibana/blob/main/packages/kbn-apm-synthtrace/src/scenarios/failed_logs.ts)\r\nscenario
where we create a pipeline that will do some checks in\r\n`log.level`
property, if we try to run an scenario after that one we\r\nwill enter
into some issues.\r\n\r\n### Changes\r\n\r\nThis PR aims to introduce a
`teardown` setup for scenarios where we\r\ncould undo the changes done
at `bootstrap`
time.","sha":"c56d7ea24a898cbf6943719af1ef37c03250e2ee"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Yngrid Coello <yngrid.coello@elastic.co>
2025-02-05 18:00:22 +01:00
Kibana Machine
1a150c4df2
[9.0] [Synthtrace] Fix synthtrace to work with 7.x clusters (#209447) (#209482)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Synthtrace] Fix synthtrace to work with 7.x clusters
(#209447)](https://github.com/elastic/kibana/pull/209447)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Achyut
Jhunjhunwala","email":"achyut.jhunjhunwala@elastic.co"},"sourceCommit":{"committedDate":"2025-02-04T09:25:00Z","message":"[Synthtrace]
Fix synthtrace to work with 7.x clusters (#209447)\n\n##
Summary\r\n\r\nWhile working on 9.x Upgrade testing, i found that when
running\r\nsynthtrace scenarios pointing to a 7.x cluster, it tries to
fetch the\r\nlatest version of the APM package. In 7.x, the
`latestVersion` item was\r\npresent under a different node in the API
response. Hence adding
this\r\nfix.","sha":"032337332c020baeabc215f123eaca833efafdd5","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:prev-minor","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-logs","Team:obs-ux-infra_services","v9.1.0"],"title":"[Synthtrace]
Fix synthtrace to work with 7.x
clusters","number":209447,"url":"https://github.com/elastic/kibana/pull/209447","mergeCommit":{"message":"[Synthtrace]
Fix synthtrace to work with 7.x clusters (#209447)\n\n##
Summary\r\n\r\nWhile working on 9.x Upgrade testing, i found that when
running\r\nsynthtrace scenarios pointing to a 7.x cluster, it tries to
fetch the\r\nlatest version of the APM package. In 7.x, the
`latestVersion` item was\r\npresent under a different node in the API
response. Hence adding
this\r\nfix.","sha":"032337332c020baeabc215f123eaca833efafdd5"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209447","number":209447,"mergeCommit":{"message":"[Synthtrace]
Fix synthtrace to work with 7.x clusters (#209447)\n\n##
Summary\r\n\r\nWhile working on 9.x Upgrade testing, i found that when
running\r\nsynthtrace scenarios pointing to a 7.x cluster, it tries to
fetch the\r\nlatest version of the APM package. In 7.x, the
`latestVersion` item was\r\npresent under a different node in the API
response. Hence adding
this\r\nfix.","sha":"032337332c020baeabc215f123eaca833efafdd5"}}]}]
BACKPORT-->

Co-authored-by: Achyut Jhunjhunwala <achyut.jhunjhunwala@elastic.co>
2025-02-05 07:17:56 +01:00
Kibana Machine
03692a150e
[9.0] [SLO]: require instance id in slo details schema (#209020) (#209570)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[SLO]: require instance id in slo details schema
(#209020)](https://github.com/elastic/kibana/pull/209020)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Bailey
Cash","email":"bailey.cash@elastic.co"},"sourceCommit":{"committedDate":"2025-02-04T15:20:03Z","message":"[SLO]:
require instance id in slo details schema (#209020)\n\n##
Summary\r\n\r\nResolves #180590\r\n\r\nSince SLO instanceId is provided
in all APIs, it will be made required\r\nfor sloWithDataResponseSchema
and the SLOWithSummaryResponse type.\r\nChecks for the existence of
instanceId have either been removed or\r\nchanged to check for ALL_VALUE
(`*`)\r\n\r\n---------\r\n\r\nCo-authored-by: Kevin Delemme
<kevin.delemme@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"df573d75968a0f0c4535b75131df51d160d8d10a","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Operations","release_note:skip","v9.0.0","backport:prev-minor","Team:obs-ux-management","v8.18.0","v9.1.0"],"title":"[SLO]:
require instance id in slo details
schema","number":209020,"url":"https://github.com/elastic/kibana/pull/209020","mergeCommit":{"message":"[SLO]:
require instance id in slo details schema (#209020)\n\n##
Summary\r\n\r\nResolves #180590\r\n\r\nSince SLO instanceId is provided
in all APIs, it will be made required\r\nfor sloWithDataResponseSchema
and the SLOWithSummaryResponse type.\r\nChecks for the existence of
instanceId have either been removed or\r\nchanged to check for ALL_VALUE
(`*`)\r\n\r\n---------\r\n\r\nCo-authored-by: Kevin Delemme
<kevin.delemme@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"df573d75968a0f0c4535b75131df51d160d8d10a"}},"sourceBranch":"main","suggestedTargetBranches":["9.0","8.18"],"targetPullRequestStates":[{"branch":"9.0","label":"v9.0.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.18","label":"v8.18.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/209020","number":209020,"mergeCommit":{"message":"[SLO]:
require instance id in slo details schema (#209020)\n\n##
Summary\r\n\r\nResolves #180590\r\n\r\nSince SLO instanceId is provided
in all APIs, it will be made required\r\nfor sloWithDataResponseSchema
and the SLOWithSummaryResponse type.\r\nChecks for the existence of
instanceId have either been removed or\r\nchanged to check for ALL_VALUE
(`*`)\r\n\r\n---------\r\n\r\nCo-authored-by: Kevin Delemme
<kevin.delemme@elastic.co>\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"df573d75968a0f0c4535b75131df51d160d8d10a"}}]}]
BACKPORT-->

Co-authored-by: Bailey Cash <bailey.cash@elastic.co>
2025-02-04 18:22:53 +01:00
Kibana Machine
15348c0f28
[9.0] [Hardening] Kibana Feature API Privileges Names (#208067) (#209315)
# Backport

This will backport the following commits from `main` to `9.0`:
- [[Hardening] Kibana Feature API Privileges Names
(#208067)](https://github.com/elastic/kibana/pull/208067)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Elena
Shostak","email":"165678770+elena-shostak@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-02-03T14:22:29Z","message":"[Hardening]
Kibana Feature API Privileges Names (#208067)\n\n## Summary\r\n\r\nAs
part of our effort to harden API action definitions and
enforce\r\nstandards this PR adds an utility `ApiPrivileges`
class.\r\nIt is supposed to be used for both feature registration and
API route\r\ndefinition to construct the privilege
name.\r\n```ts\r\nplugins.features.registerKibanaFeature({\r\n
privileges: {\r\n all: {\r\n app: [...],\r\n catalogue: [...],\r\n api:
[ApiPrivileges.manage('subject_name')],\r\n ...\r\n },\r\n read: {\r\n
...\r\n api: [ApiPrivileges.read('subject_name')],\r\n ...\r\n },\r\n
},\r\n})\r\n....\r\n\r\n// route definition\r\nrouter.get(\r\n {\r\n
path: 'api_path',\r\n security: {\r\n authz: {\r\n requiredPrivileges:
[ApiPrivileges.manage('subject_name')],\r\n },\r\n },\r\n },\r\n async
(ctx, req, res) =>
{}\r\n);\r\n```\r\n\r\n`require_kibana_feature_privileges_naming` eslint
rule has been added to\r\nshow warning if the API privilege name doesn't
satisfy the naming\r\nconvention.\r\n\r\n### Naming convention\r\n\r\n-
API privilege should start with valid `ApiOperation`:
`manage`,\r\n`read`, `update`, `delete`, `create`\r\n- API privilege
should use `_` as separator\r\n\r\n `read-entity-a`\r\n
`delete_entity-a`\r\n `entity_manage`\r\n `read_entity_a`\r\n
`delete_entity_a`\r\n `manage_entity`\r\n\r\n> [!IMPORTANT] \r\n>
Serverless ZDT update scenario:\r\n>\r\n> - version N has an endpoint
protected with the `old_privilege_read`.\r\n> - version N+1 has the same
endpoint protected with a new\r\n`read_privilege`.\r\n> \r\n> There
might be a short period between the time the UI pod N+1 passes\r\nSO
migrations and updates privileges and the time it's marked
as\r\nready-to-handle-requests by k8s, and when UI pod N is
terminated.\r\n>\r\n> After discussion with @legrego and @azasypkin we
decided to ignore it\r\ndue to the perceived risk-to-cost ratio:\r\n> 1.
The time window users might be affected is very narrow because
we\r\nregister privileges late in the Kibana startup flow (e.g., after
SO\r\nmigrations).\r\n> 2. The transient 403 errors users might get
won't result in session\r\ntermination and shouldn't lead to data
loss.\r\n> 3. The roll-out will be performed in batches over the course
of\r\nmultiple weeks and implemented by different teams. This means the
impact\r\nper release shouldn't be significant.\r\n\r\n###
Checklist\r\n\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n__Relates:
https://github.com/elastic/kibana/issues/198716__\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"504510b92b0e92cbc173f0de517c506d2f54d536","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Security","release_note:skip","Feature:Hardening","backport:prev-minor","Team:Obs
AI Assistant","v9.1.0"],"title":"[Hardening] Kibana Feature API
Privileges
Names","number":208067,"url":"https://github.com/elastic/kibana/pull/208067","mergeCommit":{"message":"[Hardening]
Kibana Feature API Privileges Names (#208067)\n\n## Summary\r\n\r\nAs
part of our effort to harden API action definitions and
enforce\r\nstandards this PR adds an utility `ApiPrivileges`
class.\r\nIt is supposed to be used for both feature registration and
API route\r\ndefinition to construct the privilege
name.\r\n```ts\r\nplugins.features.registerKibanaFeature({\r\n
privileges: {\r\n all: {\r\n app: [...],\r\n catalogue: [...],\r\n api:
[ApiPrivileges.manage('subject_name')],\r\n ...\r\n },\r\n read: {\r\n
...\r\n api: [ApiPrivileges.read('subject_name')],\r\n ...\r\n },\r\n
},\r\n})\r\n....\r\n\r\n// route definition\r\nrouter.get(\r\n {\r\n
path: 'api_path',\r\n security: {\r\n authz: {\r\n requiredPrivileges:
[ApiPrivileges.manage('subject_name')],\r\n },\r\n },\r\n },\r\n async
(ctx, req, res) =>
{}\r\n);\r\n```\r\n\r\n`require_kibana_feature_privileges_naming` eslint
rule has been added to\r\nshow warning if the API privilege name doesn't
satisfy the naming\r\nconvention.\r\n\r\n### Naming convention\r\n\r\n-
API privilege should start with valid `ApiOperation`:
`manage`,\r\n`read`, `update`, `delete`, `create`\r\n- API privilege
should use `_` as separator\r\n\r\n `read-entity-a`\r\n
`delete_entity-a`\r\n `entity_manage`\r\n `read_entity_a`\r\n
`delete_entity_a`\r\n `manage_entity`\r\n\r\n> [!IMPORTANT] \r\n>
Serverless ZDT update scenario:\r\n>\r\n> - version N has an endpoint
protected with the `old_privilege_read`.\r\n> - version N+1 has the same
endpoint protected with a new\r\n`read_privilege`.\r\n> \r\n> There
might be a short period between the time the UI pod N+1 passes\r\nSO
migrations and updates privileges and the time it's marked
as\r\nready-to-handle-requests by k8s, and when UI pod N is
terminated.\r\n>\r\n> After discussion with @legrego and @azasypkin we
decided to ignore it\r\ndue to the perceived risk-to-cost ratio:\r\n> 1.
The time window users might be affected is very narrow because
we\r\nregister privileges late in the Kibana startup flow (e.g., after
SO\r\nmigrations).\r\n> 2. The transient 403 errors users might get
won't result in session\r\ntermination and shouldn't lead to data
loss.\r\n> 3. The roll-out will be performed in batches over the course
of\r\nmultiple weeks and implemented by different teams. This means the
impact\r\nper release shouldn't be significant.\r\n\r\n###
Checklist\r\n\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n__Relates:
https://github.com/elastic/kibana/issues/198716__\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"504510b92b0e92cbc173f0de517c506d2f54d536"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/208067","number":208067,"mergeCommit":{"message":"[Hardening]
Kibana Feature API Privileges Names (#208067)\n\n## Summary\r\n\r\nAs
part of our effort to harden API action definitions and
enforce\r\nstandards this PR adds an utility `ApiPrivileges`
class.\r\nIt is supposed to be used for both feature registration and
API route\r\ndefinition to construct the privilege
name.\r\n```ts\r\nplugins.features.registerKibanaFeature({\r\n
privileges: {\r\n all: {\r\n app: [...],\r\n catalogue: [...],\r\n api:
[ApiPrivileges.manage('subject_name')],\r\n ...\r\n },\r\n read: {\r\n
...\r\n api: [ApiPrivileges.read('subject_name')],\r\n ...\r\n },\r\n
},\r\n})\r\n....\r\n\r\n// route definition\r\nrouter.get(\r\n {\r\n
path: 'api_path',\r\n security: {\r\n authz: {\r\n requiredPrivileges:
[ApiPrivileges.manage('subject_name')],\r\n },\r\n },\r\n },\r\n async
(ctx, req, res) =>
{}\r\n);\r\n```\r\n\r\n`require_kibana_feature_privileges_naming` eslint
rule has been added to\r\nshow warning if the API privilege name doesn't
satisfy the naming\r\nconvention.\r\n\r\n### Naming convention\r\n\r\n-
API privilege should start with valid `ApiOperation`:
`manage`,\r\n`read`, `update`, `delete`, `create`\r\n- API privilege
should use `_` as separator\r\n\r\n `read-entity-a`\r\n
`delete_entity-a`\r\n `entity_manage`\r\n `read_entity_a`\r\n
`delete_entity_a`\r\n `manage_entity`\r\n\r\n> [!IMPORTANT] \r\n>
Serverless ZDT update scenario:\r\n>\r\n> - version N has an endpoint
protected with the `old_privilege_read`.\r\n> - version N+1 has the same
endpoint protected with a new\r\n`read_privilege`.\r\n> \r\n> There
might be a short period between the time the UI pod N+1 passes\r\nSO
migrations and updates privileges and the time it's marked
as\r\nready-to-handle-requests by k8s, and when UI pod N is
terminated.\r\n>\r\n> After discussion with @legrego and @azasypkin we
decided to ignore it\r\ndue to the perceived risk-to-cost ratio:\r\n> 1.
The time window users might be affected is very narrow because
we\r\nregister privileges late in the Kibana startup flow (e.g., after
SO\r\nmigrations).\r\n> 2. The transient 403 errors users might get
won't result in session\r\ntermination and shouldn't lead to data
loss.\r\n> 3. The roll-out will be performed in batches over the course
of\r\nmultiple weeks and implemented by different teams. This means the
impact\r\nper release shouldn't be significant.\r\n\r\n###
Checklist\r\n\r\n-
[x]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or tutorials\r\n- [x] [Unit
or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common scenarios\r\n\r\n__Relates:
https://github.com/elastic/kibana/issues/198716__\r\n\r\n---------\r\n\r\nCo-authored-by:
kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>","sha":"504510b92b0e92cbc173f0de517c506d2f54d536"}}]}]
BACKPORT-->

Co-authored-by: Elena Shostak <165678770+elena-shostak@users.noreply.github.com>
2025-02-03 18:59:40 +01:00
Jon
08cdfd9dcf
[9.0][codeowners] Assign kibanamachine (#209181)
to avoid backport assignments.
2025-02-03 10:14:39 -06:00
Tiago Costa
d604044b91
fix(NA): fixtures at packages/kbn-plugin-helpers/src/integration_tests/build.test.ts 2025-01-30 20:34:53 +00:00
Jean-Louis Leysens
53cba303e5
[OAS] Remove Elastic-Api-Version (#207071)
## Summary

We anticipate generating a single document per API version for the
foreseeable future. This PR updates our OAS document merging logic to
avoid adding the `Elastic-Api-Version` header to our spec.

This will also remove this header from current documentation.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-01-30 16:59:45 +01:00
Agustina Nahir Ruidiaz
1e63b5ae99
[Security Solution] [EUI Refresh] [Explore page] Migrate styled-components (#207318)
## Summary
Addresses [#206437](https://github.com/elastic/kibana/issues/206437)
This PR migrates `explore page` from `styled-components` to
`@emotion/styled`.
In the process I also convert the kbn/ui-theme json tokens to euiTheme
counterparts.



https://github.com/user-attachments/assets/f1702c0d-78f7-4e17-a8d6-c7c9ae19d3b7



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] [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>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-01-30 13:24:05 +01:00
Tre
ce1904533d
[Scout] add maps test (#204607)
## Summary

Add MapsPage to the scout core to be re-used by others.
Add rudimentary docs to show how to run these tests.
Added a `waitForRender` method.
Add test id.

---------

Co-authored-by: Robert Oskamp <traeluki@gmail.com>
Co-authored-by: Nick Partridge <nicholas.partridge@elastic.co>
Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
2025-01-30 11:55:35 +00:00
Dzmitry Lemechko
cf7debdfa3
[scout] add script to discover playwright configs in repo (#208733)
## Summary

Adding script to discover Scout playwright tests in Kibana repo, will be
used to build CI pipeline step (running tests per plugin in a separate
worker for the start). We can also consider using it to decide if code
change should trigger only specific plugin tests to run.

Usage:
```
node scripts/scout.js discover-playwright-configs --searchPaths x-pack/platform/plugins/private/discover_enhanced
```

Output:
```
 info Searching for playwright config files in the following paths:
 info - x-pack/platform/plugins/private/discover_enhanced/**/ui_tests/{playwright.config.ts,parallel.playwright.config.ts}
 info
 info Discovered playwright config files in '1' plugins
 info [discover_enhanced] plugin:
 info - x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts
 info - x-pack/platform/plugins/private/discover_enhanced/ui_tests/playwright.config.ts
```

More usage examples:
```
node scripts/scout.js discover-playwright-configs // by default will search in ['src/platform/plugins', 'x-pack/**/plugins'] and return all existing ones
node scripts/scout.js discover-playwright-configs --searchPaths x-pack/platform // platform ones under x-pack
node scripts/scout.js discover-playwright-configs --searchPaths x-pack/** // all under x-pack
```
2025-01-30 09:42:15 +01:00
Abhishek Bhatia
a060baee83
[Entity Analytics] [Entity Store] [API] Changes to support event.ingested as a configurable timestamp field for init and enable endpoints (#208201)
## Summary

This PR introduces support for configuring the `timestamp` field for
entity store enablement.

By default, the `timestamp` field is set to `@timestamp`, but users can
opt to use `event.ingested` or another preferred value based on their
requirements.


### Entity Store API changes

#### Entity Store enable

```
POST kbn:/api/entity_store/enable
{
  "timestampField": "event.ingested"
}
```

#### Result 

```
{
  "engines": [
    {
      "status": "started",
      "type": "user",
      "indexPattern": "",
      "filter": "",
      "fieldHistoryLength": 10,
      "timestampField": "event.ingested"
    },
    {
      "status": "started",
      "type": "host",
      "indexPattern": "",
      "filter": "",
      "fieldHistoryLength": 10,
      "timestampField": "event.ingested"
    },
    {
      "status": "started",
      "type": "universal",
      "indexPattern": "",
      "filter": "",
      "fieldHistoryLength": 10,
      "timestampField": "event.ingested"
    }
  ],
  "status": "running"
}
```

```
POST kbn:/api/entity_store/enable
{
}
```
#### Result

```
{
  "engines": [
    {
      "status": "started",
      "type": "host",
      "indexPattern": "",
      "filter": "",
      "fieldHistoryLength": 10,
      "timestampField": "@timestamp"
    },
    {
      "status": "started",
      "type": "user",
      "indexPattern": "",
      "filter": "",
      "fieldHistoryLength": 10,
      "timestampField": "@timestamp"
    },
    {
      "status": "started",
      "type": "universal",
      "indexPattern": "",
      "filter": "",
      "fieldHistoryLength": 10,
      "timestampField": "@timestamp"
    }
  ],
  "status": "running"
}
```

Different entity types can have distinct `timestampField` values, as
described below:

For instance, the `host` entity uses `event.ingested` as its
`timestampField`, while other entities default to the `@timestamp`
field.

```
POST kbn:/api/entity_store/engines/host/init
{
  "timestampField": "event.ingested"
}

POST kbn:/api/entity_store/engines/user/init
{
}
```

#### Result

```
{
  "engines": [
    {
      "status": "started",
      "type": "universal",
      "indexPattern": "",
      "filter": "",
      "fieldHistoryLength": 10,
      "timestampField": "@timestamp"
    },
    {
      "status": "started",
      "type": "host",
      "indexPattern": "",
      "filter": "",
      "fieldHistoryLength": 10,
      "timestampField": "event.ingested"
    },
    {
      "status": "started",
      "type": "user",
      "indexPattern": "",
      "filter": "",
      "fieldHistoryLength": 10,
      "timestampField": "@timestamp"
    }
  ],
  "status": "running"
}
```


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)


### Testing steps

- Check out this PR branch.
- Start Kibana.
- Avoid enabling the Entity Store from the UI initially. Instead, enable
it via the API by following the steps outlined below.

```
DELETE kbn:/api/entity_store/engines/user
DELETE kbn:/api/entity_store/engines/host

GET kbn:/api/entity_store/status

 All engines with the same timestamp Field
POST kbn:/api/entity_store/enable
{
  "timestampField": "event.ingested"
}

# All engines with the same timestamp Field
POST kbn:/api/entity_store/enable
{
}

# Different entity with different timestamp Field
POST kbn:/api/entity_store/engines/host/init
{
  "timestampField": "event.ingested"
}

POST kbn:/api/entity_store/engines/user/init
{
}
```

4. Afterward, you can test the functionality through the UI. First,
clear the entity data from the UI, then start the Entity Store. Note
that the UI currently does not offer a way to configure this parameter.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Mark Hopkin <mark.hopkin@elastic.co>
2025-01-29 16:49:13 -07:00