Commit graph

86308 commits

Author SHA1 Message Date
Søren Louv-Jansen
74e876d12d
[LockManager] Update token and metadata when an expired lock is re-acquired (#220476)
Related: https://github.com/elastic/kibana/pull/216397

This fixes a bug in the Lock Manager where an expired lock can be
acquired, but the token and metadata is not updated. This means that the
lock cannot be released. Instead it is automatically released when the
TTL expires.
2025-05-08 19:40:20 +02:00
Rodney Norris
9fc42af400
[Search] test: removing stale cypress & functional_enterprise_search references (#220446)
## Summary

Removed old cypress and functional_enterprise_search code and
references.

They should have been removed for 9.0 but fell through the cracks.

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-05-08 12:33:09 -05:00
Rodney Norris
06c7c434f4
[Search] Stateful Navigation Tests (#220419)
## Summary

- Fixes https://github.com/elastic/kibana/issues/203607 🤞 
- Refactored classic navigation FTRs to wait on page to load between
changing pages
- Updated classic nav expected items for current apps
- Updated solution navigation tests to match classic & serverless test
case objects
- Updated solution nav `expectOnlyDefinedLinks` to be strict on index of
expected items. This tests _should_ fail when we move a side nav item,
but it wasn't as written.

### 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] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-05-08 13:32:25 -04:00
Candace Park
76e256ccff
[Security Solution][Endpoint Exceptions] Fixes bug where behavior alerts do not show nested code signatures with subject name and trusted field (#212325)
## Summary

When navigating to the endpoint exceptions form from an alert, we
pre-populate certain exceptions fields based on the type of alert. There
was a bug for behavior alerts where we did not use the proper nested
`code_signature` field for windows and mac endpoints. Instead of showing
the nested `code_signature` field that has the `subject_name` and
`trusted` sub-fields, we only showed non-nested `code_signature subject
field. This PR also refactors the code to account for the following
behaviors that we want:
- [x] If `field.Ext.code_signature` is present, we want to use the
nested `code_signature` subject field with the `subject_name` and
`trusted` sub-fields for
- [x] If `field.Ext.code_signature` is not present, we will default to
the non-nested `field.code_signature.subject_name` and
`field.code_signature.trusted` field pair.
- [x] We will only show non-empty pre-populated values and also only
code signature values with the `trusted` field set to `true`
- [x] Pre-populated code signature fields are only present in windows
and mac OSes.
- [x] Behavior, ransomware and default alerts had the code_signature
adjustments
- [x] Previously the code duplicated a set of the pre-populated fields
PER code signature. Now, each pre-populated field is only shown once,
followed by all valid code_signatures.
- [x] Does not allow duplicate code signatures  



# SCREENSHOTS 

Behavior alert w/ nested `process.Ext.code_signature` and non-nested
`dll.code_signature` fields

![nested](https://github.com/user-attachments/assets/218f140e-21ee-40a5-8198-c37c474088a8)

Malware alert w/ nested `file.Ext.code_signature`
<img width="1281" alt="image"
src="https://github.com/user-attachments/assets/4845c6e5-5567-49df-b66a-1b9a2e6410db"
/>

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-05-08 13:22:42 -04:00
Alberto Blázquez
8d50c08a43
Align Chart and SearchBar styling with Figma in Asset Inventory (#220257)
## Summary

Closes:
- https://github.com/elastic/kibana/issues/219309

Improves the styling of the containers around the bar chart and the data
table in the Asset Inventory page.

> [!NOTE]
> The UI doesn't 100% match the [Figma
file](https://www.figma.com/design/9zUqAhhglT1EGYG4LOl1X6/Asset-Inventory---Management--AIM-?node-id=5345-22759&t=kM981n3f9OHhKJiT-0)
because design doesn't reuse EUI tokens in some cases. However, I tried
to get as close as possible while reusing our styling library.

### Chart screenshots

<details><summary>Implementation Before</summary>
<img width="1810" alt="_impl_before"
src="https://github.com/user-attachments/assets/0af4e2a4-2306-462c-99f8-7f87a3d12aee"
/>
</details>

<details><summary>Design</summary>
<img width="1349" alt="_design"
src="https://github.com/user-attachments/assets/eef74a20-46e3-405e-a17f-64eed13ada22"
/>
</details>

<details><summary>Implementation After</summary>
<img width="1259" alt="Screenshot 2025-05-07 at 12 04 34"
src="https://github.com/user-attachments/assets/414b5775-a96e-4b82-bd75-84f57a33ae5f"
/>
</details>

### SearchBar screenshots

<details><summary>Implementation Before</summary>
<img width="853" alt="Screenshot 2025-05-07 at 12 59 44"
src="https://github.com/user-attachments/assets/e2535bb2-8094-47f9-9462-dbc4220b9705"
/>
</details>

<details><summary>Implementation After</summary>
<img width="853" alt="Screenshot 2025-05-07 at 12 59 19"
src="https://github.com/user-attachments/assets/d697f321-260f-48be-aca0-6f290f4d0855"
/>
</details>

### 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
- [ ] [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)
- [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.
- [ ] [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

No risks.
2025-05-08 13:20:21 -04:00
Justin Kambic
6a8deddadc
[Shared UX] Omit Uptime integration/tutorial on Serverless (#213291)
## Summary

Resolves #211945.

Uptime is not available on Serverless projects, so we are seeking to
remove the tutorial and the integration search result.

To achieve this, I added an optional `omitServerless` field to the
tutorial spec and implemented it on the Uptime tutorial spec. I added
additional filtering to the registration procedures, and referenced the
`buildFlavor` in the plugin's setup code.

_NOTE:_ This resolves #211945, but if this solution is not acceptable to
the maintainers please advise me on a better approach.

Example:

<img width="898" alt="image"
src="https://github.com/user-attachments/assets/5ebd52a0-b8e8-4198-9a92-d67fa4ad0ff4"
/>

<img width="696" alt="image"
src="https://github.com/user-attachments/assets/b2b1ec65-6353-4415-a55f-33ac9f7977fe"
/>
2025-05-08 12:45:53 -04:00
Eyo O. Eyo
29a1ddec60
reworks condition for matching chromium build trigger label to accommodate collaborators (#220542)
## Summary

Adds support for collaborators alongside members of the elastic
organisation

<!--
### 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-05-08 18:14:46 +02:00
Drew Tate
f5df2cb089
[ES|QL] Add bucket signatures (#220442)
## Summary

Fixes a validation bug:

https://github.com/elastic/kibana/issues/192255#issuecomment-2853473194

Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-05-08 11:55:43 -04:00
Tiago Costa
a4d52fc3d1
skip flaky suite (#220379) 2025-05-08 16:44:46 +01:00
elastic-renovate-prod[bot]
4dd8e6ee51
Update Mustache to v4 (main) (#206184)
updates the `mustache` package from `^2.3.2` to `^4.2.0`, as well as the associated types package
2025-05-08 11:43:36 -04:00
Alex Szabo
6f0ddfc68f
[actions] use main branch for label-to-field mapping script (#220534)
## Summary
When testing the script (https://github.com/elastic/kibana/pull/212783),
I was using a branch to test the script - it should have been reset to
`main`.
2025-05-08 17:41:10 +02:00
elastic-renovate-prod[bot]
0ab9815288
Update dependency @redocly/cli to ^1.34.3 (main) (#220499)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-05-08 17:27:42 +02:00
Edgar Santos
0544125709
Expose frozen indices information on the rule health endpoint (#219703)
## Summary
This is a follow up PR to expose the metric
`frozen_indices_queried_max_count` on the rule healthcheck endpoint.
This metric is an aggregation of the metric
`frozen_indices_queried_count` which is calculated upon rule execution.
Refer to [this PR](https://github.com/elastic/kibana/pull/218435) to see
more details about it.

## How to test this?
- Run Elastic locally with these additional parameters in order to
enable the frozen data tier: -E path.repo="/tmp" -E
xpack.searchable.snapshot.shared_cache.size=20GB.
- Use [this
tutorial](https://docs.elastic.dev/security-soution/analyst-experience-team/eng-prod/how-to/configure-local-frozen-tier)
to create the snapshot repository and an ILM policy. You can disable
rollover for the ILM policy and configure indices to be moved to frozen
after 0 days.
- Create an index manually and populate it with a couple of documents.
- Assign the ILM policy to the index you created in the previous step
and wait for it to be rolled to frozen. You can run this command to
speed up the process:
```
PUT /_cluster/settings
{
  "persistent": {
    "indices.lifecycle.poll_interval": "10s"
  }
}
```
You can confirm that the index is indeed in frozen by calling
```
GET <YOUR_IDX_HERE>/_ilm/explain
```
`phase` should be `frozen` and `step` should be `complete`.
- Create a rule querying the frozen index.
- Call the rule health endpoint with:
```
curl -X POST --user elastic:changeme "http://localhost:5601/internal/detection_engine/health/_rule?date_start=2025-04-29T09:07:39.489Z&date_end=2025-05-01T09:08:39.489Z" \
  -H "Content-Type: application/json" \
  -H "elastic-api-version: 1" \
  -H 'kbn-xsrf: 123' \
  -H "x-elastic-internal-origin: Kibana" \
  --data '{"rule_id":"2f9780b5-7819-4685-ab8e-d817d3701d10"}'
```
You should see `frozen_indices_queried_max_count` populated with `1`.
2025-05-08 17:11:38 +02:00
Paul Tavares
c511d2e03a
[Security Solution][Endpoint] Update background tasks for automated response actions and completing 3rd party EDR actions to support spaces (#219978)
## Summary

The following changes were done in support of Endpoint space awareness:

- The background task that checks and completes pending 3rd party
response actions was updated to ensure that action are completed using a
response actions client scoped to the space that the response action was
created from.
- The automated response actions process was updated to use the alert's
space ID when retrieving a response action client
2025-05-08 10:53:09 -04:00
Eyo O. Eyo
e5a4102447
reworks condition for matching chromium build trigger label (#220518)
## Summary

This PR reworks the condition for triggering chromium build, previously
we'd expected the issue label to simply match `trigger-chromium-build`
however now we [search on all the
labels](https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/evaluate-expressions-in-workflows-and-actions#example-using-an-object-filter)
the issue is tagged with for a match. Hopefully this resolves our issue
with runs that should not be skipped getting skipped.

<!--

### 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-05-08 14:37:52 +00:00
Edu González de la Herrán
802c791655
release notes security advisor message added to 9.0.1 release notes (#220498)
Updating release notes for 9.0.1 (docs V3) in main branch.

Not sure how we plan to deal with the security advisor messages in the
release notes in the new docs system, considering the release notes page
include a generic message at the beginning pointing to the security
advisory board.

Also I'm not totally sure if this needs to be merged into any other
branch, I'll let @wajihaparvez and @florent-leborgne to determine how
this should be done, and approve or reject the PR.
2025-05-08 10:25:42 -04:00
Dmitrii Shevchenko
e67a791b88
[AI4SOC] Remove links to the rule management page (#220488)
## Summary

As we discussed, the rules management page should be excluded in AI4SOC.
Removing links to the rule details page from the rule tables:


![image](https://github.com/user-attachments/assets/d7abfbd9-4fb7-400c-97b6-775dfdf1262d)
2025-05-08 16:13:27 +02:00
Ying Mao
25a873c86c
[Response Ops][Reporting] Updating health API to return whether notification email service is available (#219785)
## Summary

Updates the internal reporting health API from
https://github.com/elastic/kibana/pull/216857 to return whether the
notification email service is available. We'll be using this
notification email service to send the scheduled report notifications so
this lets us know if that service is available.

```
GET kbn:/internal/reporting/_health

Response 
{
  "has_permanent_encryption_key": true,
  "is_sufficiently_secure": true,
  "are_notifications_enabled": true
}
```

## To Verify
1. Run kibana and ES with a preconfigured email connector in the
`kibana.yml` and the notification configured to use the connector

```
notifications.connectors.default.email: gmail
xpack.actions.preconfigured:
  gmail:
    name: 'email: my gmail'
    actionTypeId: '.email'
    config:
      <config>
    secrets:
      <secrets>
```
2. Access the health API, `are_notifications_enabled` should be `true`
3. Remove the config and restart Kibana
4. Access the health API, `are_notifications_enabled` should be `false`

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-05-08 10:11:53 -04:00
Alex Prozorov
f94f1172aa
[Cloud Security] add handling of non existing fields in the grouping query builder logic (#220023)
## Summary
This PR should fix the following issue:
https://github.com/elastic/kibana/issues/220022
The issue opened contains two bugs:
1. an issue when trying to group by field which is missing in one or
more of the fetched documents - causing the query to fail.
2. duplication of documents with more than 100 values in a specific
field - they are part of the none-group which is correct and also part
of any other group containing one or more of the values which they
shouldn't be.


### Checklist

Check the PR satisfies following conditions. 

Reviewers should verify this PR satisfies this list as well.
- [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

### Recordings
**Before fix**


https://github.com/user-attachments/assets/0109ddba-ef0d-456b-865e-5c52883dc04a

**After fix**


https://github.com/user-attachments/assets/f8b4e1d7-2be4-4b28-8e43-cd1398eed136
2025-05-08 17:11:12 +03:00
Alex Szabo
7fad217a96
Add action for updating project fields based on labels (#212783)
## Summary
Sets up a repository action that runs the issue re-labelling action from
https://github.com/elastic/kibana-github-actions/pull/56

It's set up to run on a hourly schedule for a few target projects.

Todo: 
 - [x] add all relevant project numbers
 - [x] replace personal key with a kibana-operations key
2025-05-08 16:05:33 +02:00
Matthew Kime
ed5f3e714c
[rollups] SCSS removal (#220394)
## Summary

Follow directions here for creating a rollup index -
https://github.com/elastic/kibana/pull/187235

Ensure the documentation links render on the right in each of the rollup
creation steps.
2025-05-08 06:45:47 -07:00
Agustina Nahir Ruidiaz
d0469474b8
[Security Solution][Explore Page] a11y: Fix duplicate screen reader announcements for panel elements (#219483)
## Summary



Closes https://github.com/elastic/kibana/issues/205274

To ensure only the `link` component is announced, I removed the
`tabIndex={-1}` from the `LinkAnchor` component and set `element="div"`
on the `<Panel />`, preventing the panel from being announced as a
`button`.
Also changes the `h2` tag to a `span` to remove the heading level
announcement.



https://github.com/user-attachments/assets/60d7af9e-e2f6-4cc5-b6e4-828664c342f4


### 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)
- [ ] [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: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-05-08 14:37:01 +02:00
Anton Dosov
24d4c8aa0b
[Concurrent React@18] Switch testing library to createRoot (#213367)
Closes https://github.com/elastic/kibana/issues/218076.  
Part of the preparation for migrating Kibana to React’s createRoot
([Epic](https://github.com/elastic/kibana-team/issues/1564)).

## What’s in this PR

- Switch to `createRoot` in tests: Updates `@testing-library/react` to
use `createRoot` by default. All unit tests using Testing Library now
run in concurrent mode. See commit:
8e51e07054
- Test updates: Most test failures from the switch have been addressed.
About a dozen tests still explicitly set `legacyRoot: true`. These will
need closer review by the owning teams during app migrations.
- Enzyme tests: Enzyme tests continue to use the React 17 adapter and
run in legacy mode. [Current
plan](https://docs.google.com/document/d/1CXybQiBAtXt3Kay0j_CJxWO7bZ2EYYhaveK4fban2-M/edit?tab=t.kfgvma8ti7q0)
is to migrate away from Enzyme before upgrading to React 19.

## Background

When we upgraded to React 18, we also updated `@testing-library/react`,
which by default uses `createRoot`.
To avoid dealing with concurrent mode failures early, we temporarily
forced Testing Library to use `legacyRoot` (`ReactDOM.render`).

This PR removes that override and fixes the resulting test issues,
completing the move to concurrent root for Testing Library tests.


### Common Failures

####  🔴 `el.click()` 

A common testing mistake is using el.click() and immediately checking
for a DOM update:
```
el.click();
expect(el).toHaveAttribute('state-updated');
```

This often fails with Concurrent React, because state updates might not
be synchronous anymore.
Directly calling `el.click()` doesn't automatically trigger React’s
update cycle (`act`), so your test can read outdated DOM.

Instead, you should either manually wrap the interaction in `act`, or
(better) use `userEvent.click`, which already uses `act` internally and
simulates real user behavior more accurately:

```diff
- el.click();
+ await userEvent.click(el);
expect(el).toHaveAttribute('state-updated');
```


#### 🔴 Wrapping `render` call inside `act` `act(() => render(<App/>))`

Another common mistake is wrapping the render call inside act:

```
await act(async () => {
  render(<MyComponent />);
});
```

This is sometimes done to "mute" warnings about Promises resolving
inside `useEffect`.
However, wrapping `render` in `act` manually breaks a lot of tests in
Concurrent React, because the library (like React Testing Library)
already wraps render in act internally. Manually adding act here can
cause unexpected behavior, like missing updates or wrong timing.

The approach I took was to remove the manual `act` around `render` in
places where tests started failing with Concurrent React, even if, in
some cases, it means seeing `act` warnings in the console. This is safer
for correctness and allows the tests to pass reliably.

To properly mute such warnings, the right way would be to wrap the
actual resolved Promises (like those inside useEffect) in act.However,
since doing that depends a lot on the specific test setup, and could
vary case-by-case, I chose not to try to fix it myself. Teams are
welcome to follow up if they wish.

### 🟡 In specific tests we keep `legacyMode: true`

When it wasn't immediately clear to me what caused the failure or when
the tests were checking React internals, like the number of re-renders,
I decided to keep that test running in legacy mode by using the option
`legacyRoot: true` in `render`.

The idea behind these in-place overrides is that when we're ready to
start migrating the runtime to concurrent mode, the owning teams will
need to take a closer look at those tests when moving their apps to the
concurrent root.
2025-05-08 13:59:44 +02:00
Giorgos Bamparopoulos
461ae33027
[Observability Onboarding] Remove docker image override from the OTel K8s quick-start flow (#219229)
🛑 Merge only after the `9.0.1` stack release.

Removes the docker image override introduced by
https://github.com/elastic/kibana/pull/218527 to fix an issue with the
OTel K8s onboarding flow.

The actual fix in the `elastic-agent` repo was implemented in
https://github.com/elastic/elastic-agent/pull/7882.

Closes https://github.com/elastic/kibana/issues/219035

Co-authored-by: Mykola Harmash <mykola.harmash@gmail.com>
2025-05-08 07:18:04 -04:00
Gonçalo Rica Pais da Silva
340ffc0ec8
[Discover][APM] Fix absolute timestamp used to load Waterfall (#220391)
## Summary

This bugfix solves an issue with trace documents loaded in Discover with
the relative timeframe of "now" to last n minutes, where the traces that
are the closest to "now" do not load their waterfal widget on the
document profile overview tab. The use of `useTimeFilter` yields an
incorrect absolute timestamp that does not correspond to the time range
of the data loaded, with a slight discrepancy for the `end` parameter,
where the trace's timestamp could be later than what is provided for the
`end` timestamp. This then causes the traces waterfall endpoint to
return no data, due to an incorrect timestamp.

Switching to `getAbsoluteTime()` appears to resolve this by returning a
more accurate absolute timestamp, which corresponds more directly to the
data loaded, not when the page was accessed/loaded. As a result, the
endpoint request becomes well-formed and returns the trace waterfall
data correctly.

Closes #220383

## How to test

* Add this to your kibana.dev.yml file:
```yaml
discover.experimental.enabledProfiles:
  - observability-traces-data-source-profile
  - observability-traces-transaction-document-profile
  - observability-traces-span-document-profile
```
* Enable the Observability mode for the current space, then navigate to
Discover
* Create/use a data-view or use an ES|QL query that targets a traces-*
index.
* Ensure the time filter is set to `Last 15 minutes` and select the
first/latest trace document and open the document view for it.
* Check that the trace loads the Trace Waterfall widget correctly.
* Repeat with older traces, and with a changed time filter where the
`end` is not `now`.
* All opened traces should show a trace waterfall on the overview tab.
2025-05-08 12:42:35 +02:00
Kibana Machine
3ebd26ceef skip failing test suite (#220423) 2025-05-08 12:39:23 +02:00
Tre
2edd2ec51d
[SKIP ON MKI] …/discover/logs/_get_doc_viewer.ts (#220400)
## Summary

see details: https://github.com/elastic/kibana/issues/220399
2025-05-08 12:32:46 +02:00
Kibana Machine
c8248178eb skip failing test suite (#220375) 2025-05-08 12:23:30 +02:00
Sonia Sanz Vivas
d35396108e
[Index Management] Remove SCSS from mappings_editors > document_fields (#220245)
Closes https://github.com/elastic/kibana/issues/220207

## Summary
In https://github.com/elastic/kibana/pull/219669 part of the scss code
was migrated to emotion, but the
[_field_list_item.scss](https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/index_management/public/application/components/mappings_editor/components/document_fields/fields/_field_list_item.scss)
file wasn't removed. This PR address the rest of migration for
`index_management/public/application/components/mappings_editor/components/document_fields`,
removing `_field_list_item.scss` and `_edit_field_form_row.scss`.

As `fields_list_item.tsx`, `search_result_item.tsx` and
`runtimefields_list_item.tsx` used the same classNames, I've created a
shared field with the styles.

### How to test
* Navigate to Index Management and go to the Index templates tab
* Edit one index template and navigate to mappings. Add fields and
runtime fields. Do some searching and edit them and verify that all the
styles are there as expected.
2025-05-08 11:11:44 +02:00
Søren Louv-Jansen
3c9514816d
[Obs AI Assistant] Remove index write blocks (#220362)
Closes https://github.com/elastic/kibana/issues/220248

- This PR removes the write index blocks that were previously added when
starting a reindex operation. The index blocks were added to prevent
writes to the source index, while it was being re-indexed to a target
index.
- Re-enables tests to run on MKI

Why index blocks should be removed:

- Immediately after creating the target index, the KB write index alias
is pointed over to the new target index. This means that it is possible
to ingest documents to the new target index, while the re-index is in
progress. Thus, we no longer need to block writes
- Index blocks must be cleaned up. If a node crashes after a re-index
operation has been started, the reindex operation itself will continue
to run because it is handled by Elasticsearch with all the guarantees it
provides. However, the index block will not be removed again, causing a
permanent dead lock until customers remove the index block themselves.
Customers should not end up in this situation.
- Index blocks are causing tests to fail, when the index block is not
properly cleaned up afterwards:
https://github.com/elastic/kibana/issues/220248

---------

Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
Co-authored-by: Viduni Wickramarachchi <viduni.ushanka@gmail.com>
2025-05-08 04:42:54 -04:00
Kevin Lacabane
cc26c649e5
[streams][content pack] track installed content packs (#218785)
## Summary

When importing a content pack into a stream, we now store an object to
audit this import.

In addition to the content pack metadata that can now be surfaced, we
also store metadata of the saved objects imported to remember the source
object it was copied from. This allows updates of existing objects
instead of creating a duplicate.
The stored metadata is restricted to the stream/content pack name on
purpose as it's not clear yet how versioning will be handled for content
pack and dashboards.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-05-08 10:19:43 +02:00
Sergi Romeu
fad881d918
[APM] Remove technical preview from apmProgressiveLoading (#220343) 2025-05-08 09:42:54 +02:00
Bailey Cash
0129955c5d
[Rules] Adding actions to the rules details action menu (Part 2) (#219790) 2025-05-07 23:14:12 -04:00
Jiawei Wu
ee81230a9f
[ResponseOps][TaskManager] Throw error if using generated encryption key to schedule tasks with user scope (#217790)
## Summary

Resolves: https://github.com/elastic/kibana/issues/216811

This PR ensures we can only schedule or bulk schedule tasks with API
keys if and only if the encryption key is provided (and not auto
generated). This PR also contains tests for this.

### 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
2025-05-07 22:51:26 -04:00
Rodney Norris
e55132a8c0
[Search][Playground] Enable Editable Query Mode for Chat (#220158) 2025-05-07 19:46:14 -05:00
elastic-renovate-prod[bot]
2e3eb7b36d
Update dependency elastic-apm-node to ^4.13.0 (main) (#220285) 2025-05-07 20:45:01 -04:00
Steph Milovic
0de633e01d
[GenAI Connectors] Update Default Model IDs for Bedrock and OpenAI Connectors (#220146) 2025-05-07 17:34:06 -06:00
Alejandro Fernández Haro
10d46e5f5e
chore(fullstory): serve the snippet as an asset (#220368) 2025-05-07 23:06:24 +02:00
Nathan Reese
e269d04ee0
[embeddable] cleanup usages of useBatchedOptionalPublishingSubjects (#216714)
`useBatchedOptionalPublishingSubjects` should only be used when `api` is
not available until after rendering. This PR replaces usages of
`useBatchedOptionalPublishingSubjects` with
`useBatchedPublishingSubjects` where possible.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-05-07 13:32:33 -06:00
Nathan Reese
670ff4ee06
[dashboard] fix invalid dashboard displayed as 404 instead of showing validation error (#211661)
Closes https://github.com/elastic/kibana/issues/211659

PR updates `loadDashboardState` to throw content management error when
status is not a 404. PR does not attempt to clean-up DashboardRenderer's
display of the error.

<img width="500" alt="Screenshot 2025-05-07 at 8 20 02 AM"
src="https://github.com/user-attachments/assets/39883951-d4df-46fa-9950-bb8103898b6b"
/>


### test instructions
1) use saved object import to import dashboard with schema errors -
https://github.com/elastic/kibana/blob/main/x-pack/test/functional/apps/dashboard/group2/migration_smoke_tests/exports/lens_dashboard_migration_test_7_12_1.ndjson.
2) open dashboard, verify schema validation error is displayed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-05-07 13:32:04 -06:00
Rodney Norris
c2c356567d
search: functional test migration for ska (#220382)
## Summary

Migrate functional tests for stateful search solution to new config.
Part of https://github.com/elastic/kibana-team/issues/1503

### 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
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2025-05-07 13:37:55 -05:00
Rickyanto Ang
26ed87dc75
[Cloud Security] Fix for Redirect Issue from Vuln contextual flyout (#219822)
## Summary

This PR addresses the issue where if user tried to renavigate to
Findings page (with filter on) from Vulnerability Contextual Flyout by
clicking on the popup icon in the Vulnerability Details table the filter
on Findings page won't get formed properly IF some of the fields value
contains special character such as "+", this happen when user gets
redirected to Findings page

in the case of "+", this malformed filter is caused because in the URL
"+" gets encoded into "%20" which is space instead of "%2b" which is "+"



https://github.com/user-attachments/assets/ce4007a1-b0ad-4ce4-b389-53c44a43aa9b
2025-05-07 11:10:12 -07:00
Bena Kansara
23683e59c0
[Observability] [Rules] Add telemetry for linked dashboards and investigation guide (#217502)
Part of https://github.com/elastic/kibana/issues/216491

Adds telemetry for linked dashboards and investigation guide fields that
are coming soon: https://github.com/elastic/kibana/issues/214522,
https://github.com/elastic/kibana/issues/213024

- Number of rules with linked dashboards
- Number of rules with non-empty investigation guide

To test, you can use the following API call. The result should include
two new fields: `count_rules_with_linked_dashboards` and
`count_rules_with_investigation_guide`

```
POST kbn:/internal/telemetry/clusters/_stats?apiVersion=2
{
  "unencrypted": true,
  "refreshCache": true
}
```

### Note
I have added a comment to update one test file
(`x-pack/test/alerting_api_integration/common/lib/get_test_rule_data.ts`)
once `artifacts` field is available in schema.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-05-07 14:09:11 -04:00
Eyo O. Eyo
e11c4b3a81
Adjustments to trigger chromium build Github action (#220332)
## Summary

Removes concurrency check that would causes checks to cancel without
triggering a build, also remove listener on closed issues since we were
handling them anyways.

<!--

### 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-05-07 19:37:39 +02:00
Dzmitry Lemechko
a2c9cbfaab
[ska][x-pack] relocate platform tests [4] (#219691)
## Summary

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

This PR is mostly about moving tests from `x-pack/test` to
`x-pack/platform/test`

Before:

```
x-pack/test/
     | - api_integration/apis/management/
     | - api_integration/apis/monitoring/
     | - api_integration/apis/osquery/
     | - automatic_import_api_integration
     | - monitoring_api_integration/
     | - saved_object_api_integration/
```

After: 
```
x-pack/platform/test/
     | - api_integration/apis/management/
     | - api_integration/apis/monitoring/
     | - api_integration/apis/osquery/
     | - automatic_import_api_integration
     | - monitoring_api_integration/
     | - saved_object_api_integration/
```

Additional:

- `x-pack/test/api_integration/apis/osquery/config.ts` was move to
platform stateful manifest to match `osquery` plugin (shared, platform)
- `automatic_import_api_integration` config files were moved to platform
stateful manifest to match `automatic_import` plugin (shared, platform)
- `x-pack/test/common/lib/test_data_loader.ts` is required by SO api
tests and was copied to `x-pack/platform/test/common`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-05-07 19:13:04 +02:00
florent-leborgne
2671acc695
[Docs] Add known issue about Obs AI Assistant KB to 9.0 docs (#220401)
^^ 

Counterpart of https://github.com/elastic/kibana/pull/220397 for 9.0
docs
2025-05-07 16:53:02 +00:00
jennypavlova
c9776687e2
[Infra] Fix processes query (#220381)
Closes #220289 and
https://github.com/elastic/opentelemetry-lib/issues/168
## Summary

This PR fixes an issue with the processes query in case the document is
missing some of the required fields for the aggregation (like user.name,
process.pid, system.process.cpu.total.pct, etc.). This PR adds a filter
to the query to ensure that all the required fields exist

| Before | After |
| ------ | ------ |
|
![image](https://github.com/user-attachments/assets/2dd94bb6-d7b9-453a-a741-dbba734a0b1a)
|
![image](https://github.com/user-attachments/assets/bb6a14db-88c2-4bca-beca-577465e1b06e)
|

## Testing 
> [!NOTE]  
> With the oblt lite cluster, the issue is reproducible as in the
screenshot (one of the hosts using the hostsmetrics receiver),
I also tested with metricbeat for regressions and the host Otel
Onboarding steps locally (the processes are not available there, just
the summary)

- Go to the asset details page and open the processes tab
- There shouldn't be an error shown when loading the processes
2025-05-07 18:36:00 +02:00
Lisa Cawley
2ae840624e
Update Elasticsearch URLs in doc link service (#219656)
Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
2025-05-07 17:57:18 +02:00
elastic-renovate-prod[bot]
c6ccb8d8a1
Update dependency elasticsearch-8.x to v8.18.2 (main) (#219314)
Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
2025-05-07 17:03:44 +02:00
Abdul Wahab Zahid
cf2091d5dc
Audit Logs Levels - Obs Ux Logs Team (#218413)
The PR audits and fixes the log levels for Dataset Quality plugin based on [guidelines](https://docs.elastic.dev/kibana-dev-docs/services/logging#log-level).
2025-05-07 16:48:54 +02:00