Commit graph

85777 commits

Author SHA1 Message Date
Weronika Olejniczak
7e46d2e756
chore: update eslint-plugin-eui to 0.1.1 (#210082)
## Summary

Bring in the changes from https://github.com/elastic/eui/pull/8304,
specifically ESLint rules:

- `no-restricted-eui-imports`
- `no-css-color` (migrated from `@kbn/eslint-plugin-css`)
- `prefer-css-attribute-for-eui-components` (migrated from
`@kbn/eslint-plugin-css`)

Relates to https://github.com/elastic/eui/issues/8201,
https://github.com/elastic/eui-private/issues/275

## QA

### Instructions

1. Checkout this branch: `gh pr checkout 210082`.
2. Reinstall dependencies: `yarn kbn bootstrap`.
3. See output of ESLint. There should be no errors.
4. Test below cases.

### Test cases

#### `no-restricted-eui-imports`

Example files:

- JSON imports: `src/platform/packages/shared/kbn-ui-theme/src/theme.ts`
- `@kbn/ui-theme`:
`src/platform/plugins/private/vis_types/vega/public/data_model/utils.ts`

#### `no-css-color`

Example file:
`src/platform/plugins/shared/kibana_react/public/page_template/no_data_page/no_data_card/elastic_agent_card.tsx:50`

![Screenshot 2025-02-26 at 15 01
53](https://github.com/user-attachments/assets/ec6f49bd-5832-4d1c-9cfd-74c40ad5498e)

#### `prefer-css-attribute-for-eui-components`

Example file:
`x-pack/examples/alerting_example/public/alert_types/always_firing.tsx:166`
2025-04-02 14:06:17 +02:00
Miriam
ecd83ce211
[ObsUX][A11y] Add announcement keyboard elements improvements (#216592)
Closes https://github.com/elastic/kibana/issues/216029

## Summary

Some elements on the Infrastructure Inventory were not accessible or
their interaction with the keyboard was not properly announced to the
users, see issue for steps to reproduce, use a screen reader to test.

### What was done

#### Groupby buttons 

- Replace link element by button
- Add announcement when interacting with the button, i.e., when
clicking/selecting the `All` button nothing changes


https://github.com/user-attachments/assets/da7a973d-26a4-4288-8aea-e1dd7a43ea6f

#### Legend options

- Replace `EuiColorPickerSwatch` button by and icon, the button didn't
have any action, it only shows the selected color for minimum and
maximum for the selected color palette
- Fix ui alignment of checkbox elements

Before

<img width="452" alt="Screenshot 2025-04-01 at 08 58 40"
src="https://github.com/user-attachments/assets/66d7e733-8f95-4d76-9eb2-549b8421b888"
/>

After

<img width="585" alt="Screenshot 2025-04-01 at 08 54 31"
src="https://github.com/user-attachments/assets/825a9f84-ddaf-43dc-b136-e268592818c1"
/>
2025-04-02 12:24:26 +01:00
Søren Louv-Jansen
7275d2e8bd
Retry release to fix flaky tests (#216781)
Related to https://github.com/elastic/kibana/pull/216397
Closes https://github.com/elastic/kibana/issues/216763

This change ensures that we do not send the `release` request and
`extendTtl` request simultaneously in `withLock`. This caused a conflict
causing tests to fail:

```
           └-> "before all" hook for "should return the result of the callback"
             │ERROR Failed to release lock "my_lock_with_ttl_extension": version_conflict_engine_exception
             │      	Root causes:
             │      		version_conflict_engine_exception: [my_lock_with_ttl_extension]: version conflict, required seqNo [43], primary term [1]. current document has seqNo [44] and primary term [1]
```

Flaky tests:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/8142
2025-04-02 12:21:20 +01:00
Marco Antonio Ghiani
9797e95289
[Streams 🌊] Add warning for dotted field names (#216154)
## 📓 Summary

Closes #215887 

Until the access to dotted fields is not supported, we'll warn the user
about the unreliability of the simulation outcome when using those
fields in processor. configurations.

The unsupported fields that will make the warning appear are derived by
the sample docs, deriving a list of existing fields that have some
nested dot-separated field names.


https://github.com/user-attachments/assets/46228821-601c-4a32-995c-1699be6c4ce3

## 🧪 Test

To reproduce it, ingest docs manually with
```tsx
POST logs-mytest.otel-default/_doc
{
  "body": {
    "text": "This is the message"
  },
  "severity_text": "WARN",
  "resource": {
    "attributes": {
        "host.name": "my-host",
        "host.arch": "arm"
    }
  }
}
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Mike Birnstiehl <114418652+mdbirnstiehl@users.noreply.github.com>
2025-04-02 13:12:34 +02:00
Pierre Gayvallet
c05dda37e2
[workchat] reintegrate into main (#215627)
## Summary

~**DO NOT MERGE:** depends on
https://github.com/elastic/kibana/issues/213468~

This PR reintegrates the work from the `workchat_m1` branch into `main`:

- introduces a 4th solution type, `chat`, that will be used for the
*WorkChat* project type.
- edit things in various platform code to introduce/handle that new
project type
- add plugins and packages for the workchat app. 

### To AppEx reviewers:

File change count is scary, but you can safely ignore anything from
`xpack/solutions/chat` (given it's solution code), and focus on your
owned changes, which are way more reasonable

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Joe McElroy <joseph.mcelroy@elastic.co>
Co-authored-by: Rodney Norris <rodney.norris@elastic.co>
Co-authored-by: Jedr Blaszyk <jedrazb@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Meghan Murphy <meghan.murphy@elastic.co>
2025-04-02 11:00:32 +01:00
Marco Liberati
1a555fdc86
[Lens] Disable Collapse by for metric chart when primary metric is not numeric (#216179)
## Summary

Fix part of #214593 

This PR fixes the Metric chart side of the `Collapse by` problem.
In shorts:
* The `Collapse by` control disappears when the primary metric is not
numeric
  * while the UI hides it the state still holds it.
* the `toExpression` is responsible to evaluate the current state and
find if `collapseFn` is compatible before adding it
* The `Collapse by` control has moved into the Data section of the
panel, aligning the Metric chart to the rest

<img width="1057" alt="Screenshot 2025-04-01 at 18 57 31"
src="https://github.com/user-attachments/assets/1d441329-3611-4452-a40d-54ea25964166"
/>
<img width="1056" alt="Screenshot 2025-04-01 at 18 57 12"
src="https://github.com/user-attachments/assets/66111c2a-957d-44dc-8361-45300df99662"
/>

### Checklist

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-02 11:58:24 +02:00
Søren Louv-Jansen
8bcce2e89b
[Obs AI Assistant] Skip lock tests in MKI temporarily (#216753)
Tests added in https://github.com/elastic/kibana/pull/216397 are failing
on MKI. Skipping temporarily in the affected environment

### Error

```
           └- ✖ fail: Serverless Observability - Deployment-agnostic API integration tests observability AI Assistant LockManager Basic lock operations acquires the lock when not held
           │      ResponseError: security_exception
           │ 	Root causes:
           │ 		security_exception: action [indices:admin/create] is unauthorized for user [testing-internal] with effective roles [superuser] on restricted indices [.kibana_locks-000001], this action is granted by the index privileges [create_index,manage,all]
```

### Root cause
```ts
const es = getService('es');
es.deleteByQuery({ index: '.kibana_locks-000001', query: { match_all: {} }});
```
2025-04-02 10:28:35 +01:00
Miriam
7b1d7bf08a
[ObsUX] [A11y] Fix focus on metadata table content (#216628)
Closes https://github.com/elastic/kibana/issues/195014

### Summary

Host Detail page has a Metadata tab with expandable table rows. These
rows add content to the page in an unexpected reading order. Content
should be expanded underneath the show more / less trigger. Focus should
stay on the toggle.

Before


https://github.com/user-attachments/assets/13a0f7a2-2f24-4304-a6ad-cc46e3bbfc1c

After


https://github.com/user-attachments/assets/7993abdc-b693-4c0f-a161-8533cf6b2e3b
2025-04-02 10:25:05 +01:00
Tiago Costa
420512a53a
chore(NA): replaces native-hdr-histogram with hdr-histogram-js (#216715)
`native-hdr-histogram` is a native module and its prebuilds are failing
the bootstrap on macos machines during bootstrap since early today.

Its usage its contained in a single dev package and therefore this PR
attempts to port into `hdr-histogram-js`.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-02 10:27:11 +02:00
Ania Kowalska
7e5f0e28f2
Discover esc closes flyout when focus is on filter (#216630)
## Summary

Closes [[Analytics:Discover page]Esc closes flyout when focus is on
Filter by field type
options](https://github.com/elastic/kibana/issues/214367)

In this PR, following EUI team suggestion from the linked issue, we
ensure flyout closes in correct order for nested portal-rendered
components (like `EuiPopover`).

Steps to reproduce:

1. Navigate to `Toggle dialog with details` and press Enter.
2. Navigate to `Filter by type` and press Enter.
3. Navigate to any option in the opened dialog.
4. Press Esc.

Expected behavior: 
When user press Esc key, only `Filter by type` popover closes, but user
is still focused on `Filter by type` and the flyout remains open.


Screen recording: 



https://github.com/user-attachments/assets/d27b65e0-2e6e-4e55-97f5-dbdbef42a567



### 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-04-02 10:14:36 +02:00
Robert Jaszczurek
e510e533a4
[ML] Anomalies table: Enhances display for anomaly time function values (#216142)
Introducing tooltips and `+1` / `-1` subscripts for date values to
improve readability for the values of `time_of_day` anomaly detection
function.

Fix for: https://github.com/elastic/kibana/issues/213882
It turns out the formatting was correct for the screenshot provided in
the issue as the upper bound is pointing to the next day.


![image](https://github.com/user-attachments/assets/52ca47d9-ffb2-41dd-b9a6-0442c7fe1a0d)

Format following these changes:

![image](https://github.com/user-attachments/assets/222cc6be-a282-48f8-8391-8d076afb56a8)

![Screenshot 2025-03-27 at 12 01
22](https://github.com/user-attachments/assets/2488df90-717e-4da6-8240-f1002327a007)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-02 09:59:30 +02:00
Cesare de Cal
e1b172a264
[scout] Add tests to Scout CLI commands (#216272)
Depends on https://github.com/elastic/kibana/pull/216052 being merged. 

---

This is a follow-up PR based on @dmlemeshko's
[comment](https://github.com/elastic/kibana/pull/216052/files#r2015868889).

This PR introduces the following changes:

* Adds tests to all Scout CLI commands: `discover-playwright-configs`,
`run-tests`, `start-server`
* Some of the tests verify that this change works correctly:
https://github.com/elastic/kibana/pull/216052
* For each command file it separates the `run` function from the
`Command` itself to make the `run` handler easier to test.

### Bonus: code coverage

The `Command`s itself aren't tested (which explains the uncovered lines
below) - happy to receive your feedback on this.

| File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s

|----------------------------------------------------------------------------------------|---------|----------|---------|---------|------------------------------------------------------------------------------------
| platform/packages/shared/kbn-scout/src/cli | 91.89 | 78.57 | 66.66 |
91.89 |
| config_discovery.ts | 95.65 | 90 | 80 | 95.65 | 88
| run_tests.ts | 85.71 | 50 | 50 | 85.71 | 44
| start_server.ts | 85.71 | 50 | 50 | 85.71 | 34

### Try it out locally

```shell
yarn test:jest --config src/platform/packages/shared/kbn-scout/jest.config.js --coverage
```
2025-04-02 09:35:49 +02:00
Francesco Fagnani
bb397ccd9e
[Synthetics] Fixed layout when monitors are grouped by (#216434)
This PR closes #207560.

Before:
<img width="1512" alt="Screenshot 2025-03-31 at 12 01 55"
src="https://github.com/user-attachments/assets/eee8e848-0df5-45af-a53d-8ee3c24a84fc"
/>

After:
<img width="1512" alt="Screenshot 2025-03-31 at 12 02 19"
src="https://github.com/user-attachments/assets/841b537e-4f55-40e1-b76f-4492812f2da3"
/>
2025-04-02 09:27:10 +02:00
Dario Gieselaar
d1493b98e7
@kbn/profiler-cli: collect and display CPU profiles (#216356)
# @kbn/profiler-cli

Profile Kibana while it's running, and open the CPU profile in
Speedscope.

## Usage

Run a command by either preceding it with the profiler script:
`node scripts/profile.js -- $command`

Or by piping it in:
`$command | node scripts/profile.js`

You can also just run it until SIGINT:

`node scripts/profile.js`

Or with a timeout:

`node scripts/profile.js --timeout=10000`

## Examples

### Commands

You can copy a curl request from the browser, and place it after the
command:

`node scripts/profile.js --connections=10 --amount=50 -- curl ...`

You can also use stdin for this, for example:

`pbpaste | node scripts/profile.js`

When using stdin, take into consideration that there is some lag between
starting the script and connecting the profiler, so the profiler might
miss the first second or so of the running process.

You can also use any other command, like `autocannon`, `sleep` or
`xargs`.

### SigInt

By default, the profiler will run until the process exits:`node
scripts/profile.js`. This is useful when you have a long running process
running separately and you want to collect the profile over a longer
time period. Be aware that this might cause memory issues because the
profile will get huge. When you press Cmd+C, the profiler will
gracefully exit and first write the profile to disk and open Speedscope.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-02 08:47:33 +02:00
Kibana Machine
4c8955025c
[api-docs] 2025-04-02 Daily api_docs build (#216745)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/1030
2025-04-02 07:32:58 +01:00
Stratoula Kalafateli
a694b83c42
[ES|QL] Updates functions definitions manually (#216422)
## Summary

Manually updates the functions definitions.
2025-04-02 07:34:26 +02:00
Søren Louv-Jansen
f4980d0fa3
[Obs AI Assistant] Distributed lock manager (#216397)
Closes https://github.com/elastic/obs-ai-assistant-team/issues/238


This introduces a lightweight library for managing distributed locks
using Elasticsearch. It lets developers coordinate operations across
multiple Kibana instances by ensuring that only one client holds a given
lock at a time. The library uses an Elasticsearch index with TTL-based
locks.

Usage:

```ts
const lockManagerService = new LockManagerService(coreSetup, logger);
lockManagerService.withLock('my_lock', () => {
 // perform operation
});
```
2025-04-02 00:26:00 +02:00
Bailey Cash
0f402ca31c
[SLO/Test] add new slo definition api test (#216573)
Closes #216236 

add integration tests for the SLO Definition API, specifically to test
the changes for the implementation of this
[issue](https://github.com/elastic/kibana/issues/214260)
2025-04-01 23:12:04 +01:00
Marshall Main
74722fd11b
[Security Solution][Detection Engine] Simplify rule preview route (#216384)
## Summary

Refactors `runExecutors` to take a `SecurityAlertType` instead of an
alerting framework `RuleType` and moves the logic to convert the
`SecurityAlertType` into a `RuleType` into `runExecutors`. This makes
the signature of `runExecutors` much simpler and reduces a lot of the
duplication in the `switch` below.
2025-04-01 17:31:58 -04:00
Sid
1fdf5d450f
[FIPS] Skips license check test for FIPS test suite (#216056)
## Summary

Skips license checking test in FIPS mode. FIPS runs with the platinum
license so having a test which asserts `basic` causes the CI to fail.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2025-04-01 22:23:35 +01:00
Jiawei Wu
539f77f816
[Response Ops] Fix Deprecated E&C ES APIs for Kibana 9.0 (#203514)
## Summary

Resolves: https://github.com/elastic/response-ops-team/issues/258

Related Issue: https://github.com/elastic/kibana-team/issues/1173

Based on the issue outlining E&C's deprecated ES usages for 9.0, it
seems like we're mostly fine to proceed with the upgrade. The only issue
that was found was the usage of a `.` pre-fixed index used in the E2E
test that triggered the `index name [.kibana-alerting-test-data] starts
with a dot '.', in the next major version, index names starting with a
dot are reserved for hidden indices and system indices` warning message.
The solution is to simply remove the `.` prefix in our tests.

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Mike Côté <mikecote@users.noreply.github.com>
2025-04-01 15:01:46 -06:00
Cauê Marcondes
f2aa2012fc
[APM] Removing file (#216708)
Removing a file that was accidentally merged on this
[PR](https://github.com/elastic/kibana/pull/215819).
2025-04-01 21:50:49 +01:00
Paulo Silva
a467201723
[Asset Inventory] Onboarding Permission Denied component (#216113)
## Summary

This PR adds the Permission Denied screen to the Asset Inventory
onboarding to handle users with insufficient privileges attempting to
enable the entity store. It currently relies on the same mechanisms and
reuses the same callout message used by the Entity Store page.

this pr also updates the following:
- update texts on the get started and initializing screens to match the
latest updates
- update the MissingPrivilegesCallout component to allow displaying full
message instead of line clamping
- adds MissingPrivilegesCallout unit tests


## Screenshots

<img width="1551" alt="image"
src="https://github.com/user-attachments/assets/4bde6f6f-8feb-49da-a8e0-c68e324cb782"
/>
2025-04-01 21:14:45 +01:00
Bailey Cash
a382856f71
[SLO] Introduce URl state manager for definition filter, move outdated view to management page (#216367)
## Summary

Resolves #214260

<img width="1416" alt="Screenshot 2025-03-31 at 11 26 56 PM"
src="https://github.com/user-attachments/assets/d2e048b6-dddd-4127-b551-5a2aae57dbe4"
/>

This PR merges the outdated SLO view with the new SLO management table.
As part of the implementation of the issue, useState hooks have been
replaced with url state management hooks, and the SLO definition API has
been updated to provide the user with the option to pull either outdated
or current definitions. By not providing this value, the user will
receive all definitions.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-01 21:09:59 +01:00
Dan Dillinger
94ca17f521
chore(): change telemetry codeowner from @elastic/platform-analytics to @elastic/kibana-telemetry (#216706)
## Summary

Change telemetry codeowners entry from platform-analytics to
kibana-telemetry. This somewhat expanded github team will notify
correctly while including more reviewers across orgs. Expands on change
from #214572

cc @elastic/platform-analytics
2025-04-01 15:53:16 -04:00
Rickyanto Ang
0ff53f8cc1
[Cloud Security]Updating rendering method for Misconfiguration Findings Flyout (#216116)
## Summary


https://github.com/user-attachments/assets/d83e79af-f369-48ab-b7cb-1853086e7ec1

As a part of implementing new Findings Flyout, we are updating the way
we render Findings Flyout in Findings page.
This PR addresses that by using Expandable Flyout API hooks to handle
which Flyout to render, previously we just render the flyout directly
without using hooks

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Paulo Silva <paulo.henrique@elastic.co>
2025-04-01 12:40:42 -07:00
Nicolas Chaulet
da5cfd6f32
[Fleet] Display correct toasts on bulk actions (#216663) 2025-04-01 15:11:53 -04:00
Elena Stoeva
4557b73959
[Console] Fix parsing requests with errors (#215568)
Fixes https://github.com/elastic/kibana/issues/211031

## Summary

This PR fixes the selection of requests in Console when a request
contains an error. It also adds an error toast when the user tries to
send a request containing an error, as the response from Elasticsearch
is usually too long and not very helpful.




https://github.com/user-attachments/assets/4de10953-9ee5-489b-94fb-fd8a772bd598
2025-04-01 18:28:24 +01:00
Colleen McGinnis
c8fc5e74d9
[docs] Add missing mapped pages (#216681)
Add missing mapped pages listed in [Possible invalid redirects to
8.18](https://docs.google.com/spreadsheets/d/1bQQVc-QwwXDSd24Vw6Q62dnn_9bxsBeAzeWJAdyxdqI/edit?gid=2025227146#gid=2025227146).
2025-04-01 16:24:52 +00:00
florent-leborgne
b7d1141b6b
[Docs] Reproduce #209403 in new API docs (#216439)
This change reproduces the asciidoc change made in
https://github.com/elastic/kibana/pull/209403 into the new API docs.
It'll be picked up the next time the API docs output is generated and
refreshed.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-01 18:21:43 +02:00
Luke Gmys
bcd68b1100
[Security Solution] Rename use full data view hook (#216614)
## Summary

Renaming `useFullDataView` to `useDataView`, for clarity. We also have
`useDataViewSpec` now, introduced in
https://github.com/elastic/kibana/pull/216461.
2025-04-01 17:03:24 +01:00
Nathan Reese
756333db0f
[maps] upgrade to maplibre 5.3 (#216476)
[Maplibre
5.3](https://github.com/maplibre/maplibre-gl-js/blob/main/CHANGELOG.md#530)
release fixes circle layer hitbox in Globe projection mode
(https://github.com/maplibre/maplibre-gl-js/pull/5599). This issue is
noticeable in Kibana and makes it difficult to open tooltips with circle
markers (default point marker) and globe projection.
2025-04-01 09:46:09 -06:00
Paul Tavares
ee3e7bfb60
[Security Solution][Endpoint] Un-skip space awareness FTR tests (#216515)
## Summary

- Unskips the Space awareness FTR tests. Unclear why they were failing
and logs did not provide much information.
- added some minor info. logs to the data loading part


Closes #203898
2025-04-01 11:44:19 -04:00
Marco Vettorello
200ec10593
[Vega] Fix update vega spec in functional tests (#216620)
## Summary

This PR fixes a flaky test practice that was causing issues in 7.17
branch.
The flakiness was introduced long ago when the choosen method to
update/add more content to the Vega Spec was done by manually clicking
in the Vega spec editor the left border (where the editor shows the line
numbers) to select all the text in the editor and go to the last line
but a char before the end of the text (right before the closing
bracket).

The failure highlighted by
https://github.com/elastic/kibana/issues/213646 where caused the added
`config` text positioned in the wrong line/column due to the Konami Code
like type of functional test operation.


The fix instead provides a more robust method: it takes the written text
in the editor, parse it to JSON, update the JSON and write it back again
to the editor.

Will fix the issue https://github.com/elastic/kibana/issues/213646 when
backported to 7.17.
2025-04-01 17:26:17 +02:00
Sunghyun Kim
d4d1c2b6dd
[APM] Fix query for transaction marks (#215819)
## Summary

There is a bug in kibana 8.17, where no transaction marks are shown in
the APM's transaction waterfall ui.
The marks are stored in the field `transaction.marks.agent` of
documents, but kibana apm server is querying `transaction.agent.marks`.

This PR fixes the field name.


I also added `span.id` in the query source to include the marks in the
response, even if there is no `span.links` in the transaction info.
(I found the case from RUM data with `transaction.marks.agent` but
without `span.links`, so that the response does not include marks
because there is no `source` field in the query result)

I am not sure if it's the right way to fix it, as i have no
understanding about the relationsip between `transaction.marks.agent`
and `span.links`, so this PR is more like a bug report.



### 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)
- [ ] ...
None
2025-04-01 16:05:42 +01:00
seanrathier
1548f32afd
[Cloud Security] Removing CSPM version 1.13.0-preview02 dependency for E2E tests (#214824) 2025-04-01 16:01:47 +01:00
christineweng
005940ce48
[Security Solution][Sourcerer] Rename index pattern props to data view (#216542)
## Summary

This PR cleaned up some naming inconsistencies related to index pattern
and data view spec. No change to features/UI.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] 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-04-01 10:00:10 -05:00
Nicolas Chaulet
f578f401d4
[Fleet] Fix agentless policy deletion unenroll agents (#216513) 2025-04-01 10:40:13 -04:00
Milosz Marcinkowski
e7edff9ddc
[APM] Span links: add tooltip explaining the reason for missing linked span details (#216487)
Closes #214558

### Summary

When fetching details for the Span Links flyout, it is possible that the
parent span has not yet been ingested, resulting in an 'Unknown' service
name which might be misleading to users. To avoid confusion, we decided
to add tooltip to the icon with explanation.

<img width="2558" alt="image"
src="https://github.com/user-attachments/assets/9e29544b-28df-43b2-9987-24c6d90c481e"
/>

### How to test:
- use edge-oblt data
- in Applications go to `accountingservice` service
- select `orders receive` transaction
- in trace waterfall click `Span Links` button
2025-04-01 16:39:00 +02:00
Georgiana-Andreea Onoleață
469e109edc
[ResponseOps] - fixes for a11y issues (#216129)
Closes https://github.com/elastic/kibana/issues/205857
Closes https://github.com/elastic/kibana/issues/205846
Closes https://github.com/elastic/kibana/issues/205700

## Summary

- added the missing aria-labels

- related to https://github.com/elastic/kibana/issues/205846:
- "Columns dialog in Alerts tab. Only drag handle is announced with
instructions, column names (Rule, Assignees...) are not announced." -
EUI team has opened a related issue to address this:
https://github.com/elastic/eui/issues/8516

- related to https://github.com/elastic/kibana/issues/205700: 
- "When reaching Description field - navigation instantly goes to "Bold
button". No announcement about Description field itself". This issue
will be fixed after fixing the EuiMarkdown toolbar focus one:
https://github.com/elastic/eui/issues/3500
2025-04-01 17:31:00 +03:00
Marco Antonio Ghiani
13b536aed8
[Streams 🌊] Improve definition narrowing and reduntant requests (#215897)
## 📓 Summary

These changes lift the check against the definition existence and
narrows its value for the react context consumers.

It also fixes reduntant requests for the AI connectors used for the grok
parsing suggestions.

@flash1293 I'd expect to use the AI capabilities across more places for
the enrichment experience, we should probably lift the AI capabilities
as part of the page initialization at a certain point, although it's not
needed yet 👌
2025-04-01 16:10:57 +02:00
Dima Arnautov
d35b60896d
[ES|QL] Validation and autocomplete support for the CHANGE_POINT command (#216043)
## Summary

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

Adds validation and autocomplete support for the `CHANGE_POINT` command

### 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)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-01 14:58:13 +01:00
Jacek Kolezynski
2b01257343
[Security Solution] Migrate legacy Detections API docs to OpenAPI specs (#212367)
**Partially resolves: #211808**

## Summary

This is the first part of the migration effort, containing changes for:
- CRUD endpoints
- BULK Actions
- Export / Import Rule
- Find Rule
- List Tags
- Get Status
- Install Rule

I migrated the examples and the description of the fields. Some of the
fields contained description that was very similar to the legacy, then I
didn't change it. I only modified the descriptions where it was
valuable.

I also discovered some problems. For example the value for the 'query'
field, always shows 'EQL query to execute'. I reported this to the docs
team, in the 'next-api-reference' channel.

Another issue was with 'related_integrations field', which also didn't
show the long description. I also wrote about it to the docs team
[here](https://elastic.slack.com/archives/C05UL5YC06B/p1740137094701209).
In this PR I decided to try moving the description one level up, where
it renders properly.


# Testing
1. cd x-pack/solutions/security/plugins/security_solution
2. yarn openapi:bundle:detections 
3. Take the bundled file
(docs/openapi/ess/security_solution_detections_api_2023_10_31.bundled.schema.yaml)
and load it into bump.sh console to see the changes.
4. Compare the changes with the [Legacy
documentation](https://www.elastic.co/guide/en/security/current/rule-api-overview.html)

You can also use this [link](https://bump.sh/jkelas/doc/kibana_wip/)
where I deployed the generated bundled doc.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-01 15:43:02 +02:00
Konrad Szwarc
f6d12f8384
[EDR Workflows] Insights - Rework defend insights evaluation function (#216462)
This PR updates the evaluator function that compares LLM output to
predefined expected results. The update was needed after we agreed on a
more structured way of evaluating prompts and the insights they produce.

We now use three sets of expected paths:
* Required – paths that must always be returned
* Optional – paths that are nice to have but not mandatory
* Excluded – paths that should never appear in the LLM response

This structure is applied per-OS, and we’ve updated the LangSmith
examples accordingly.

The evaluator’s role is to compare these LangChain-side requirements to
the actual LLM output. It starts by validating that the structure
defined in the LangSmith Web UI matches what the code expects. It then
performs several checks: comparing the number of antivirus groups,
matching the returned groups to the expected ones, verifying the
presence of required and optional paths, and flagging any unexpected
results. The final score reflects how many of these checks passed.
2025-04-01 15:35:32 +02:00
Elena Stoeva
c80325db10
[Index Management] Copy change for index mode field in index templates (#216624)
## Summary

This PR renames the title of the the index mode field from "Data stream
index mode" to "Index mode" since this field is no longer
enabled/disabled based on the data streams field (since
https://github.com/elastic/kibana/pull/207413).

We also switch the places of the index mode field and the data retention
field, since the data retention field is displayed only when data
streams toggle is switched on, so it makes sense that it is next to this
field.

<img width="1166" alt="Screenshot 2025-04-01 at 11 46 45"
src="https://github.com/user-attachments/assets/935a7c4e-2d19-4679-8e75-03fed35ce82e"
/>



https://github.com/user-attachments/assets/40e46c91-9120-44eb-b0de-ef700a5eeedd
2025-04-01 14:31:25 +01:00
elastic-renovate-prod[bot]
1e96d79aca
Update docker.elastic.co/wolfi/chainguard-base:latest Docker digest to 29150cd (main) (#216555)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| docker.elastic.co/wolfi/chainguard-base | digest | `c4e10ec` ->
`29150cd` |

---

### 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-04-01 08:13:14 -05:00
Tomasz Ciecierski
703860083d
[AI_SOC] Add configurations page (#216079) 2025-04-01 14:02:17 +01:00
Georgiana-Andreea Onoleață
67c35302e3
[ResponseOps] Replace SCSS with CSS-in-JS (#214092)
Closes https://github.com/elastic/kibana/issues/208303

## Summary

- This PR removes SCSS (Sass) from RO plugins and replaces it with
`@emotion/react ` as recommended.
2025-04-01 13:48:37 +01:00
Mykola Harmash
fcc7244da2
[Oblt Onboarding] Add breadcrumbs for quick start flows (#216470)
Closes https://github.com/elastic/kibana/issues/191646

This change adds breadcrumbs to the project navigation bar for every
quickstart flow.

| Classic Navigation | Solution Navigation |
| --- | --- |
| ![CleanShot 2025-03-31 at 15 32
08@2x](https://github.com/user-attachments/assets/d9489e9c-1df1-43f2-99ec-b82128a1be85)
| ![CleanShot 2025-03-31 at 15 31
13@2x](https://github.com/user-attachments/assets/28180e0b-da00-4773-b9e5-a4d7e1c97424)
|
2025-04-01 13:49:09 +02:00
Luca Wintergerst
30ad456181
[Streams] fixes the interval type used for the date histogram (#216258)
## Summary
closes https://github.com/elastic/streams-program/issues/225

The date histogram was hard coded to the fixed interval, which is not
suitable for all time ranges that `getCalculateAutoTimeExpression`
returns. This adds some logic to choose the correct agg setting.
I am not sure if this is the cleanest way to solve this, but Lens is
doing something similar:


https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/lens/public/datasources/form_based/operations/definitions/date_histogram.tsx#L50

Before:
![CleanShot 2025-03-28 at 08 57
21@2x](https://github.com/user-attachments/assets/26c8f74e-9596-4475-8db0-ddc858a229fe)
After:
![CleanShot 2025-03-28 at 08 57
12@2x](https://github.com/user-attachments/assets/2965b2d5-3395-4366-8533-36fea5f251e8)


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

---------

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2025-04-01 12:24:01 +01:00