Commit graph

84684 commits

Author SHA1 Message Date
Khristinin Nikita
b0ad5424b2
Use search after for finding gaps (#211040)
## Use search after for finding gaps

Issue: https://github.com/elastic/security-team/issues/11860

To be able process more than 10.000 gaps per rule in one update cycle we
need to implement search after loop for all gaps.

For the API I keep from and size method, as it's much for client to use.

<img width="1250" alt="Screenshot 2025-02-17 at 15 25 27"
src="https://github.com/user-attachments/assets/806b2245-8aad-4960-84f4-d2a2818a4a12"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-07 10:23:37 +01:00
Jen Huang
555ed1901a
[UII] Remove scss usage (#213281)
## Summary

Part of https://github.com/elastic/kibana-team/issues/1417.

Removes Fleet's single usage of an `.scss` file to control page tab
position for integration details page. Replaces it with a passed down
css prop, UI looks the same:

<img width="1346" alt="image"
src="https://github.com/user-attachments/assets/b9d545b5-d062-4cde-9ace-6fdfe21376cd"
/>

### Checklist

- [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)
2025-03-07 09:51:45 +01:00
Charlotte Alexandra Wilson
c03b8bc661
Criticality badge medium impact bug / typo fixed (#213456)
## Summary

This PR fixes the colour on medium impact showing on asset criticality
badges across alerts table.


### Reproduce Bug
1. Kibana latest version 
2. Generate entity store data 
3. navigate to alerts page, with alerts generated 
4. Look at host criticality and user criticality columns
5. Observe that, the badges for these columns are transparent. Hover
over to see details.

### Screenshot: Bug


![image](https://github.com/user-attachments/assets/79796b92-18e8-4f58-b781-f82c0aeea463)


### Testing Fix 
Same steps as above, but with this PR, observe that the badged for
medium impact now have the relevent colouring enabled.

### Screenshots: Fix in Place

Host Criticality, Dark Theme             |  User Criticality, Dark Theme
:-------------------------:|:-------------------------:

!![image](https://github.com/user-attachments/assets/34ae6647-8333-4dd6-a3e7-24389ce4f3ea)
|
![image](https://github.com/user-attachments/assets/63045bdb-52a6-433b-b941-8c04e6242768)

Host Criticality, Light Theme | User Criticality, Light Theme
:-------------------------:|:-------------------------:

!![image](https://github.com/user-attachments/assets/8a1e6410-c565-4fc1-9829-bb4144f08cc8)
|
![image](https://github.com/user-attachments/assets/e8af0152-bfa3-4296-88ba-25fdf2624f38)
2025-03-07 08:31:54 +00:00
Kibana Machine
6b764fb414
[api-docs] 2025-03-07 Daily api_docs build (#213514)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1004
2025-03-07 08:26:06 +01:00
Stratoula Kalafateli
1c8cb1b2e4
[ES|QL] Updates the validation json (#213322)
## Summary

Updates the validation json. (I forgot to do it when I added _score in
the json)
2025-03-07 08:16:49 +01:00
Viduni Wickramarachchi
6bb27b0400
[Obs AI Assistant] Improve error handling in the evaluation framework (#212991)
Closes https://github.com/elastic/obs-ai-assistant-team/issues/196

## Summary

This PR implements the follows:
- Slightly increase the backoff delay for `429` errors
- Improve `convertMessagesForInference` to surface errors related to
function calls
- Improve the KB retrieval scenario criteria

### Checklist

- [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)
2025-03-06 19:59:44 -05:00
Robert Jaszczurek
0210468548
[ML] Anomaly Explorer: Prevent crash on anomaly table filter (#213075)
Fix for: https://github.com/elastic/kibana/issues/212569
From what I found, the issue was with the `useUrlStateService` after
changes introduced in https://github.com/elastic/kibana/pull/203224,
which made the service more generic.

When filtering causes the `explorer` to remount the `AnomaliesTable`,
pagination state updates are triggered before the effect that sets
`setCallback.current` executes.

Initializing the ref with `setState` ensures its availability from the
first render.


https://github.com/user-attachments/assets/d1aa8409-56e5-4632-a5f2-82350b877db6
2025-03-07 00:18:49 +01:00
Paulo Silva
3fdb04d294
[Asset Inventory] Initializing onboarding screen (#213302)
## Summary

It closes https://github.com/elastic/kibana/issues/210714

This PR adds the Initializing screen shown during the initialization
step of the Asset Inventory onboarding.

## Recording


https://github.com/user-attachments/assets/01631884-60bb-417c-9f36-3b37ca8de4a4
2025-03-06 14:13:08 -08:00
Tiago Costa
b6c768e408
skip flaky suite (#213370) 2025-03-06 21:12:45 +00:00
Michael Olorunnisola
4abf1a151e
[Bug][Security Solution] - Reliably persist dataview selections for timeline (#211343)
resolves https://github.com/elastic/kibana/issues/198944

## Summary

Currently, the redux store can become out of sync with the state in the
UI, leading to the selected dataview not being preserved in the store,
and thereby not being saved when the timeline is saved. This PR sets the
selected dataview and patterns at the point of saving to ensure that
they are set and not overriden.

For additional background, see referenced issues.
2025-03-06 16:09:22 -05:00
Davis McPhee
ccae358d37
[Discover] Replace DiscoverInternalStateContainer with Redux based InternalStateStore (#208784)
## Summary

This PR replaces Discover's current `DiscoverInternalStateContainer`
(based on Kibana's custom `ReduxLikeStateContainer`) with an actual
Redux store using Redux Toolkit. It's the first step toward migrating
all of Discover's state management to Redux as part of the Discover tabs
project.

Part of #210160.
Resolves #213304.

### Checklist

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This 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.
- [ ] [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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-06 17:08:58 -04:00
Yngrid Coello
989cf1ec34
[Logs] using All logs dataview in LOGS_LOCATOR (#211549)
Closes https://github.com/elastic/kibana/issues/209122.

### 🎥  Demo


https://github.com/user-attachments/assets/34d8b544-3ff6-4332-8856-57014fb1fc8a

### How to test?
1. Ingest some data using `logs_and_metrics` synthtrace scenario
2. Go to `/app/observability/overview` or `app/metrics/hosts`
3. Click `logs` link
4. You should be redirected to discover and `All logs` should be set by
default

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-06 21:38:00 +01:00
Jill Guyonnet
bdbc2ef43f
[Fleet] Add retry logic to automatic agent upgrades (#212744)
## Summary

Relates https://github.com/elastic/ingest-dev/issues/4720

This PR adds retry logic to the task that handles automatic agent
upgrades originally implemented in
https://github.com/elastic/kibana/pull/211019.

Complementary fleet-server change which sets the agent's
`upgrade_attempts` to `null` once the upgrade is complete.:
https://github.com/elastic/fleet-server/pull/4528

### Approach

- A new `upgrade_attempts` property is added to agents and stored in the
agent doc (ES mapping update in
https://github.com/elastic/elasticsearch/pull/123256).
- When a bulk upgrade action is sent from the automatic upgrade task, it
pushes the timestamp of the upgrade to the affected agents'
`upgrade_attempts`.
- The default retry delays are `['30m', '1h', '2h', '4h', '8h', '16h',
'24h']` and can be overridden with the new
`xpack.fleet.autoUpgrades.retryDelays` setting.
- On every run, the automatic upgrade task will first process retries
and then query more agents if necessary (cf.
https://github.com/elastic/ingest-dev/issues/4720#issuecomment-2671660795).
- Once an agent has completed and failed the max retries defined by the
retry delays array, it is no longer retried.

### Testing

The ES query for fetching agents with existing `upgrade_attempts` needs
the updated mappings, so it might be necessary to pull the latest `main`
in the `elasticsearch` repo and run `yarn es source` instead of `yarn es
snapshot` (requires an up-to-date Java environment, currently 23).

In order to test that `upgrade_attempts` is set to `null` when the
upgrade is complete, fleet-server should be run in dev using the change
in https://github.com/elastic/fleet-server/pull/4528.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [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)

### Identify risks

Low probability risk of incorrectly triggering agent upgrades. This
feature is currently behind the `enableAutomaticAgentUpgrades` feature
flag.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-06 21:31:24 +01:00
Steph Milovic
1531849d6f
[Stack Connectors] Add organizationId and projectId OpenAI headers, along with arbitrary headers (#213117) 2025-03-06 12:59:15 -07:00
Steph Milovic
5b8fd8f5c7
[Security AI Assistant] Bedrock prompt updates (#213160) 2025-03-06 12:58:26 -07:00
Dmitrii Shevchenko
87e7cd94d1
[Security Solution] Account for missing base rule versions in is_customized calculation (#213250)
**Partially addresses: https://github.com/elastic/kibana/issues/210358**

## Summary

### Editing of prebuilt rules with missing base versions

**When the base version** of a currently installed prebuilt rule **is missing** among the `security-rule` asset saved objects, and the user edits this rule:

- We should mark the rule as customized, only if the new rule settings are different from the current rule settings.
  - For example, adding a new tag should mark the rule as customized. Then, if the user removes this tag, the rule should remain to be marked as customized. This matches the current behavior.
  - However, if the user saves the rule without making any changes to it, it should keep its `is_customized` field as is. This is different from the current behavior.

### Importing of prebuilt rules with missing base versions

**When the base version** of a prebuilt rule that is being imported **is missing** among the `security-rule` asset saved objects, and the user imports this rule:

- If this rule is not installed, it should be created with `is_customized` field set to `false`.
- If this rule is already installed, it should be updated.
  - Its `is_customized` field should be set to `true` if the rule from the import payload is not equal to the installed rule.
  - Its `is_customized` field should be be kept unchanged (`false` or `true`) if the rule from the import payload is equal to the installed rule.
2025-03-06 19:22:17 +01:00
Joe Reuter
a81e692556
🌊 Streams: Move routing into wired object in the API (#213121)
Since we decided we don't want to provide routing for classic streams,
it doesn't make sense to be on the level of the ingest stream in the
API. This PR moves routing next to fields to make clear that it's only
supported for wired streams.
2025-03-06 18:52:09 +01:00
Kibana Machine
20ec004a95 skip failing test suite (#207024) 2025-03-07 04:51:46 +11:00
Kibana Machine
508f4f4eb5 skip failing test suite (#213300) 2025-03-07 04:50:43 +11:00
Ersin Erdal
2bf0827fc6
Add pendingRecoveredCount field to AAD (#212162)
This PR adds pendingRecoveredCount field to AAD as a step to make ADD
source of truth.
In the next step we can build alerts in the alerting task runner from
AAD rather than task state.
2025-03-06 18:50:03 +01:00
Nicolas Chaulet
9b729b3a6c
[Fleet] Fetch only relevant assets for package policies operation (#213267) 2025-03-06 18:48:15 +01:00
Bailey Cash
34fa3135a2
[Obs-UX-Mgmt] Split Up SLO Details from Overview (#212826)
## Summary 

In an effort to make SLI charts more quickly visible on the SLO overview
page, remove SLO details that do not give users valuable insight into
key metrics and add them to a new tab. Retain some of the SLO details
above the tabs like SLI value, tags, and description (see figma for the
inspiration)


https://www.figma.com/design/91R0OtRZHy5xvaE8dGStBo/SLO%2FSLI-assets?node-id=4601-59103&t=K1vI6qtXbb48XPgr-1

<img width="1474" alt="Screenshot 2025-02-28 at 4 53 05 PM"
src="https://github.com/user-attachments/assets/3fdbe766-4047-45b5-a986-3a029c09bd1f"
/>

![Screenshot 2025-03-06 at 9 54
37 AM](https://github.com/user-attachments/assets/c3ab0bc7-5187-42d4-bf29-48865dd759e2)


## Release Notes

SLO overview should give users a clear, immediate picture into key
objective data. Previously, the user would have had to scroll past
static data that describes the SLO definition before seeing valuable
information about their SLIs. This static data has been moved to a
separate tab, making charts more easily accessible.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-06 12:43:57 -05:00
Colleen McGinnis
65a41a6b96
[docs] Fix external links (#213437)
Fix external links that incorrectly use `.md` instead of `.html`.
2025-03-06 17:42:56 +00:00
Maxim Palenov
f2077dbb31
[Security Solution] Allow bulk upgrade rules with solvable conflicts (#213285)
**Partially addresses:** https://github.com/elastic/kibana/issues/210358

## Summary
 
This PR implements functionality allowing users to bulk upgrade rules with solvable conflicts.

## Details

The main focus of this PR is to allow users to bulk upgrade rules with solvable conflicts. To achieve that the following was done

- `upgrade/_perform` dry run functionality was extended to take into account rule upgrade specifiers with resolved value
- `upgrade/_perform`'s `on_conflict` param was extended with `UPGRADE_SOLVABLE` to allow bulk upgrading rules with solvable conflicts
- UI logic updated accordingly to display rule upgrade modal when users have to make a choice to upgrade only rules without conflicts or upgrade also rules with solvable conflicts
- conflict state badges were added to the rule upgrade table

It includes changes from https://github.com/elastic/kibana/pull/213027 with some modifications.

## Screenshots

<img width="1723" alt="Screenshot 2025-03-06 at 12 13 04" src="https://github.com/user-attachments/assets/b786e813-268d-49a2-80cc-81fa95d14e85" />
<img width="1724" alt="Screenshot 2025-03-06 at 12 13 30" src="https://github.com/user-attachments/assets/e5e38bd9-78a3-4026-a7ea-892bd7153938" />
<img width="1723" alt="Screenshot 2025-03-06 at 12 13 51" src="https://github.com/user-attachments/assets/d58872c3-f197-49ad-b4f3-5f45fb1efac2" />
<img width="1723" alt="Screenshot 2025-03-06 at 12 14 04" src="https://github.com/user-attachments/assets/667a6ab2-2fdb-430d-9589-1c4a6e5cdc8b" />
<img width="1722" alt="Screenshot 2025-03-06 at 12 14 17" src="https://github.com/user-attachments/assets/07f4cffe-4398-4fd5-8350-a3a2978d7dcd" />
2025-03-06 18:39:58 +01:00
Dzmitry Lemechko
d958fa97e4
[scout] improve logs readability by using unique logger context per playwright worker (#213218)
## Summary

Part of #203591

Our current logs are confusing as it is unclear to which worker message
is related. E.g.

```
 proc [playwright]  debg [scout] Creating new local SAML session for role 'admin'
 proc [playwright]  debg [scout] Creating new local SAML session for role 'admin'
```

it is not clear if the messages are coming from the same worker or 2
different ones.

Before
```
[chromium] › error_handling.spec.ts:30:12 › Discover app - errors › should render invalid scripted field error @ess
 debg [scout] applying update to kibana config: {"timepicker:timeDefaults":"{ \"from\": \"2015-09-19T06:31:44.000Z\", \"to\": \"2015-09-23T18:31:44.000Z\"}"}
 debg [scout] Requesting url (redacted): [http://localhost:5620/s/test-space-0/internal/kibana/settings]
 debg [scout] scoutSpace:test-space-0 'uiSettings.setDefaultTime' took 116.66ms
...
 debg [scout] [service] browserAuth
 debg [scout] Creating new local SAML session for role 'viewer'
[chromium] › saved_searches.spec.ts:66:14 › Discover app - saved searches › should customize time range on dashboards @ess @svlSearch @svlOblt
 succ [scout] import success
 debg [scout] scoutSpace:test-space-1 'savedObjects.load' took 1028.17ms
 ...
 debg [scout] [service] browserAuth
 debg [scout] Creating new local SAML session for role 'editor'
 debg [scout] [service] scoutPage:test-space-1
 debg [scout] [service] pageObjects:test-space-1
```


After:

```
[chromium] › error_handling.spec.ts:30:12 › Discover app - errors › should render invalid scripted field error @ess
 debg [scout-worker-1] applying update to kibana config: {"timepicker:timeDefaults":"{ \"from\": \"2015-09-19T06:31:44.000Z\", \"to\": \"2015-09-23T18:31:44.000Z\"}"}
 debg [scout-worker-1] Requesting url (redacted): [http://localhost:5620/s/test-space-1/internal/kibana/settings]
 debg [scout-worker-1] test-space-1: 'uiSettings.setDefaultTime' took 131.30ms
...
 debg [scout-worker-1] [browserAuth] loaded
 debg [scout-worker-1] Creating new local SAML session for role 'viewer'
[chromium] › saved_searches.spec.ts:66:14 › Discover app - saved searches › should customize time range on dashboards @ess @svlSearch @svlOblt
 debg [scout-worker-2] test-space-2: 'savedObjects.load' took 1005.91ms
...
 debg [scout-worker-2] [browserAuth] loaded
 debg [scout-worker-2] Creating new local SAML session for role 'editor'
 debg [scout-worker-2] [scoutPage] loaded
 debg [scout-worker-2] [pageObjects] loaded
```

**Note**: single thread run will log under `[scout-worker]` context

How to verify:

1) start servers - `node scripts/scout.js start-server --stateful`
2) run tests - `npx playwright test --config
x-pack/platform/plugins/private/discover_enhanced/ui_tests/parallel.playwright.config.ts`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-06 18:36:11 +01:00
elastic-renovate-prod[bot]
f4ff56d3d4
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 6dcddd8 (main) (#213333)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `15a4191` ->
`6dcddd8` |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOk9wZXJhdGlvbnMiLCJiYWNrcG9ydDpza2lwIiwicmVsZWFzZV9ub3RlOnNraXAiXX0=-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-03-06 11:21:48 -06:00
Jonathan Budzenski
e30b78eb6d fix skip failing test suite (#211517, #213290) 2025-03-06 10:32:57 -06:00
Shahzad
33f51f6d6e
[SLOs] Allow slo query wild card filters !! (#213119)
## Summary

Allow slo query wild card filters when kql filter and dsl filter both
are used.

For KQL filter, allowLeadingWildcards was true by default. introduces
the ability to use wildcard filters in SLO queries when DSL filters are
also used.

### Changes Made
1. **Updated `getElasticsearchQueryOrThrow` function:**
- Added support for `dataView` parameter in the `toElasticsearchQuery`
function.
   - Included additional options for `allowLeadingWildcards`.
- Enhanced error handling to differentiate between invalid KQL and KQL
queries with invalid filters.

2. **Test Coverage:**
- Added new test cases to cover scenarios with wildcard queries and
filters.
2025-03-06 17:45:23 +01:00
Julia Rechkunova
263b85a8b9
[Discover Tabs] Add tab menu (#213106)
- Closes #210503 

## Summary

This PR adds TabMenu component and implements the following actions:
- Duplicate
- Close other tabs
- Close tabs to the right

<img width="819" alt="Screenshot 2025-03-04 at 17 44 37"
src="https://github.com/user-attachments/assets/c40cd791-f057-405d-b0bc-b12159a9ca5b"
/>

## Testing

Two options are possible:

1. start Storybook with `yarn storybook unified_tabs` and navigate to
`http://localhost:9001`.
2. start Kibana with `yarn start --run-examples`. Then navigate to the
Unified Tabs example plugin
`http://localhost:5601/app/unifiedTabsExamples`.


### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-03-06 17:39:24 +01:00
elastic-renovate-prod[bot]
a9ed518545
Update dependency msw to ~2.7.3 (main) (#212976)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [msw](https://mswjs.io)
([source](https://redirect.github.com/mswjs/msw)) | devDependencies |
patch | [`~2.7.2` ->
`~2.7.3`](https://renovatebot.com/diffs/npm/msw/2.7.3/2.7.3) |

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://redirect.github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMDcuMCIsInVwZGF0ZWRJblZlciI6IjM5LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOkNsb3VkIFNlY3VyaXR5IiwiYmFja3BvcnQ6YWxsLW9wZW4iLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2025-03-06 11:28:40 -05:00
Nikita Indik
ebe90e5c80
[Security Solution] Allow prebuilt rules import and export (#212509)
**Resolves: https://github.com/elastic/security-team/issues/11502**
(internal)

This PR implements following changes and adds API integration tests for
them:
- [x] Users with any license can export prebuilt rules (with enabled
feature flag)
- [x] Users with Basic/Essentials license can import prebuilt rules only
if they are non-customized and the feature flag is enabled
- [x] Users with Enterprise/Complete license can import prebuilt rules
without restrictions

Flaky test runner (had to create 4 separate runs to test all configs):
-
[1](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7987)
-
[2](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7986)
-
[3](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7988)
-
[4](https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/7989)
2025-03-06 16:58:33 +01:00
Angela Chuang
56ea5cced3
[SecuritySolution] Register AI Assistant management settings according to productFeatureKeys (#213105)
## Summary

Fixes: https://github.com/elastic/kibana/issues/212667

AI Assistant management is registered according to `productFeatureKeys`
set by security_solution_ess or security_solution_serverless plugin.

To verify:

- Security project

```
yarn es serverless --projectType security --kill --clean -E  —ssl xpack.security.authc.api_key.enabled=true
yarn serverless-security --no-base-path
```

Update xpack.securitySolutionServerless.productTypes in
config/serverless.security.yml to switch between `essentials` and
`complete` tier

Project essentials:

<img width="2140" alt="Screenshot 2025-03-04 at 17 05 59"
src="https://github.com/user-attachments/assets/c2df5d20-a0f8-4ee4-82d3-b04a47a47f53"
/>

Project complete:

<img width="2199" alt="Screenshot 2025-03-04 at 17 07 16"
src="https://github.com/user-attachments/assets/0e6f0c5d-f318-4db8-925b-01e46ed76a7b"
/>


- ESS 

License trial and enterprise:

```
yarn es snapshot --license trial -E xpack.security.authc.api_key.enabled=true -E discovery.type=single-node -E network.host=0.0.0.0

```



https://github.com/user-attachments/assets/1771f51b-7b48-46e5-8bf6-3918c6e913c5


License basic and others:

```
yarn es snapshot --license basic -E xpack.security.authc.api_key.enabled=true -E discovery.type=single-node -E network.host=0.0.0.0

```



https://github.com/user-attachments/assets/fe00454c-10f6-4862-8eca-03179431ea6c

---------

Co-authored-by: Sergi Massaneda <sergi.massaneda@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-06 16:46:09 +01:00
Nick Peihl
d2412a5f98
[Dev Docs] Add VS Code configurations to Dev Docs Debugging Tutorial (#212807)
## Summary

Adds to the Dev Docs Debugging tutorial suggested configurations for VS
Code users for debugging Kibana server code, Jest unit tests, and
functional tests.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [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)
2025-03-06 10:14:19 -05:00
James Gowdy
308e1815da
[ML] File upload lite UI customizations (#213275) 2025-03-06 15:12:39 +00:00
Kibana Machine
e2ad5816d4 skip failing test suite (#213324) 2025-03-07 01:55:38 +11:00
Kevin Delemme
4107d9809d
chore(slo): Add testing plan (#213392) 2025-03-06 09:54:23 -05:00
Stratoula Kalafateli
4a8af4ca27
[ES|QL] Fixes the wrong validation when a named param is used as function (#213355)
## Summary

Fixes the bug described here
https://github.com/elastic/kibana/issues/192255#issuecomment-2684125449


<img width="1094" alt="image"
src="https://github.com/user-attachments/assets/69d4f004-6a66-416b-8aa6-e477b0380010"
/>

### Checklist

- [ ] [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
2025-03-06 15:39:44 +01:00
Kibana Machine
209afbabfc skip failing test suite (#213290) 2025-03-07 01:37:21 +11:00
Kibana Machine
fa673093a7 skip failing test suite (#213289) 2025-03-07 01:37:05 +11:00
Julia Bardi
198b99ee10
[Fleet] unskip test (#213365)
Closes https://github.com/elastic/kibana/issues/192793
Closes https://github.com/elastic/kibana/issues/192792
2025-03-06 15:20:39 +01:00
Arturo Lidueña
d2a19bd08a
fix conversation tests (#213338)
## Summary

FIX:
https://buildkite.com/elastic/appex-qa-serverless-kibana-ftr-tests/builds/4516
2025-03-06 14:48:36 +01:00
Julia Bardi
5010d1f0fa
[Fleet] fix fleet proxies test (#213350)
## Summary

Closes https://github.com/elastic/kibana/issues/207024
Closes https://github.com/elastic/kibana/issues/207022

Increased retries since the bump agent policies were made async and
takes longer than before.
2025-03-06 14:40:35 +01:00
Michael Olorunnisola
4db40eacde
[Performance][Security Solution] - Improve cell renderer performance (#212982)
## Summary

Background: https://github.com/elastic/kibana/pull/212173

Based off of feedback on the work in the PRs listed in that issue,
additional performance improvements can be made to the cells rendered in
the alert table. The changes made in this PR involve migrating out
shared context to a provider so certain hooks (some expensive... i.e.
browserFieldsByName) aren't made for every cell in the UI, but once and
passed down to each cell accordingly.


- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
2025-03-06 08:35:04 -05:00
Robert Jaszczurek
ae74cc35a9
[ML] Anomaly Explorer: Fix incorrect overall swim lane height in Anomaly Explorer (#213245)
Fix for: https://github.com/elastic/kibana/issues/211017

We were using legacy theme which introduced some margins to the chart.
However, the issue is visible from `69.1.0` (introduced in Kibana `9.0`)
version of `@elastic/charts` as they have fixed heatmap margins and
paddings - https://github.com/elastic/elastic-charts/issues/2577.

After the fix:

![image](https://github.com/user-attachments/assets/18277a20-3bf0-44b4-adde-c876086c4a01)

![image](https://github.com/user-attachments/assets/19073e4d-b600-4333-8c85-cf7939a071ac)
2025-03-06 14:33:20 +01:00
José Luis González
c67a239e45
[Search] Removing elastic managed connectors misleading content (#213335)
## Summary

Fixing misleading info noted in this GH issue ticket
https://github.com/elastic/search-team/issues/9483 regarding Elastic
managed connectors that are not available in Serverless


Connectors empty state page:

![CleanShot 2025-03-06 at 10 38
45@2x](https://github.com/user-attachments/assets/c26da5f3-ec9a-4ec0-bf6c-a50284556bbd)

Connectors list page (without the Callout banner on top):

![CleanShot 2025-03-06 at 10 41
00@2x](https://github.com/user-attachments/assets/68920905-b2d3-49b8-a2ad-a8500717e129)



### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This 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.
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...
2025-03-06 14:24:11 +01:00
jennypavlova
f195570049
[ObsUX] [APM] [OTel] Runtime metrics show dashboards with different ingest path (#211822)
Closes #211783
Part of https://github.com/elastic/kibana/issues/195857

## Summary

This PR expands the logic to get the dashboard files based on the agent.
We have many different ways to ingest data so we want to add more
metrics dashboards to the APM metrics tab. The different ingest paths we
have:
Classic APM Agent   --> APM Server       --> ES
Vanilla OTel SDKs     --> APM Server       --> ES
EDOT OTel SDKs      --> APM Server       --> ES
Classic APM Agent   --> EDOT Collector --> ES
Vanilla OTel SDKs.    --> EDOT Collector --> ES
EDOT OTel SDKs      --> EDOT Collector --> ES
We agreed on having a dashboard filename pattern to make showing the
correct dashboard easier described
[here](https://github.com/elastic/kibana/issues/195857#issue-2580733648)

First, we determine if the ingest path is through APM Server or EDOT
Collector by checking the `telemtry.sdk` fields.

## TODOs / Reviewer notes
- [ ] Currently, we have a fallback to metrics charts which is valid
only if we have APM agent so this PR adds an empty state message:
"Runtime metrics are not available for this Agent / SDK type." in case
there is no dashboard for the service language. To be improved in
https://github.com/elastic/kibana/issues/211774 and will be updated in
this PR when ready - I will still open it for review as the other logic
can be reviewed
- The dashboards are to be updated (by the agent team so not part of the
changes here)

## Testing: 
- Using e2e PoC 
- The available dashboard cases can be found in
[loadDashboardFile](91f169e19a/x-pack/solutions/observability/plugins/apm/public/components/app/metrics/static_dashboard/dashboards/dashboard_catalog.ts (L40))
- Cases to be checked:
- OTel native with Vanilla OTel SDKs with available dashboard (example
case file: `otel_native-otel_other-nodejs`, `...-java`, `...-dotnet`)
   
<img width="1903" alt="image"
src="https://github.com/user-attachments/assets/44d37b05-a8e7-4f14-a1de-2c631f1843bb"
/>

- APM server with Vanilla OTel SDKs service with available dashboard
(example case file: `classic_apm-otel_other-nodejs`, `...-java`,
`...-dotnet`)
   

![image](https://github.com/user-attachments/assets/caef88ea-2603-41ad-b815-f4c0c3647809)

- APM server with Classic APM Agent (example case file:
`classic_apm-apm-nodejs`, `...-java`)
   
<img width="962" alt="image"
src="https://github.com/user-attachments/assets/f9e96dce-55c8-467a-93f0-a09fa219597e"
/>

- OTel native with Vanilla OTel SDKs without available dashboard (empty
state case example: python service)
 

![image](https://github.com/user-attachments/assets/4cb6cca3-240e-422b-9288-701ef080f9cc)

- APM server with Vanilla OTel SDKs service without available dashboard
(empty state)
   
<img width="1910" alt="image"
src="https://github.com/user-attachments/assets/5219cf94-5013-4874-aaea-e558cca69281"
/>

- APM server with Classic APM Agent without available dashboard (Current
metrics fallback)
   
<img width="1914" alt="image"
src="https://github.com/user-attachments/assets/66342f49-876c-4ad5-a4d1-1414c3abac75"
/>

- ⚠️ OTel native Dashboards are still not available (at the time of
adding the description)

---------

Co-authored-by: Sergi Romeu <sergi.romeu@elastic.co>
Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-03-06 13:52:44 +01:00
Meghan Murphy
02c313ca06
[Connectors] A11y refocus manage button (#212157)
## Summary

As part of Accessibility requirements, a user thats using only the
keyboard should be able to know which element they are on at the moment
after closing windows. As part of that the 'Ingest Pipelines' page, the
'Manage' button now refocuses once the 'Delete Custom Pipeline' popup is
closed. See screenshots below

### Closes https://github.com/elastic/kibana/issues/196650

<img width="1437" alt="Screenshot 2025-02-21 at 3 20 47 PM"
src="https://github.com/user-attachments/assets/4fa44b18-9856-4e39-9c1b-03dd367d798b"
/>
<img width="1407" alt="Screenshot 2025-02-21 at 3 19 53 PM"
src="https://github.com/user-attachments/assets/71aa01ca-f936-47f2-909e-57f649b03ca5"
/>
<img width="1443" alt="Screenshot 2025-02-21 at 3 20 05 PM"
src="https://github.com/user-attachments/assets/f1df4d64-e4e3-440f-a833-a7b2746def60"
/>
<img width="1448" alt="Screenshot 2025-02-21 at 3 20 16 PM"
src="https://github.com/user-attachments/assets/ac5f4100-b155-417a-b453-5ba9594d06e5"
/>

Notice that the 'Manage' button is refocused

### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This 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.
- [ ] [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)

### Identify risks

Does this PR introduce any risks? For example, consider risks like hard
to test bugs, performance regression, potential of data loss.

Describe the risk, its severity, and mitigation for each identified
risk. Invite stakeholders and evaluate how to proceed before merging.

- [ ] [See some risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx)
- [ ] ...

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Rodney Norris <rodney@tattdcodemonkey.com>
2025-03-06 07:51:00 -05:00
Tomasz Kajtoch
18fa931a26
Upgrade EUI to v100.0.0 (#213292)
`99.4.0-borealis.0`  `100.0.0`

[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)

---

First of all, 💯 🎉!

> [!Warning]
> Please note that the [public changelog for EUI
v100.0.0](https://github.com/elastic/eui/releases/tag/v100.0.0) is
longer than what's included below.
>
> Kibana has been using Borealis-specific builds of EUI since November
last year (suffixed with `-borealis.X`), which were built from a
just-merged EUI feature branch.
> Since that feature branch just got merged and released with EUI
v100.0.0, **the public changelog differs from what Kibana should be
concerned about** due to updating from a custom Borealis-enabled version
of EUI.
>
> You can find the list of all (one 👀) changes made between version
`99.4.0-borealis.0` and `100.0.0` below.

## [`v100.0.0`](https://github.com/elastic/eui/releases/v100.0.0)

**Bug fixes**

- Fixed `EuiComboBox` by cleaning duplicated values when having a
delimiter prop. ([#8335](https://github.com/elastic/eui/pull/8335))

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-03-06 13:28:21 +01:00
Pablo Machado
98c18a395e
[main] [SecuritySolution] Fix risk engine component template renaming (#212853) (#213329)
# Backport

This will backport the following commits from `8.18` to `main`:
- [[SecuritySolution] Fix risk engine component template renaming
(#212853)](https://github.com/elastic/kibana/pull/212853)

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

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

<!--BACKPORT [{"author":{"name":"Pablo
Machado","email":"pablo.nevesmachado@elastic.co"},"sourceCommit":{"committedDate":"2025-03-05T09:50:31Z","message":"[SecuritySolution]
Fix risk engine component template renaming (#212853)\n\n##
Summary\n\nThe previous implementation tried to rename the index
template during\n`init` and did not consider multiple spaces. to fix it,
I have:\n* Delete the previous code from `init`\n* Created a new
migration that created the new component templates and\nupdated the
index templates\n* Deleted the old component template after all spaces
migration ran\n* Add support for multiple spaces\n* I also renamed a
function inside `init` to make the code more clear\n* Added error
handling code that concatenates error messages and logs\nall of them at
the end\n\n\n### How to test it:\n\n**Scenario 1**\n\n* The usual way to
desk test this PR would be\n* Create a cluster with 8.17\n* Enable the
risk Engine in 8.17\n* Create a new space in 8.17\n* Upgrade the cluster
to 8.18 (this branch)\n* Enable the risk engine in the second
space.\n\n**Scenario 2**\n* Create a cluster with 8.17\n* Enable the
risk engine\n* Create a space\n* Enable another risk engine\n* Create
another space\n* Upgrade the cluster to 8.18 (this branch)\n* Check if
the migration ran in the logs\n* Check if all risk engines are installed
and the index templates and\nindex components are there.\n* Install a
new risk engine in the space where it isn't installed.\n* Restart Kibana
and make sure the migrations didn't run a second time\n\n###
Checklist\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\n[ ] This PR needs to be tested for upgrades between
different versions\nand a diverse number of spaces and risk engines
installed\n\n---------\n\nCo-authored-by: abhishekbhatia1710
<abhishek.bhatia@elastic.co>","sha":"b7908a4c6f91c79459f7b509bfd444ad169d6770","branchLabelMapping":{"^v8.16.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","release_note:skip","v9.0.0","Team:
SecuritySolution","Feature:Entity Analytics","Team:Entity
Analytics","backport:version","v8.18.0","v9.1.0","v8.19.0"],"title":"[SecuritySolution]
Fix risk engine component template
renaming","number":212853,"url":"https://github.com/elastic/kibana/pull/212853","mergeCommit":{"message":"[SecuritySolution]
Fix risk engine component template renaming (#212853)\n\n##
Summary\n\nThe previous implementation tried to rename the index
template during\n`init` and did not consider multiple spaces. to fix it,
I have:\n* Delete the previous code from `init`\n* Created a new
migration that created the new component templates and\nupdated the
index templates\n* Deleted the old component template after all spaces
migration ran\n* Add support for multiple spaces\n* I also renamed a
function inside `init` to make the code more clear\n* Added error
handling code that concatenates error messages and logs\nall of them at
the end\n\n\n### How to test it:\n\n**Scenario 1**\n\n* The usual way to
desk test this PR would be\n* Create a cluster with 8.17\n* Enable the
risk Engine in 8.17\n* Create a new space in 8.17\n* Upgrade the cluster
to 8.18 (this branch)\n* Enable the risk engine in the second
space.\n\n**Scenario 2**\n* Create a cluster with 8.17\n* Enable the
risk engine\n* Create a space\n* Enable another risk engine\n* Create
another space\n* Upgrade the cluster to 8.18 (this branch)\n* Check if
the migration ran in the logs\n* Check if all risk engines are installed
and the index templates and\nindex components are there.\n* Install a
new risk engine in the space where it isn't installed.\n* Restart Kibana
and make sure the migrations didn't run a second time\n\n###
Checklist\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\n[ ] This PR needs to be tested for upgrades between
different versions\nand a diverse number of spaces and risk engines
installed\n\n---------\n\nCo-authored-by: abhishekbhatia1710
<abhishek.bhatia@elastic.co>","sha":"b7908a4c6f91c79459f7b509bfd444ad169d6770"}},"sourceBranch":"8.18","suggestedTargetBranches":["9.0","main","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":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/212853","number":212853,"mergeCommit":{"message":"[SecuritySolution]
Fix risk engine component template renaming (#212853)\n\n##
Summary\n\nThe previous implementation tried to rename the index
template during\n`init` and did not consider multiple spaces. to fix it,
I have:\n* Delete the previous code from `init`\n* Created a new
migration that created the new component templates and\nupdated the
index templates\n* Deleted the old component template after all spaces
migration ran\n* Add support for multiple spaces\n* I also renamed a
function inside `init` to make the code more clear\n* Added error
handling code that concatenates error messages and logs\nall of them at
the end\n\n\n### How to test it:\n\n**Scenario 1**\n\n* The usual way to
desk test this PR would be\n* Create a cluster with 8.17\n* Enable the
risk Engine in 8.17\n* Create a new space in 8.17\n* Upgrade the cluster
to 8.18 (this branch)\n* Enable the risk engine in the second
space.\n\n**Scenario 2**\n* Create a cluster with 8.17\n* Enable the
risk engine\n* Create a space\n* Enable another risk engine\n* Create
another space\n* Upgrade the cluster to 8.18 (this branch)\n* Check if
the migration ran in the logs\n* Check if all risk engines are installed
and the index templates and\nindex components are there.\n* Install a
new risk engine in the space where it isn't installed.\n* Restart Kibana
and make sure the migrations didn't run a second time\n\n###
Checklist\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- [x] The PR
description includes the appropriate Release Notes section,\nand the
correct `release_note:*` label is applied per
the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n\n###
Identify risks\n\n[ ] This PR needs to be tested for upgrades between
different versions\nand a diverse number of spaces and risk engines
installed\n\n---------\n\nCo-authored-by: abhishekbhatia1710
<abhishek.bhatia@elastic.co>","sha":"b7908a4c6f91c79459f7b509bfd444ad169d6770"}},{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
2025-03-06 17:19:51 +05:30
Marco Liberati
48926e5173
[Lens] Do not crash when editing a Lens chart with a by reference annotation layer (#213090)
## Summary

Fixes #212917

The root problem is belongs into the annotation layer logic to produce
the reference id for the persisted saved object.
In the previous logic a new `uuid` was generated all the time leading to
a continuous flow of `setState` calls to update the "runtime" state of
the Lens object when inline editing: the fix was to produce a stable id
in the `extractReferences` logic to avoid the re-renders.
The logic has been tweaked a bit now with some extra explanations inline
to make it more understandable.

New tests have been added to smoke test this scenario.

### Checklist

Check the PR satisfies following conditions. 

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: Nick Partridge <nick.ryan.partridge@gmail.com>
2025-03-06 12:44:30 +01:00