Commit graph

81579 commits

Author SHA1 Message Date
Brad White
f6d84554c7
add bp label 2024-12-06 18:59:05 +00:00
Brad White
c9a152e234
dedupe 2024-12-06 18:41:11 +00:00
elastic-renovate-prod[bot]
9502c73b0d
Update nock 2024-12-06 16:58:50 +00:00
Larry Gregory
e255ca2728
Dependency ownership for Kibana Operations team, part 1 (#202904)
## Summary

This updates our `renovate.json` configuration to mark the Kibana
Operations team as owners of their set of dependencies.

---------

Co-authored-by: Jeramy Soucy <jeramy.soucy@elastic.co>
2024-12-06 10:58:55 -05:00
Sandra G
42348d41f4
[Data Usage] add error handling and tests for privilege related errors (#203006)
- handling of 2 error cases to error handler
- `security_exception` due to lack of privileges. Metering api will
respond when one of the following isn't available as a user privilege
`monitor,view_index_metadata,manage,all`.
- `index_not_found_exception`. Metering api will respond with this when
no indices exist for the privileges it has access to or when no indices
are found.
- api integration tests for data_streams route for the following cases
- returns no data streams when there are none it has access to and
responds with appropriate message
- returns no data streams without necessary privileges and responds with
appropriate message
- returns data streams when user only has access to a subset of indices
with necessary privileges
- functional tests for same as above. these remain skipped due to not
being able to create data streams picked up by metering api since we
implemented filtering out zero storage size data streams, but useful for
local testing with some code changes.


### `security_exception` view
<img width="1555" alt="Screenshot 2024-12-04 at 1 14 10 PM"
src="https://github.com/user-attachments/assets/241a2eb8-1c77-4592-ba18-b971512e712e">

### `index_not_found_exception` view
<img width="1589" alt="Screenshot 2024-12-04 at 1 13 13 PM"
src="https://github.com/user-attachments/assets/12b68d66-9178-4957-b014-5765be348694">

---------

Co-authored-by: Ashokaditya <ashokaditya@elastic.co>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-06 10:58:20 -05:00
Anton Dosov
ea1c846e54
[TableListView] Improve help text of creator and view count (#202488)
## Summary

This PR brings back version mentions in help text for non-serverless
that we removed in https://github.com/elastic/kibana/pull/193024. In
that PR we decided that it is not worth adding complexity for checking
`isServerless` deep inside table list view components, but I want to
bring version mentions back now because I believe that it can be very
confusing without the version mentions for existing deployments

Two recent features: 1. created_by; 2. view counts are only working
since 8.14 and 8.16 respectively, so for older kibana with old
dashboards it might be confusing that the data for new features is
missing after the upgrade. In help text we can at least mention that the
reason that data is missing is because we only gather the data starting
from a specific version.

### Serverless (version mentions are missing as before) 


![Screenshot 2024-12-06 at 12 39
50](https://github.com/user-attachments/assets/4ad2cd23-3aa7-4400-a5bd-419407f2fad2)
![Screenshot 2024-12-03 at 11 59
09](https://github.com/user-attachments/assets/c56de5d3-1afb-411f-bdbd-419025ef9084)




### Statefull (version are shown again, just like before
https://github.com/elastic/kibana/pull/193024)


![Screenshot 2024-12-06 at 13 03
58](https://github.com/user-attachments/assets/24ea67a5-8a32-45b0-9a4f-2890aaf7ded5)
![Screenshot 2024-12-06 at 13 04
04](https://github.com/user-attachments/assets/8f91d32b-457f-4fd7-882a-d2dd9a3476f4)
![Screenshot 2024-12-03 at 14 11
09](https://github.com/user-attachments/assets/47ea1f8a-1a7b-4aa6-af81-206c6f2d087e)




# Release Notes

Improve help text of creator and view count features on dashboard
listing page
2024-12-06 16:48:20 +01:00
Lukas Olson
efe06a3357
Remove bsearch endpoint (#197150) 2024-12-06 07:23:46 -07:00
Tomasz Ciecierski
132eb8162e
[EDR Workflows] Skip Packs test on MKI (#203211) 2024-12-06 15:03:23 +01:00
Stratoula Kalafateli
2cd6dc3ff1
[ES|QL] Generate docs and functions (#203210)
## Summary

Updates the docs and functions from ES
2024-12-06 14:40:47 +01:00
Maxim Palenov
b0c7a8ce4f
[Security Solution] Allow users to save rule query with non critical validation errors (#202544)
**Addresses:** https://github.com/elastic/kibana/issues/171520

## Summary

This PR adds functionality to allow users save EQL and ES|QL queries in Prebuilt Rule Customization workflow by displaying a confirmation modal with non critical validation errors (a.k.a warnings). It also refactors confirmation modal usage in rule creation/editing forms for better reusability.

## Screenshots

<img width="1909" alt="Screenshot 2024-12-03 at 14 01 36" src="https://github.com/user-attachments/assets/c0054fc1-b52b-400f-80d7-af42391f4e18">

https://github.com/user-attachments/assets/2a20fcfe-ffc0-4547-8621-7ac6873c8dc9

https://github.com/user-attachments/assets/50b5cf5a-ea3f-4c22-a443-b5d4056a92c8

<img width="2541" alt="Screenshot 2024-12-03 at 14 06 29" src="https://github.com/user-attachments/assets/dde3fd60-6c69-4f8e-a65a-837b2319e4ac">

<img width="2552" alt="Screenshot 2024-12-03 at 14 06 51" src="https://github.com/user-attachments/assets/220817a6-991f-4361-88d2-ee3a47a36ad6">

<img width="2555" alt="Screenshot 2024-12-03 at 14 07 52" src="https://github.com/user-attachments/assets/c46fc49c-9ce1-4472-bdea-f9507aa62ece">

<img width="2553" alt="Screenshot 2024-12-03 at 14 08 18" src="https://github.com/user-attachments/assets/92388c56-8644-4c54-8727-b9a73b3497d1">
2024-12-06 06:06:39 -06:00
Shahzad
dc77e8c149
[Synthetics] Fix flaky tests for alerting default !! (#203220)
## Summary

Fix flaky tests for alerting default, removed unecessary code.

I tested locally 30 times and it has been fixed now.
2024-12-06 12:54:07 +01:00
Steph Milovic
4b42953aac
[Security Assistant] Fix abort stream OpenAI issue (#203193) 2024-12-06 04:20:13 -07:00
Kevin Lacabane
5470fb7133
[eem] _search accepts kql filters (#203089)
## Summary

`searchEntities` now accepts kql filters instead of esql and translates
that to dsl filters at the query level
2024-12-06 12:02:28 +01:00
Kibana Machine
1ae6e2ca46 skip failing test suite (#203205) 2024-12-06 21:05:51 +11:00
Robert Jaszczurek
73b7a90a87
[ML] AiOps: Fix Log Rate Analysis Embeddable Error on the Alerts Page (#203093)
## Summary

Fix for: [#203067](https://github.com/elastic/kibana/issues/203067)
2024-12-06 10:26:16 +01:00
Navarone Feekery
1a9893bd6f
[Search][a11y] Fix table row screen reader error (#203136)
##  Closes https://github.com/elastic/kibana/issues/199113

Allows errors in the table row to be read by screen readers.
2024-12-06 10:10:26 +01:00
Kibana Machine
c92216c537
[api-docs] 2024-12-06 Daily api_docs build (#203206)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/913
2024-12-06 03:07:13 -06:00
Vadim Kibana
79c0827128
[ES|QL] JOIN command Traversal API and prety-printing support (#202750)
## Summary

Partially addresses https://github.com/elastic/kibana/issues/200858

- Add support for the new `JOIN` command and `AS` expression in
Traversal API: `Walker` and `Visitor`
- Adds support for the new `JOIN`command and `AS` expression in the
pretty-printer.
- Fixes some parser bugs related to the `JOIN` 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
2024-12-06 08:44:23 +01:00
Jiawei Wu
cdd1ba9b00
[Response Ops] Fix Task Manager Schedule Flaky Test (#201732)
## Summary

Issue: https://github.com/elastic/kibana/issues/198664

Fixes task manager schedule flaky test according to guidance posted
here: https://github.com/elastic/kibana/issues/161882

### 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>
2024-12-05 21:49:06 -06:00
Davis McPhee
4215a637da
[Data Views] Disable scripted field creation in the Data Views management page (#202250)
## Summary

Scripted fields in data views have been deprecated since 7.13, and
superseded by runtime fields.

The ability to create new scripted fields has been removed from the Data
Views management page in 9.0. Existing scripted fields can still be
edited or deleted, and the creation UI can be accessed by navigating
directly to
`/app/management/kibana/dataViews/dataView/{dataViewId}/create-field`,
but it is recommended to migrate to runtime fields or ES|QL instead to
prepare for removal.

Additionally, the scripted fields entry in the Upgrade Assistant has
been updated to reflect these changes, improve migration instructions,
and surface the full list of data views across all spaces that contain
scripted fields as well as their associated spaces. New documentation
has been added to the "Manage data views" page with examples and
instructions to help users migrate off scripted fields to runtime fields
or ES|QL, which is also linked to from the Upgrade Assistant entry.

Data Views management page:

![management](https://github.com/user-attachments/assets/ed42310c-d7fa-48ba-8430-533e9230b48d)

Upgrade Assistant:
<img
src="https://github.com/user-attachments/assets/4ff27866-4fe8-4357-82e8-cd4c503ab50b"
width="500" />

Resolves #182067.

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

---------

Co-authored-by: Matt Kime <matt@mattki.me>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-05 20:11:34 -04:00
Chris Earle
82301e7454
[DataUsage][Serverless] Fix AutoOps error message to drop "agent" reference (#202996)
## Summary

This removes the references to "autoops agent" in the error message if
the request fails, as it has nothing to do with any agent.

### 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] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)

### Identify risks

No. None of the error messages are exported, so they cannot be misused
in other places.
2024-12-05 15:43:29 -06:00
Brad White
9c635a2b25
[CI] Upgrade buildkite deps (#203160)
- [Mocha
Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md#changelog)
  - Only breaking change seems to be min Node version
2024-12-05 13:34:50 -08:00
Steph Milovic
b3b2c1745a
[Security Assistant] Abort signal fix (#203041) 2024-12-05 15:27:29 -06:00
Rodney Norris
434eaa78ad
[Search] Search Playground - shared rendering (#201302) 2024-12-05 15:09:51 -06:00
Bharat Pasupula
5145d76fb1
[Automatic Import] Add serverless availability cypress test (#202872) 2024-12-05 21:25:07 +01:00
Nathan Reese
d508b5da9c
[embeddable] remove legacy embeddable factories from 'Add from library' flyout (#202823)
Part of https://github.com/elastic/kibana/issues/180059

PR removes legacy embeddable factory support from Canvas and Dashboard
`Add from library` flyout

PR also does the following clean-ups
1) Renames folder, files, and component from `add_panel_flyout` to
`add_from_library_flyout`. When component was originally created,
dashboard `Add panel` button did not exist, and `Add from library`
button was called `Add panel`. Now that dashboard contains `Add panel`
and `Add from library` buttons, the old naming convention is super
confusing and not longer lines up with the current UI.
2) moves registry to `add_from_library` folder so that the registry is
in closer proximity to its usage.
2) Renames `registerReactEmbeddableSavedObject` to
`registerAddFromLibraryType` because
`registerReactEmbeddableSavedObject` does not clearly specifying what
the registry enables.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-12-05 12:55:40 -07:00
Bharat Pasupula
178baa8468
[Automatic Import] Restrict unsupported log formats (#202994) 2024-12-05 20:18:08 +01:00
Kevin Delemme
7806861c5f
feat(slo): SLO grouping values selector (#202364) 2024-12-05 12:51:03 -06:00
Eyo O. Eyo
c5cc1532d7
make emotion typing global (#200958)
## Summary

Informed by
https://github.com/elastic/eui/discussions/6828#discussioncomment-11247425,
closes https://github.com/elastic/kibana-team/issues/1299

This PR consolidates typings to provide adequate typing for the `css`
prop EUI components accept. Placing the required typing file in the
typing directory means that all other plugins that already reference
this directory in their `tsconfig.json` would get this improvement by
default.

<!--
### 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/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
- [ ] [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_node:*` 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)
- [ ] ...


-->
2024-12-05 12:20:43 -06:00
Sébastien Loix
2ae1dd41b6
[DarkMode] Deprecate advanced setting (#202993) 2024-12-05 16:39:59 +00:00
Sergi Massaneda
b5c119496a
[SecuritySolution][Onboarding] Siem migration start card and flyout - Part 1 (#202886)
## Summary

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

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.

<img width="1547" alt="image"
src="https://github.com/user-attachments/assets/f43c60a0-0631-44d8-ba82-7f16971ecc24">

#### To do in part 2:
- Complete implementation of migration finished panel: chart and stats
- Improve implementation of migration ready panel: should only allow
open the flyout
- Implement missing steps in the flyout: Macros and Lookups

### Test 
Enable experimental flag
Use file:
[1733135547_1420.json](1733135547_1420.json)

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-05 10:29:51 -06:00
Walter Rafelsberger
5c6c4f44d3
[ML] Improve some TS. (#202314)
## Summary

- Follow up to #175178 to fix some breaking TS changes after the TS
`v4.9.5` upgrade.
- Follow up to #182344 to replace `any` in `useCallback` with proper
types.
- Fixes #176123.

### Checklist

- [x] This was checked for breaking HTTP API changes, and any breaking
changes have been approved by the breaking-change committee. The
`release_note:breaking` label should be applied in these situations.
2024-12-05 17:26:26 +01:00
Faisal Kanout
f1109cfcce
[OBX-UX-MGMT][ALERTING] Fix APM rule error msg when KQL filter is invalid (#203096)
## Summary

It fixes https://github.com/elastic/kibana/issues/199273 by validating
the query before passing it to the preview chart
2024-12-05 10:07:58 -06:00
Jean-Louis Leysens
53b0015340
[OAS] Remove Elastic-Api-Version (#202923)
## Summary

Due to the much slower rate of versioning public APIs we have decided to
remove the Elastic-Api-Version body and header information from the spec
entirely.

This also cleans up the spec when rendered on our hosted OAS docs.

Removes:
1. `Elastic-Api-Version` from the request/response bodies for all public
APIs
2. `Elastic-Api-Version` header parameter from all public APIs

Docs for internal APIs will still have this included as they always
require a version environments.

## To revewers

Important changes are all in `packages/kbn-router-to-openapispec` and
`src/core/server/integration_tests/http/oas.test.ts`, the rest is very
minor or generated/snapshotted changes.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-12-05 17:05:42 +01:00
Walter Rafelsberger
c4d64039b3
[ML] Transform: Fix <DefinePivotSummary /> jest test. (#195998)
## Summary

Fixes #195992 (failing test).

Updates the mock for the preview endpoint to make the test pass again.

### 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] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#_add_your_labels)
2024-12-05 16:59:00 +01:00
Paul Tavares
5262902a86
[Security Solution][Endpoint] Fix Cypress test to work with refactored Roles page (#202770)
## Summary

- Fixes cypress tests for space awareness RBAC checks to work with the
recent changes to the core Role page
    - Fixes #200962
    - Fixes #200967
- Enables test file for runs on Serverless MKI environments
2024-12-05 09:56:53 -06:00
Alexey Antonov
589a6eee00
fix: [Search:Stateful:EnterpriseSearch:WorkplaceSearch:UsersandRoles]Assign to specific groups input combobox is missing form label (#202462)
Closes: #202234

## Description
Assign to specific groups input combobox on create a role mapping panel
on users and roles page should have a label so assistive technology can
help the user figure out which input they would want to select.

## Changes made:
1. required `aria-*` attribute was set for `EuiComboBox`

## Screen: 

<img width="1438" alt="image"
src="https://github.com/user-attachments/assets/b167aafd-b881-4a38-aedc-953858c13dcc">
2024-12-05 17:48:18 +02:00
Jill Guyonnet
7caa33993a
[Fleet] Fix disabling logic for "View Agents" button in agent activity (#202968)
## Summary

I came across a small bug while testing Fleet agents activity: the "View
Agents" button is currently always disabled for agent policy changes.
This is because agent policy data has been modified to be fetched with
`noAgentCount: true` by default.

As getting the agent count involves a performance concern, this PR fixes
the logic that disables the "View Agents" button for policy change
actions instead. The behaviour is not as follows:
* For tag updates actions: button not showed (no change)
* For policy change actions
* If `action.nbAgentsActionCreated > 10000`: disable button and show
tooltip explaining why it's disabled
* Otherwise: enable button and show tooltip saying that these are the
agents _currently_ assigned to the policy (existing behaviour, known
limitation)
* For other types of actions (no change)
* If `action.nbAgentsActionCreated > 10000`: disable button and show
tooltip explaining why it's disabled
   * Otherwise: enable button, no tooltip

### Screenshots

![Screenshot 2024-12-05 at 10 56
40](https://github.com/user-attachments/assets/c5f4f868-cdac-4de7-a96d-f11afd803d87)

![Screenshot 2024-12-05 at 10 57
13](https://github.com/user-attachments/assets/91195e3a-4f5c-4a91-b9ff-ffb62818647f)

![Screenshot 2024-12-05 at 10 57
20](https://github.com/user-attachments/assets/9029b1b5-6983-4509-9b62-15e073546d42)
2024-12-05 15:43:40 +00:00
Irene Blanco
b210a3e6aa
[APM] Update alert rule producer terms in getServicesAlerts query (#203100)
## Summary

This PR continues the work from
https://github.com/elastic/kibana/issues/201565.
We missed updating the alert rules in the `getServicesAlerts` function,
so this fixes that.

There's an ongoing
[issue](https://github.com/elastic/kibana/issues/202415) to test the
alert counts across solutions and ensure it works as expected in all
scenarios.

---------

Co-authored-by: Cauê Marcondes <55978943+cauemarcondes@users.noreply.github.com>
2024-12-05 16:35:15 +01:00
Tim Sullivan
6178e8295d
Preparation for High Contrast Mode, Core/SharedUX domains (#202606)
## 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-05 08:26:41 -07:00
Jean-Louis Leysens
3579425d77
[UA] Ensure that old indices are detected for reindexing (#203082)
## Summary

We need to handle the following response shape from `GET
_migration/deprecations`

```jsonc
    "myindex": [
      {
        "level": "critical",
        "message": "Old index with a compatibility version < 8.0", // specifically this message
        "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/breaking-changes-9.0.html",
        "details": "This index has version: 7.17.25",
        "resolve_during_rolling_upgrade": false
      }
    ]
```

<img width="1142" alt="Screenshot 2024-12-05 at 12 44 59"
src="https://github.com/user-attachments/assets/723e19ab-dd9d-4b6a-bcda-26a5c8bffa0b">


## To reviewers

These changes were developed/tested on `8.x` and must be backported.

Related
* https://github.com/elastic/kibana/issues/202669
* https://github.com/elastic/elasticsearch/issues/118062
2024-12-05 15:47:32 +01:00
Artem Shelkovnikov
b8a41013ca
Add prompt for connector configuration being in editable mode (#202463)
### Closes https://github.com/elastic/search-team/issues/8547
## Summary

User creates connectors following a set of steps. During configuration
step they are able to open configuration form and then click "Next" -
configuration will not be saved and user will not be prompted about it.

This change adds a prompt for this step - if the configuration is in
editable state, the prompt will be shown. It does not check that the
form was edited, however, and it's on purpose. I'm open to changing it
to only prompt if any value changed, but I feel that it's important to
prompt even if no values were entered, just to confirm with the user
that they want to move on without specifying any values.


https://github.com/user-attachments/assets/af768d6d-282d-4f67-a1d0-c54bcf1cb2d0

### 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/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
- [ ] [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-05 08:44:16 -06:00
Rickyanto Ang
06b774e788
[Cloud Security][Bug] Fix for Page Crashing (#203028)
## Summary

This PR is for quick fix to address issue with Page crashing when user
clicks on user name or host name on preview flyout for Alerts Contextual
Flyout
2024-12-05 06:35:42 -08:00
Nicolas Chaulet
5061174117
[Fleet] Handle when an agent policy is removed from the current space (#202991) 2024-12-05 08:13:53 -06:00
Chris Cowan
fe56d6d90a
🌊 Add type safety to Painless conditions (#202603)
## 🍒  Summary

This PR closes https://github.com/elastic/streams-program/issues/18 by
adding some basic type checking to the painless output for the Stream
conditions. The new code will check to ensure that none of the fields
used in the condition are `Map` objects. Then it wraps the if statement
in a `try/catch`.

### Condition
```Typescript
{
  and: [
    { field: 'log.logger', operator: 'eq' as const, value: 'nginx_proxy' },
    {
      or: [
        { field: 'log.level', operator: 'eq' as const, value: 'error' },
        { field: 'log.level', operator: 'eq' as const, value: 'ERROR' },
      ],
    },
  ],
}
```

### Before

```
(ctx.log?.logger !== null && ctx.log?.logger == "nginx_proxy") && ((ctx.log?.level !== null && ctx.log?.level == "error") || (ctx.log?.level !== null && ctx.log?.level == "ERROR"))
```

### After

```
if (ctx.log?.logger instanceof Map || ctx.log?.level instanceof Map) {
  return false;
}
try {
  if ((ctx.log?.logger !== null && ctx.log?.logger == "nginx_proxy") && ((ctx.log?.level !== null && ctx.log?.level == "error") || (ctx.log?.level !== null && ctx.log?.level == "ERROR"))) {
    return true;
  }
  return false;
} catch (Exception e) {
  return false;
}
```
2024-12-05 06:58:36 -07:00
Gerard Soldevila
b2d49b8beb
Sustainable Kibana Architecture: Move modules owned by @elastic/docs (#202416)
## 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. We kindly ask you to:

* Review the moved files, as some of them contain relative paths that
have been updated.
* Review the updated files, as some of them contain references 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
* We kindly ask you to:
* 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.


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

  | Id | Target folder |
  | -- | ------------- |
  | `@kbn/doc-links` | `src/platform/packages/shared/kbn-doc-links` |


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

```
./docs/upgrade-notes.asciidoc
./package.json
./packages/kbn-repo-packages/package-map.json
./packages/kbn-ts-projects/config-paths.json
./src/core/tsconfig.type_check.json
./src/platform/packages/shared/kbn-doc-links/jest.config.js
./src/plugins/ai_assistant_management/selection/tsconfig.type_check.json
./tsconfig.base.json
./tsconfig.base.type_check.json
./tsconfig.refs.json
./x-pack/plugins/alerting/tsconfig.type_check.json
./x-pack/plugins/search_connectors/tsconfig.type_check.json
./x-pack/plugins/search_inference_endpoints/tsconfig.type_check.json
./x-pack/plugins/search_playground/tsconfig.type_check.json
./x-pack/plugins/security_solution/tsconfig.type_check.json
./x-pack/plugins/serverless_search/tsconfig.type_check.json
./x-pack/plugins/threat_intelligence/tsconfig.type_check.json
./yarn.lock
```
</details>
<details>
<summary>Updated relative paths</summary>

```
src/platform/packages/shared/kbn-doc-links/jest.config.js:12
src/platform/packages/shared/kbn-doc-links/tsconfig.json:2
src/platform/packages/shared/kbn-doc-links/tsconfig.type_check.json:2
```
</details>
<details>
<summary>Script errors</summary>

```

```
</details>
2024-12-05 14:54:58 +01:00
Dmitrii Shevchenko
94c5614366
[Security Solution] Add rule upgrade review cache invalidation (#202969)
**Resolves: https://github.com/elastic/kibana/issues/202779**

## Summary

Implemented proper cache invalidation after rule CRUD operations to
prevent displaying stale data in rule upgrade flyouts. See the linked
issue for more details.

### How to Test

1. Ensure rule customization is enabled
2. Navigate to the Rule Updates page 
3. Locate any rule with updates
4. Make changes to the rule:
   - Edit the rule via the Rule Editing page
   - Use bulk actions
   - Delete the rule
5. Return to the Rule Updates page
   - All introduced changes should be reflected:
     - Modifications should be visible
     - If the rule was deleted, it should no longer appear on the page
2024-12-05 14:25:35 +01:00
Sergi Massaneda
54e103211a
[SecuritySolution] Fixes flaky test (#203069)
## Summary

fixes: https://github.com/elastic/kibana/issues/202147

Fixes flakyness on: 

`x-pack/plugins/security_solution/public/onboarding/components/onboarding_body/hooks/use_expanded_card.test.ts`
2024-12-05 13:53:50 +01:00
Viduni Wickramarachchi
8a73528ab1
[Obs AI Assistant] Update AI Assistant icon for Serverless (#202861)
## Summary

### Problem
The Obs AI Assistant icon doesn't look as expected in serverless top
navigation.

### Solution
Update button CSS for Obs AI Assistant top nav icon for serverless. No
changes to the classic navigation.

### Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-12-05 07:38:33 -05:00
elastic-renovate-prod[bot]
39ce60a399
Update dependency @elastic/request-converter to ^8.17.0 (main) (#202954) 2024-12-05 06:28:54 -06:00