Commit graph

81890 commits

Author SHA1 Message Date
Tre' Seymour
72e78a44e4 [FTR] Split Configs Manually
We are bumping up against the time limit in MKI runs.
We are seeing this error: `Error: Timeout of 360000ms exceeded. For async tests and hooks, ensure "done()" is called;`
Also, the 3 failing configs are each going over the 2 hour time limit.
So, let's split these three configs:
1. `x-pack/test_serverless/functional/test_suites/search/common_configs/config.group1.ts`
1. `x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts`
1. `x-pack/test_serverless/functional/test_suites/security/common_configs/config.group1.ts`
2024-12-13 10:32:46 +00:00
James Gowdy
a69a456e69
[ML] Removing ignore_throttled from anomaly detection job results searches (#203788)
`ignore_throttled` is automatically added to AD jobs when created. These
are then reused in various searches where the whole `indices_options`
object from the datafeed is passed in the search call.

This PR adds a function to remove `ignore_throttled` in these situations
to avoid triggering deprecation warnings.
2024-12-13 09:27:16 +00:00
Giorgos Bamparopoulos
46a1535f03
[Stack Monitoring] Migrate logs-related components to TypeScript (#203536)
## Summary
A recent [bug](https://github.com/elastic/kibana/issues/199902) that
affected some of the pages in Stack Monitoring was caused by changes
related to the locators of the logs-related apps.

The issue wasn't caught by type checks as the affected area in the
monitoring plugin was written in JavaScript.

The goal of this PR is to migrate the logs-related components to
TypeScript.

### Testing
The stateful environment deployed by this PR includes logs and metrics
for stack monitoring. Please make sure to select a larger time range
(e.g. last 14 days).
2024-12-13 08:53:25 +00:00
elastic-renovate-prod[bot]
e061b4c352
Update dependency @elastic/elasticsearch to ^8.16.0 (main) (#200275)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[@elastic/elasticsearch](http://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html)
([source](https://togithub.com/elastic/elasticsearch-js)) | dependencies
| minor | [`^8.15.2` ->
`^8.16.0`](https://renovatebot.com/diffs/npm/@elastic%2felasticsearch/8.15.2/8.16.0)
|

---

### Release Notes

<details>
<summary>elastic/elasticsearch-js
(@&#8203;elastic/elasticsearch)</summary>

###
[`v8.16.0`](https://togithub.com/elastic/elasticsearch-js/releases/tag/v8.16.0)

[Compare
Source](https://togithub.com/elastic/elasticsearch-js/compare/v8.15.2...v8.16.0)


[Changelog](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/8.16/changelog-client.html)

</details>

---

### 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://togithub.com/renovatebot/renovate).

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

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-12-13 02:47:34 -06:00
Jacek Kolezynski
e287528eda
[Security Solution] Change handling whitespace for textarea autoheight to pre (#203993)
**Resolves: #178615**

## Summary

Change the way kbnQueryBar__textarea--autoHeight css class handles the
whitespace. Instead of `normal` use `pre`. This improves the
behavior for long pre-formatted texts in the query field in Firefox. It doesn't affect
Chrome nor Safari.


## BEFORE
### Chrome 
<img width="1013" alt="image"
src="https://github.com/user-attachments/assets/c56be529-b55d-4170-a6d1-4d7b01d98b3e"
/>

### Safari
<img width="925" alt="image"
src="https://github.com/user-attachments/assets/2697c72f-a063-49b8-8501-80e90ef0733f"
/>

### Firefox **(the issue is here)**
<img width="927" alt="image"
src="https://github.com/user-attachments/assets/ed896f71-5303-4ef4-9899-3d46b3e99af7"
/>


## AFTER
### Chrome
<img width="1014" alt="image"
src="https://github.com/user-attachments/assets/71259eb8-c984-4c7f-99a7-d4f528568f3b"
/>

### Safari
<img width="942" alt="image"
src="https://github.com/user-attachments/assets/998499a4-6480-4407-8e40-a897c0d2e7b8"
/>

### Firefox **(Note that the issue is gone)**
<img width="924" alt="image"
src="https://github.com/user-attachments/assets/f79f86d5-726d-4f7d-9c06-d2e003cfcd97"
/>

Note: please notice that for some reason, with this setting, Firefox
additionally presents the whole text at the bottom as one line. But that
should be OK.
<img width="831" alt="image"
src="https://github.com/user-attachments/assets/43198645-7d3e-4f74-a59e-9577531349a6"
/>
2024-12-13 09:35:42 +01:00
James Gowdy
0eb8322c33
[Fleet] Updating trained model test data (#204008)
Replaces `estimated_heap_memory_usage_bytes` with `model_size_bytes` as
it has been deprecated.
2024-12-13 08:31:47 +00:00
Kibana Machine
b52051116a
[api-docs] 2024-12-13 Daily api_docs build (#204163)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/920
2024-12-13 01:43:45 -06:00
Abhishek Bhatia
a95ec61444
[Entity Analytics][UI] UI changes for Risk Engine to include closed alerts for risk score calculation (#201909)
## Summary

We are introducing a new feature that allows users to include "closed"
alerts in risk score calculations.

Users can toggle a button to include closed alerts in the risk score
calculation and specify a date/time range for the calculation.
Additionally, they can preview the data before finalising and saving
these changes for the next engine run.


![Image](https://github.com/user-attachments/assets/5f91c990-22d6-46e5-8a7b-9875003867e4)

### **Note : This PR is an extension to the following PRs.**

- [API] : https://github.com/elastic/kibana/pull/201344
- [API] : https://github.com/elastic/kibana/pull/201397

### 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/packages/kbn-i18n/README.md)
- [x]
[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
- [ ] 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>
2024-12-13 12:11:12 +05:30
Gerard Soldevila
a9f076cb1f
Sustainable Kibana Architecture: Move modules owned by @elastic/security-threat-hunting (#203046)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

#### 2 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/data-stream-adapter` |
`x-pack/solutions/security/packages/kbn-data-stream-adapter` |
| `@kbn/index-adapter` |
`x-pack/solutions/security/packages/kbn-index-adapter` |

---------

Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 22:29:21 -06:00
Davis Plumlee
0294838a95
[Security Solution] Adds normalization for query fields before diff algorithm comparison (#203482)
## Summary

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

Adds a normalization for the `kql_query`, `eql_query`, and `esql_query`
fields that trims the whitespace from the beginning and end of query
strings for a more robust comparison in the diff algorithms. Since
whitespace before or after the query string is purely a formatting
choice and doesn't impact the query itself, we discard the excess
whitespace characters before the direct string comparison.

### 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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
2024-12-12 22:58:50 -05:00
Devon Thomson
abfd590d4d
[Embeddables Rebuild] Make Serialize Function Synchronous (#203662)
changes the signature of the `serializeState` function so that
it no longer returns MaybePromise
2024-12-12 21:25:03 -05:00
Tiago Costa
02a2ff106e
skip flaky suite (#202504) 2024-12-13 00:43:44 +00:00
Tiago Costa
5d34e71a32
skip flaky suite (#203179) 2024-12-13 00:41:33 +00:00
Kerry Gallagher
82f9da1a8e
[Streams 🌊] Schema editor UI (#202372)
## Summary

Implements https://github.com/elastic/observability-dev/issues/4133.

Opening this up for a first pass as the PR is getting quite big. I've
listed below some things that can be improved in further iterations.

## High level notes 

- Support for `format` has been added to the field definition
- UI: 
  - View inherited, mapped, unmapped fields.
  - Edit mapped and unmapped fields.
  - Map unmapped and unmap mapped fields
  - Simulation / preview results
  - Filtering

## Followups

- Filter dropdowns (on the right):

![Screenshot 2024-12-05 at 19 31
05](https://github.com/user-attachments/assets/31f22cd6-bf39-49bf-ba1c-1e94e42ebbd6)

- We could potentially use a separate API for the mapping edits, rather
than the core edit route, to be more performant, but for now this is
used to create less surface area / deviation.

- State management is rudimentary right now. It could be improved with a
`useReducer` approach to avoid potential `useState` race conditions, and
then even something like xstate when things are more concrete. No state
syncs with the URL currently.
- Due to the lack of URL state syncing the "Edit in parent stream"
button doesn't navigate with things like a pre-selected field. We could
potentially co-ordinate this between the hooks in the schema editor and
detail view parent, but it's unneeded complexity at the moment.

- We could provide a lot more assistance with `format`. We could provide
a dropdown with options, and then a toggle to do custom. (Actually, it
looks like in the refined designs this is a dropdown, so I'll probably
switch this to a select with predefined options)


## Issues

- There seems to be a bug in the Elasticsearch JS library we use, calls
to `simulate.ingest` don't work as `body` is just set to `undefined`
(chasing this up). You can do the following patch in node_modules just
to get things going (run `yarn start` again):

![Screenshot 2024-12-05 at 19 52
08](https://github.com/user-attachments/assets/73e8e067-ca36-472f-81fc-f8158653f0c8)

- Runtime mappings don't seem to work with `match_only_text`:
`mapper_parsing_exception: No handler for type [match_only_text]`

## Open questions

- We might freeze changes to the root stream
- A failure on simulation doesn't do a hard block on saving changes. I
don't think it should, but open to other opinions.

## Screenshots

![Screenshot 2024-12-05 at 19 50
33](https://github.com/user-attachments/assets/bcccc223-1c65-47c5-8b06-7c79ed4004e6)
![Screenshot 2024-12-05 at 19 50
42](https://github.com/user-attachments/assets/c9cc24d6-738f-4d9a-a8a9-114403548f69)
![Screenshot 2024-12-05 at 19 50
54](https://github.com/user-attachments/assets/c19e5d37-b194-449e-ba46-6bd7eb0784cd)
![Screenshot 2024-12-05 at 19 41
15](https://github.com/user-attachments/assets/f2b4306c-1d6b-4899-914b-8796151ed2c2)
![Screenshot 2024-12-05 at 19 41
27](https://github.com/user-attachments/assets/effea5bd-b0fb-4c16-a758-a37fa25cb965)
![Screenshot 2024-12-05 at 19 49
53](https://github.com/user-attachments/assets/8f963162-9d7e-4fb2-b702-5af0d9c4f6a7)
![Screenshot 2024-12-05 at 19 50
03](https://github.com/user-attachments/assets/2c34b320-b0b2-4c16-8e78-018b461f7969)

---------

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-13 00:39:52 +00:00
Tiago Costa
4dd0f133ca
skip flaky suite (#204069) 2024-12-13 00:38:51 +00:00
Tiago Costa
9275ab5937
fix(NA): run condition on trigger_version_dependent_jobs/pipeline.ts for forward compatibility 9 dot 0 2024-12-13 00:33:40 +00:00
Tiago Costa
e46f0b608d
refact(NA): rename .buildkite/pipeline-resource-definitions/kibana-es-forward-testing-v9.yml to 9-fot-0 2024-12-13 00:07:11 +00:00
Elena Shostak
52dd7e17c4
[Authz] Operator privileges (#196583)
## Summary

This PR adds support for explicit indication whether endpoint is
restricted to operator only users.

### Context
1. If user has [all operator
privileges](https://github.com/elastic/elasticsearch/blob/main/x-pack/plugin/security/src/main/java/org/elasticsearch/xpack/security/operator/DefaultOperatorOnlyRegistry.java#L35-#L53)
granted, but is not listed as operator in `operator_users.yml`, ES would
throw an unauthorized error.
2. If user is listed as operator in `operator_users.yml`, but doesn't
have necessary privileges granted, ES would throw an unauthorized error.
3. It’s not possible to determine if a user is operator via any ES API,
i.e. `_has_privileges`.
4. If operator privileges are disabled we skip the the check for it,
that's why we require to explicitly specify additional privileges to
ensure that the route is protected even when operator privileges are
disabled.

### Checklist

- [x]
[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

__Relates: https://github.com/elastic/kibana/issues/196271__

### How to test

1. Add your user to the operators list
1bd8144924/packages/kbn-es/src/serverless_resources/operator_users.yml (L4)
or use existing user from the list to log in.
2. Run ES and Kibana serverless
3. Change any endpoint or create a new one with the following security
config
```
      security: {
        authz: {
          requiredPrivileges: [ReservedPrivilegesSet.operator],
        },
      },
```
4. Check with enabled and disabled operator privileges (set
`xpack.security.operator_privileges.enabled`)

## Release Note
Added support for explicit indication whether endpoint is restricted to
operator only users at the route definition level.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-12 23:55:04 +01:00
Brandon Morelli
60399abab1
Update data-views.asciidoc (#203854)
## Summary

Remove backticks from two code blocks.
2024-12-12 14:36:58 -08:00
Gerard Soldevila
33c18c72fa
Sustainable Kibana Architecture: Move modules owned by @elastic/security-threat-hunting-investigations (#202855)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> * This PR has been auto-generated.
> * Any manual contributions will be lost if the 'relocate' script is
re-run.
> * Try to obtain the missing reviews / approvals before applying manual
fixes, and/or keep your changes in a .patch / git stash.
> * Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.

#### 2 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/threat-intelligence-plugin` |
`x-pack/solutions/security/plugins/threat_intelligence` |
| `@kbn/timelines-plugin` |
`x-pack/solutions/security/plugins/timelines` |

#### 2 packages(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/expandable-flyout` |
`x-pack/solutions/security/packages/kbn-expandable-flyout` |
| `@kbn/securitysolution-data-table` |
`x-pack/solutions/security/packages/data_table` |

Co-authored-by: PhilippeOberti <philippe.oberti@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 16:22:03 -06:00
Kfir Peled
749eeec4cc
[Cloud Security] Show graph visualization in expanded flyout (#198240)
## Summary

Added graph tab to the flyout visualization of alerts and events.

**A couple of included changes:**
- Added technical preview badge
- ~Feature is now toggled using
`securitySolution:enableVisualizationsInFlyout` advanced setting~
reverted back to use the experimental feature flag
- Added node popover to expand the graph
- Expanding a graph adds relevant filters
- Added e2e tests for both alerts flyout and events flyout (through
network page)

**List of known issues:**
- The graph API works queries `logs-*` while the filters bar works with
sourcerer current dataview Id
- I'm not sure how to write a UT for GraphVisualization / Popover which
uses ReactPortal that makes it tricky to test (I covered most scenarios
using E2E test)
- Expanding graph more than once adds another filter


**How to test this PR:**

- Enable the feature flag 

`kibana.dev.yml`:

```yaml
uiSettings.overrides.securitySolution:enableVisualizationsInFlyout: true
xpack.securitySolution.enableExperimental: ['graphVisualizationInFlyoutEnabled']
```

- Load mocked data:

```bash
node scripts/es_archiver load x-pack/test/cloud_security_posture_functional/es_archives/logs_gcp_audit \ 
  --es-url http://elastic:changeme@localhost:9200 \
  --kibana-url http://elastic:changeme@localhost:5601

node scripts/es_archiver load x-pack/test/cloud_security_posture_functional/es_archives/security_alerts \
  --es-url http://elastic:changeme@localhost:9200 \
  --kibana-url http://elastic:changeme@localhost:5601
```

- Make sure you include data from Oct 13 2024. (in the video I use Last
90 days)


https://github.com/user-attachments/assets/12e19ac7-0f61-4c0a-ac11-e304dfcc83d4



### Checklist

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[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
- [x] [Flaky Test
Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was
used on any tests changed
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 16:14:44 -06:00
Tiago Costa
b1363d925e
fix(NA): update pipeline resource definitions locations to include .buildkite/pipeline-resource-definitions/kibana-es-forward-testing-v9.yml 2024-12-12 22:14:11 +00:00
Bryce Buchanan
278889ab41
[EUI][APM] Update Hardcoded Colors (#203348)
## Summary

This PR replaces a couple of places where hardcoded colors are used in
the APM portion of Kibana with EUITheme colors.
Before & After screenshots can be seen in the associated issue, #200960.
However, I was unable to find an example for the
[.../alert_details_app_section/failed_transaction_chart.tsx](https://github.com/elastic/kibana/pull/203348/files#diff-9d9e4bbfe128f4d2f6ff7f027cf746d679a6c06805ef77240cceb2770a837a28).
It seems like this chart in the alert creation flyout will never render
with annotations.

### Checklist

Check the PR satisfies following conditions. 
Reviewers should verify this PR satisfies this list as well.

- [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: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
2024-12-12 16:09:17 -06:00
Tiago Costa
b3e2b4bf06
chore(NA): adds forward compatibility v9 pipeline (#204111)
Closes https://github.com/elastic/kibana-operations/issues/215

This PR adds a pipeline setup to test forward compatibility of Kibana
8.18 against ES 9.0.
2024-12-12 22:05:10 +00:00
Ash
b4331195d6
[Serverless][DataUsage] Data usage UX/API updates (#203465) 2024-12-12 22:24:42 +01:00
Krzysztof Kowalczyk
780316832b
[User Profile] Update edit profile header layout (#202902)
## Summary

This PR updates layout of `User Profile` header according to [this
design](https://github.com/elastic/kibana/issues/200059#issuecomment-2512452474).
Since those changes break the layout pattern suggested by EUI, I had to
move the content to be `children` of the header [as the EUI docs
suggest.](https://eui.elastic.co/#/layout/page-header#customizing-the-page-header)

Closes: #200059

---------

Co-authored-by: Ryan Keairns <contactryank@gmail.com>
2024-12-12 22:02:27 +01:00
Alejandro Fernández Haro
55b5baae64
[l10n] Fix codeowners again (#203998) 2024-12-12 14:52:10 -06:00
Tim Sullivan
80160cbf8f
Preparation for High Contrast Mode, ResponseOps domains (#202610)
## Summary

**Reviewers: Please test the code paths affected by this PR. See the
"Risks" section below.**

Part of work for enabling "high contrast mode" in Kibana. See
https://github.com/elastic/kibana/issues/176219.

**Background:**
Kibana will soon have a user profile setting to allow users to enable
"high contrast mode." This setting will activate a flag with
`<EuiProvider>` that causes EUI components to render with higher
contrast visual elements. Consumer plugins and packages need to be
updated selected places where `<EuiProvider>` is wrapped, to pass the
`UserProfileService` service dependency from the CoreStart contract.

**NOTE:** **EUI currently does not yet support the high-contrast mode
flag**, but support for that is expected to come in around 2 weeks.
These first PRs are simply preparing the code by wiring up the
`UserProvideService`.

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

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

- [ ] [medium/high] The implementor of this change did not manually test
the affected code paths and relied on type-checking and functional tests
to drive the changes. Code owners for this PR need to manually test the
affected code paths.
- [ ] [medium] The `UserProfileService` dependency comes from the
CoreStart contract. If acquiring the service causes synchronous code to
become asynchronous, check for race conditions or errors in rendering
React components. Code owners for this PR need to manually test the
affected code paths.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 14:34:44 -06:00
Gerard Soldevila
5dee9994c9
Sustainable Kibana Architecture: Move modules owned by @elastic/obs-ux-management-team (#202832)
## Summary

This PR aims at relocating some of the Kibana modules (plugins and
packages) into a new folder structure, according to the _Sustainable
Kibana Architecture_ initiative.

> [!IMPORTANT]
> * We kindly ask you to:
> * Manually fix the errors in the error section below (if there are
any).
> * Search for the `packages[\/\\]` and `plugins[\/\\]` patterns in the
source code (Babel and Eslint config files), and update them
appropriately.
> * Manually review
`.buildkite/scripts/pipelines/pull_request/pipeline.ts` to ensure that
any CI pipeline customizations continue to be correctly applied after
the changed path names
> * Review all of the updated files, specially the `.ts` and `.js` files
listed in the sections below, as some of them contain relative paths
that have been updated.
> * Think of potential impact of the move, including tooling and
configuration files that can be pointing to the relocated modules. E.g.:
>     * customised eslint rules
>     * docs pointing to source code

> [!NOTE]
> This PR has been auto-generated.
> Do not attempt to push any changes unless you know what you are doing.
> Please use
[#sustainable_kibana_architecture](https://elastic.slack.com/archives/C07TCKTA22E)
Slack channel for feedback.




#### 8 plugin(s) are going to be relocated:

| Id | Target folder |
| -- | ------------- |
| `@kbn/exploratory-view-plugin` |
`x-pack/solutions/observability/plugins/exploratory_view` |
| `@kbn/investigate-app-plugin` |
`x-pack/solutions/observability/plugins/investigate_app` |
| `@kbn/investigate-plugin` |
`x-pack/solutions/observability/plugins/investigate` |
| `@kbn/observability-plugin` |
`x-pack/solutions/observability/plugins/observability` |
| `@kbn/serverless-observability` |
`x-pack/solutions/observability/plugins/serverless_observability` |
| `@kbn/slo-plugin` | `x-pack/solutions/observability/plugins/slo` |
| `@kbn/synthetics-plugin` |
`x-pack/solutions/observability/plugins/synthetics` |
| `@kbn/uptime-plugin` | `x-pack/solutions/observability/plugins/uptime`
|


#### 10 package(s) are going to be relocated:

  | Id | Target folder |
  | -- | ------------- |
| `@kbn/data-forge` | `x-pack/platform/packages/shared/kbn-data-forge` |
| `@kbn/deeplinks-observability` |
`src/platform/packages/shared/deeplinks/observability` |
| `@kbn/infra-forge` |
`x-pack/platform/packages/private/kbn-infra-forge` |
| `@kbn/investigation-shared` |
`x-pack/solutions/observability/packages/kbn-investigation-shared` |
| `@kbn/observability-alert-details` |
`x-pack/solutions/observability/packages/alert_details` |
| `@kbn/observability-alerting-rule-utils` |
`x-pack/platform/packages/shared/observability/alerting_rule_utils` |
| `@kbn/observability-alerting-test-data` |
`x-pack/solutions/observability/packages/alerting_test_data` |
| `@kbn/observability-get-padded-alert-time-range-util` |
`x-pack/solutions/observability/packages/get_padded_alert_time_range_util`
|
| `@kbn/observability-synthetics-test-data` |
`x-pack/solutions/observability/packages/synthetics_test_data` |
| `@kbn/slo-schema` | `x-pack/platform/packages/shared/kbn-slo-schema` |


<details>
<summary>Updated references</summary>

```
./.buildkite/ftr_oblt_stateful_configs.yml
./.buildkite/pipelines/on_merge_unsupported_ftrs.yml
./.buildkite/pipelines/pull_request/exploratory_view_plugin.yml
./.buildkite/pipelines/pull_request/slo_plugin_e2e.yml
./.buildkite/pipelines/pull_request/synthetics_plugin.yml
./.buildkite/pipelines/pull_request/uptime_plugin.yml
./.buildkite/scripts/steps/functional/exploratory_view_plugin.sh
./.buildkite/scripts/steps/functional/slo_plugin_e2e.sh
./.buildkite/scripts/steps/functional/synthetics.sh
./.buildkite/scripts/steps/functional/synthetics_plugin.sh
./.buildkite/scripts/steps/functional/uptime_plugin.sh
./.eslintrc.js
./.github/paths-labeller.yml
./.i18nrc.json
./docs/developer/plugin-list.asciidoc
./oas_docs/overlays/alerting.overlays.yaml
./oas_docs/scripts/merge_ess_oas.js
./oas_docs/scripts/merge_serverless_oas.js
./package.json
./packages/kbn-eslint-plugin-i18n/helpers/get_i18n_identifier_from_file_path.test.ts
./packages/kbn-eslint-plugin-i18n/rules/formatted_message_should_start_with_the_right_id.test.ts
./packages/kbn-eslint-plugin-i18n/rules/i18n_translate_should_start_with_the_right_id.test.ts
./packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_formatted_message.test.ts
./packages/kbn-eslint-plugin-i18n/rules/strings_should_be_translated_with_i18n.test.ts
./packages/kbn-eslint-plugin-telemetry/helpers/get_app_name.test.ts
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./src/dev/storybook/aliases.ts
./src/platform/packages/shared/deeplinks/observability/jest.config.js
./src/plugins/guided_onboarding/README.md
./tsconfig.base.json
./x-pack/.i18nrc.json
./x-pack/platform/packages/private/kbn-infra-forge/jest.config.js
./x-pack/platform/packages/shared/kbn-data-forge/jest.config.js
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_hosts/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_logs/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/admin_console/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/heartbeat/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/message_processor/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/mongodb/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/nginx_proxy/ecs/generate.sh
./x-pack/platform/packages/shared/kbn-slo-schema/jest.config.js
./x-pack/platform/packages/shared/observability/alerting_rule_utils/jest.config.js
./x-pack/plugins/observability_solution/observability/dev_docs/custom_threshold.md
./x-pack/plugins/observability_solution/slo/dev_docs/slo.md
./x-pack/plugins/observability_solution/uptime/.buildkite/pipelines/flaky.sh
./x-pack/plugins/observability_solution/uptime/README.md
./x-pack/plugins/observability_solution/uptime/e2e/README.md
./x-pack/solutions/observability/packages/alert_details/jest.config.js
./x-pack/solutions/observability/packages/alerting_test_data/jest.config.js
./x-pack/solutions/observability/packages/get_padded_alert_time_range_util/jest.config.js
./x-pack/solutions/observability/packages/kbn-investigation-shared/jest.config.js
./x-pack/solutions/observability/packages/synthetics_test_data/jest.config.js
./x-pack/solutions/observability/plugins/exploratory_view/README.md
./x-pack/solutions/observability/plugins/exploratory_view/e2e/README.md
./x-pack/solutions/observability/plugins/exploratory_view/jest.config.js
./x-pack/solutions/observability/plugins/investigate/jest.config.js
./x-pack/solutions/observability/plugins/investigate_app/jest.config.js
./x-pack/solutions/observability/plugins/observability/jest.config.js
./x-pack/solutions/observability/plugins/slo/docs/openapi/slo/README.md
./x-pack/solutions/observability/plugins/slo/jest.config.js
./x-pack/solutions/observability/plugins/synthetics/.buildkite/pipelines/flaky.sh
./x-pack/solutions/observability/plugins/synthetics/README.md
./x-pack/solutions/observability/plugins/synthetics/e2e/README.md
./x-pack/solutions/observability/plugins/synthetics/jest.config.js
./x-pack/solutions/observability/plugins/uptime/e2e/README.md
./x-pack/solutions/observability/plugins/uptime/jest.config.js
./yarn.lock
```
</details>
<details>
<summary>Updated relative paths</summary>

```
src/platform/packages/shared/deeplinks/observability/jest.config.js:12
src/platform/packages/shared/deeplinks/observability/tsconfig.json:2
x-pack/platform/packages/private/kbn-infra-forge/jest.config.js:10
x-pack/platform/packages/private/kbn-infra-forge/tsconfig.json:2
x-pack/platform/packages/shared/kbn-data-forge/jest.config.js:10
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_hosts/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_logs/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/admin_console/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/heartbeat/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/message_processor/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/mongodb/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/src/data_sources/fake_stack/nginx_proxy/ecs/generate.sh:3
x-pack/platform/packages/shared/kbn-data-forge/tsconfig.json:2
x-pack/platform/packages/shared/kbn-slo-schema/jest.config.js:10
x-pack/platform/packages/shared/kbn-slo-schema/tsconfig.json:2
x-pack/platform/packages/shared/observability/alerting_rule_utils/jest.config.js:10
x-pack/platform/packages/shared/observability/alerting_rule_utils/tsconfig.json:2
x-pack/solutions/observability/packages/alert_details/jest.config.js:10
x-pack/solutions/observability/packages/alert_details/tsconfig.json:2
x-pack/solutions/observability/packages/alerting_test_data/jest.config.js:10
x-pack/solutions/observability/packages/alerting_test_data/tsconfig.json:2
x-pack/solutions/observability/packages/get_padded_alert_time_range_util/jest.config.js:10
x-pack/solutions/observability/packages/get_padded_alert_time_range_util/tsconfig.json:2
x-pack/solutions/observability/packages/kbn-investigation-shared/jest.config.js:12
x-pack/solutions/observability/packages/kbn-investigation-shared/tsconfig.json:2
x-pack/solutions/observability/packages/synthetics_test_data/jest.config.js:10
x-pack/solutions/observability/packages/synthetics_test_data/tsconfig.json:2
x-pack/solutions/observability/plugins/exploratory_view/e2e/README.md:13
x-pack/solutions/observability/plugins/exploratory_view/e2e/synthetics_run.ts:28
x-pack/solutions/observability/plugins/exploratory_view/e2e/synthetics_run.ts:33
x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:19
x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:27
x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:34
x-pack/solutions/observability/plugins/exploratory_view/e2e/tsconfig.json:2
x-pack/solutions/observability/plugins/exploratory_view/jest.config.js:10
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/README.md:116
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/README.md:156
x-pack/solutions/observability/plugins/exploratory_view/public/components/shared/exploratory_view/README.md:161
x-pack/solutions/observability/plugins/exploratory_view/tsconfig.json:2
x-pack/solutions/observability/plugins/exploratory_view/tsconfig.json:6
x-pack/solutions/observability/plugins/investigate/jest.config.js:10
x-pack/solutions/observability/plugins/investigate/tsconfig.json:2
x-pack/solutions/observability/plugins/investigate/tsconfig.json:7
x-pack/solutions/observability/plugins/investigate_app/jest.config.js:10
x-pack/solutions/observability/plugins/investigate_app/tsconfig.json:2
x-pack/solutions/observability/plugins/investigate_app/tsconfig.json:7
x-pack/solutions/observability/plugins/observability/dev_docs/custom_threshold.md:10
x-pack/solutions/observability/plugins/observability/dev_docs/custom_threshold.md:36
x-pack/solutions/observability/plugins/observability/dev_docs/feature_flags.md:14
x-pack/solutions/observability/plugins/observability/jest.config.js:10
x-pack/solutions/observability/plugins/observability/tsconfig.json:12
x-pack/solutions/observability/plugins/observability/tsconfig.json:2
x-pack/solutions/observability/plugins/serverless_observability/package.json:8
x-pack/solutions/observability/plugins/serverless_observability/package.json:9
x-pack/solutions/observability/plugins/serverless_observability/tsconfig.json:12
x-pack/solutions/observability/plugins/serverless_observability/tsconfig.json:2
x-pack/solutions/observability/plugins/slo/dev_docs/slo.md:11
x-pack/solutions/observability/plugins/slo/e2e/tsconfig.json:2
x-pack/solutions/observability/plugins/slo/jest.config.js:10
x-pack/solutions/observability/plugins/slo/tsconfig.json:10
x-pack/solutions/observability/plugins/slo/tsconfig.json:2
x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:19
x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:27
x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:34
x-pack/solutions/observability/plugins/synthetics/e2e/tsconfig.json:2
x-pack/solutions/observability/plugins/synthetics/jest.config.js:10
x-pack/solutions/observability/plugins/synthetics/tsconfig.json:12
x-pack/solutions/observability/plugins/synthetics/tsconfig.json:2
x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:19
x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:27
x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:34
x-pack/solutions/observability/plugins/uptime/e2e/tasks/read_kibana_config.ts:15
x-pack/solutions/observability/plugins/uptime/e2e/tsconfig.json:2
x-pack/solutions/observability/plugins/uptime/jest.config.js:10
x-pack/solutions/observability/plugins/uptime/tsconfig.json:13
x-pack/solutions/observability/plugins/uptime/tsconfig.json:2
```
</details>
<details>
<summary>Script errors</summary>

```
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:27
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/exploratory_view/e2e/tasks/es_archiver.ts:34
Cannot replace multiple occurrences of "../../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/observability/dev_docs/feature_flags.md:14
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:19
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:27
Cannot replace multiple occurrences of "../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/synthetics/e2e/tasks/es_archiver.ts:34
Cannot replace multiple occurrences of "../../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:19
Cannot replace multiple occurrences of "../../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:27
Cannot replace multiple occurrences of "../../../.." in the same line, please fix manually:	/Users/gsoldevila/Work/kibana-tertiary/x-pack/solutions/observability/plugins/uptime/e2e/tasks/es_archiver.ts:34

```
</details>

---------

Co-authored-by: shahzad31 <shahzad31comp@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 14:28:21 -06:00
Eric Beahan
2d761842ca
[Automatic Import] Borealis theme integration (#202598)
Integrate changes for Borealis theme to `integration_assistant` plugin.
2024-12-12 13:37:58 -06:00
Tim Sullivan
99aa884fa0
Preparation for High Contrast Mode, Analytics Experience domains (#202608)
## Summary

**Reviewers: Please test the code paths affected by this PR. See the
"Risks" section below.**

Part of work for enabling "high contrast mode" in Kibana. See
https://github.com/elastic/kibana/issues/176219.

**Background:**
Kibana will soon have a user profile setting to allow users to enable
"high contrast mode." This setting will activate a flag with
`<EuiProvider>` that causes EUI components to render with higher
contrast visual elements. Consumer plugins and packages need to be
updated selected places where `<EuiProvider>` is wrapped, to pass the
`UserProfileService` service dependency from the CoreStart contract.

**NOTE:** **EUI currently does not yet support the high-contrast mode
flag**, but support for that is expected to come in around 2 weeks.
These first PRs are simply preparing the code by wiring up the
`UserProvideService`.

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

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

- [ ] [medium/high] The implementor of this change did not manually test
the affected code paths and relied on type-checking and functional tests
to drive the changes. Code owners for this PR need to manually test the
affected code paths.
- [ ] [medium] The `UserProfileService` dependency comes from the
CoreStart contract. If acquiring the service causes synchronous code to
become asynchronous, check for race conditions or errors in rendering
React components. Code owners for this PR need to manually test the
affected code paths.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 13:16:07 -06:00
Tim Sullivan
0a384639a6
[SharedUX] EUI visual refresh for SharedUX (#202780)
## Summary

Part of https://github.com/elastic/kibana/issues/200620

1. Remove usage of deprecated color variables
2. Remove usage of `@kbn/ui-theme`
3. A few other changes as requested by @andreadelrio

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 12:02:36 -07:00
Marius Iversen
0a7262d0fc
[Rule Migration] Improve rule translation prompts and processes (#204021)
## Summary

This PR performs multiple changes that all focuses on improving the
quality of the results returned when we translate rules that do not
match with a prebuilt rule and both with/without related integrations.

Changes include:

- Add a filter_index_patterns node, to always ensure `logs-*` is removed
with our `[indexPattern:logs-*]` value, which is similar to how we
detect missing lookups and macros.
- Split `translate_rule` into another `ecs_mapping` node, trying to
ensure translation focuses on changing SPL to ESQL without any focus on
actual field names, while the other node focuses only on the ESQL query
and changing field names.
- The summary now added in the comments have 1 for the translation and
one for the ECS mapping.
- Add default rule batch size `15` with PR comment/question.
- Ensure we only return one integration related rather than an array for
now, to make ESQL more focused on one related integration.
- New prompt to filter out one or more integrations from the returned
RAG; similar to how its done for rules RAG results already.
2024-12-12 19:32:04 +01:00
David Olaru
0dabc52fef
[kbn-code-owners] General improvements (#204023)
## Summary
The following improvements have been made:
- Added `--json` flag to CLI command to output result as JSON
- Terminology updated to more accurately reflect object contents
- Code owner teams are always returned as an array
- Search path validation (is under repo root, exists)
- Proper handling of inline comments
- Better logging for `scripts/check_ftr_code_owners.js`

Existing usage of the `@kbn/code-owners` package has been updated
accordingly, without modifying outcomes.
2024-12-12 12:05:01 -06:00
José Luis González
5e69fd1498
[Search] Fixing connectors flaky FTR (#203520)
## Summary

Fixing flaky test when choosing a connector with the new EuiComboBox
component.

https://github.com/elastic/kibana/issues/203462

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-12 18:57:01 +01:00
Alejandro Fernández Haro
a1a78d1dc4
[Deprecation Service] Add namespaces callout to the docs (#202768) 2024-12-12 11:56:47 -06:00
Kfir Peled
231f1b3fca
[Cloud Security] CDR Graph - fix labels overlap when there are multiple labels (#204020) 2024-12-12 11:45:00 -06:00
Marco Antonio Ghiani
08da9468b2
[One Discover] Revert token change from vis palette (#204054)
## 📓 Summary

Related to https://github.com/elastic/kibana/pull/202985

This change reverts a suggestion that was applied but that should only
be valid for v9.

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
2024-12-12 18:01:49 +01:00
natasha-moore-elastic
cebcf01d35
[DOCS] Adds conceptual content to API docs (#202305)
## Summary

Resolves https://github.com/elastic/security-docs-internal/issues/49.

In order to retire asciidoc API docs, we first need to move over any
relevant content from those docs to the API reference site. This PR adds
the relevant conceptual information from:

-
https://www.elastic.co/guide/en/security/master/exceptions-api-overview.html
-
https://www.elastic.co/guide/en/security/master/lists-api-overview.html
- https://www.elastic.co/guide/en/security/master/rule-api-overview.html

### Previews:
Bump previews expire after 30min, so I'm providing screenshots below:

Detections preview:

![detections_preview](https://github.com/user-attachments/assets/c47b9d85-b5d0-4a32-8668-dc1ae2215681)

Exceptions preview:

![exceptions_preview](https://github.com/user-attachments/assets/b3fe9139-2162-4c56-bba9-751dffa11cb4)

Lists preview:

![lists_preview](https://github.com/user-attachments/assets/1c714f17-825d-45c7-8112-cc3d25c51047)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 16:53:29 +00:00
Gerard Soldevila
a4e4a6061b
Make task_cost_check test resilient to changes in order (#204045)
## Summary

Addresses failures such as
https://buildkite.com/elastic/kibana-pull-request/builds/259739#0193bb07-c759-4749-965e-10e63ac0810a.

We believe the order in which task types are registered might have been
affected by the relocation of the
`@kbn/observability-ai-assistant-app-plugin` in the scope of
_Sustainable Kibana Architecture_.
2024-12-12 10:50:03 -06:00
Kevin Delemme
2ab38a3664
feat(investigation): Add eventTypes filter on the API (#202829) 2024-12-12 10:49:34 -06:00
Ievgen Sorokopud
668f776583
[Rules migration] ES|QL query editing and validation in translation tab in the flyout (#11381) (#203601)
## Summary

[Internal link](https://github.com/elastic/security-team/issues/10820)
to the feature details

These changes add a possibility to edit, validate and save custom
migration rules:
* There are new `edit`, `save` and `cancel` buttons in the translation
tab of the details flyout for the non-installed custom rules
* There is a new ES|QL query editing component in the translation tab
which allows edit and validate the ES|QL query
* On saving the ES|QL query the custom migration rule will be updated
and based on the ES|QL validation a new `translation_result` might be
set: `full` if query is valid, `partial` if query has syntax errors,
`untraslated` if query is an empty string.

## Screen recording


https://github.com/user-attachments/assets/59cfc56f-3de8-4f7a-a2f9-79cb3fdee1c7

### Other changes

Next fixes and adjustments were also implemented as part of this PR:
* `Error` status in migration rules table to indicate whether the rule
translation has been failed
* Callouts inside the translation tab in details flyout
* Updated `Fully translated` status title into `Translated`

### Known issue

There is an issue with the autocompletion menu of the ES|QL query editor
component. It is being shifted. It could be because we are using this
component within the flyout and we might need to ask help from the team
which takes care of it.
2024-12-12 17:22:38 +01:00
Sergi Massaneda
8c7883fd98
[SecuritySolution][siem migrations] Onboarding UI flyout macros input (#203483)
## Summary

From: https://github.com/elastic/security-team/issues/10667

This is the part 2 of the issue - The macros input

Implementation of the Onboarding card to create migrations using the
flyout.

> [!NOTE]  
> This feature needs `siemMigrationsEnabled` experimental flag enabled
to work. Otherwise only the default topic will be available and the
topic selector won't be displayed.


### Screenshots
<img width="1457" alt="Macros step"
src="https://github.com/user-attachments/assets/48ec806e-1fcf-4dbb-998e-cb6a06d9ebaa">
<img width="1457" alt="loading"
src="https://github.com/user-attachments/assets/a643de40-3d62-4dbf-a7aa-4f30839bc1b8">
<img width="1457" alt="done"
src="https://github.com/user-attachments/assets/b384af03-6bdb-4b10-bd26-18d3b4715677">

#### To do in part 3:
- Implement missing steps in the flyout: Lookups

### Test 
Enable experimental flag
Rule file:
[rules_test.json](https://github.com/user-attachments/files/18082165/rules_test.json)
Macros file:
[macros_test.json](https://github.com/user-attachments/files/18082169/macros_test.json)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-12 17:12:18 +01:00
Nathan Reese
7218d01aa4
[embeddable] remove setCustomEmbeddableFactoryProvider from setup API (#203853)
Part of https://github.com/elastic/kibana/issues/167429

Remove `setCustomEmbeddableFactoryProvider` from embeddable setup API.
`setCustomEmbeddableFactoryProvider` only used in `embeddable_enhanced`
plugin. Replaced with `initializeReactEmbeddableDynamicActions` in react
embeddable system.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-12 09:11:48 -07:00
Jesus Wahrman
b059879764
[UA] Removes logs explorer panel from UI (#203833)
## Summary

resolves https://github.com/elastic/kibana/issues/201532

Removed the panel containing the logs explorer link. Updated tests and
i18n.


### 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
- [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>
2024-12-12 16:42:00 +01:00
Kibana Machine
6154ddfac2 skip failing test suite (#203982) 2024-12-13 02:39:04 +11:00
Nathan Reese
9ce5239392
[embeddable] remove getAttributeService from start API (#203660)
Part of embeddable refactor cleanup

AttributeService is moved from embeddable plugin to visualizations
plugin.

PR reduces visualizations bundle size by avoiding importing
`legacy/embeddable/index.ts` in plugin page load

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-12 08:38:11 -07:00
Gonçalo Rica Pais da Silva
d9f8f170ce
[ObsUX][Synthtrace] Replace multistream use with own util method (#203988)
## Summary

A whole dependency was being pulled in for doing something that could
easily be done just using Node.js own utils and be made into a simple
method. As such, `multistream` has been removed since there is no other
place in the codebase that is using it.

## How to test

* Load Kibana local dev environment using synthtrace data/scenarios. No
scenario should fail to load normally, and all tests using synthtrace
data should pass as expected.

Closes #203860
2024-12-12 16:28:19 +01:00
Paul Tavares
2ab8a5ced0
[Security Solution][Endpoint] Cypress test improvements to capture Agent diagnostics file when test fails (#202965)
## Summary

- the Cypress `parallel` runner was updated to set tooling logging level
first from Env. variables before falling back to the value defined in
the Cypress configuration file
- The env. value to set, if wanting to enable a specific logging level,
is `TOOLING_LOG_LEVEL`. The values supported are the same as those used
with `ToolingLog`
([here](b6287708f6/packages/kbn-tooling-log/src/log_levels.ts (L10))):
`silent`, `error`, `warning`, `success`, `info`, `debug`, `verbose`
- This change makes it easier to run Cypress tests locally with (for
example) a logging level of `verbose` for our tooling without having to
modify the Cypress configuration file. Example: `export
TOOLING_LOG_LEVEL=verbose && yarn cypress:dw:open`
- Added two new methods to our scripting VM service clients (for Vagrant
and Multipass):
- `download`: allow you to pull files out of the VM and save them
locally
- `upload`: uploads a local file to the VM. (upload already existed as
`transfer` - which has now been marked as deprecated).
- Added new service function on our Fleet scripting module to enable us
to set the logging level on a Fleet Agent
- Cypress tests were adjusted to automatically set the agent logging to
debug when running in CI
- A new Cypress task that allows for an Agent Diagnostic file (which
includes the Endpoint Log) to be retrieved from the host VM and stored
with the CI job (under the artifacts tab)
    - A few tests were updated to include this step for failed test
2024-12-12 10:21:23 -05:00
Marco Antonio Ghiani
c47b50925a
[One Discover] Update log.level indicators color (#202985)
## 📓 Summary

Closes #202258 

This change updates the colors scale for Discover's `log.level`
indicators to differentiate errors from other levels better.

**N.B. As this relies on some hard-coded values defined
[here](https://github.com/elastic/kibana/issues/186273#issuecomment-2505817075),
it is not a definitive version, but a middle step to enhance the scale
in v8.x versions.**
With the introduction of the Borealis theme in v9, a new scale
token-based will replace this.

<img width="934" alt="Screenshot 2024-12-04 at 17 40 32"
src="https://github.com/user-attachments/assets/b3da1300-b39a-4ad0-92c9-fde5dabe91ec">

---------

Co-authored-by: Marco Antonio Ghiani <marcoantonio.ghiani@elastic.co>
2024-12-12 16:09:47 +01:00