Commit graph

76835 commits

Author SHA1 Message Date
Ying Mao
32459096ff
Revert TM resource based task scheduling issues (#189529) 2024-07-30 10:53:27 -06:00
Rachel Shen
1f00087e61
[Dashboard] Add maxWidth 's' to Panel Settings flyouts and 'm' to drilldown widths not already specified in dashboard (#189009)
## Summary

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

The Dashboard and Panel Settings Flyouts already seem to be fixed but
the Controls Settings Flyout did not specify the maxWidth.

The drilldown (manage and create) flyouts did not have a maxWidth
specified but based on main, it seems to match medium. To avoid any
unclearness, I have added the maxWidth property to the flyout.

The edit and create drilldowns that didn't have specified maxWidths can
be toggled to each other so they should be the same. I think there can
be a little bit of a debate on which makes the most sense. Although
there is some white space to the right of the buttons in the create
drilldown I think it makes the most sense for the manage drilldowns to
not be cramped and have the maxWidths be medium if possible.

<img width="900" alt="Screenshot 2024-07-24 at 1 19 51 PM"
src="https://github.com/user-attachments/assets/549c34df-5d85-40f4-bfb4-dd5d17d96ca5">

### Edit drilldown
Size s makes it look more cramped and breaks the word Discover onto two
lines:
<img width="626" alt="Screenshot 2024-07-24 at 1 15 09 PM"
src="https://github.com/user-attachments/assets/89013146-f437-4180-8de0-12d033198b88">

Size m
<img width="1044" alt="Screenshot 2024-07-24 at 1 09 35 PM"
src="https://github.com/user-attachments/assets/60dd3838-724a-42c4-b717-c2d7e75a3c10">

### Create drilldown: 
I'm leaning towards size 's' for the create drilldown flyout based on
the following screenshots:

Size s
<img width="631" alt="Screenshot 2024-07-24 at 1 12 46 PM"
src="https://github.com/user-attachments/assets/7e052bbf-3d02-492e-9332-8998b01c95b7">

Size m
<img width="710" alt="Screenshot 2024-07-24 at 1 10 58 PM"
src="https://github.com/user-attachments/assets/6f35ee9c-5858-400d-9498-c90323f44303">
2024-07-26 19:06:32 -06:00
Tiago Costa
83e6e8fbed
skip flaky suite (#189314) 2024-07-27 00:35:30 +01:00
Tiago Costa
339be82b4a
skip flaky suite (#185046) 2024-07-27 00:33:38 +01:00
Tiago Costa
08db3f23ad
skip flaky suite (#189192) 2024-07-27 00:20:55 +01:00
Kevin Delemme
8fb9d64781
chore(investigate): move behind feature flag (#189290) 2024-07-26 14:54:07 -07:00
Mark J. Hoy
25960d251e
[Inference Endpoints View] Adds Amazon Bedrock to Deletion, search and filtering of inference endpoints (#188670)
## Summary

Adds Amazon Bedrock support to the [Inference Endpoints management
UI](https://github.com/elastic/kibana/pull/186206)
(`relevance/inference_endpoints`) management list view.

### Checklist

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-26 17:31:34 -04:00
Lisa Cawley
841e95c64b
[OAS][ML] Add sync API tags and description, minor OpenAPI fixes (#189230) 2024-07-26 15:28:43 -05:00
Vadim Kibana
6c093b643b
[ES|QL] Function AST node subtypes (#189268)
## Summary

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

- Introduces `subtype` property for *function* AST node types. This
allows to discriminate between real functions an various expression
types.


### Checklist

Delete any items that are not applicable to this PR.

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



### For maintainers

- [x] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-07-26 14:47:48 -05:00
Davis Plumlee
5817a9c9d3
[Security Solution] Integration tests for multi line string field diff algorithm (#188688)
## Summary

Completes https://github.com/elastic/kibana/issues/180159

Switches fields to use the multi line string diff algorithm assigned to
them in the [overarching
ticket](https://github.com/elastic/kibana/issues/180159#issuecomment-2218392217)

Adds integration tests in accordance to
https://github.com/elastic/kibana/pull/188323 for the `upgrade/_review`
API endpoint for the multi line string field diff algorithm.


### Checklist

Delete any items that are not applicable to this PR.

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


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-07-26 14:13:11 -04:00
Dima Arnautov
2d83c0e5ea
[ML] Utilize the DataViewLazy in ML plugin (#189188) 2024-07-26 19:56:58 +02:00
Nathan Reese
45071d1c09
[embeddable rebuild][control group] Control group apply button (#188701)
PR does the following
* Adds `untilInitialized` to `ControlGroupApi`.
* Control group example updated to not mount data table react embeddable
until control group is initialized (and all control group filters are
available)
* Updates `buildControl` to be async
* Updates all controls to `await` filters before returning
`buildControl`
* Updates control group to display loading indicator until all controls
loaded
* Moves control group react logic into `ControlGroup` component
* Implements `Apply` button

<img width="600" alt="Screenshot 2024-07-24 at 7 33 25 AM"
src="https://github.com/user-attachments/assets/4840c731-2287-4a12-aa9c-3d9c83d64d14">

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-26 11:55:07 -06:00
renovate[bot]
74194fbf7a
Update dependency prettier to ^2.8.8 (main) (#189123)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [prettier](https://prettier.io)
([source](https://togithub.com/prettier/prettier)) | [`^2.8.0` ->
`^2.8.8`](https://renovatebot.com/diffs/npm/prettier/2.8.8/2.8.8) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/prettier/2.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/prettier/2.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/prettier/2.8.8/2.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/prettier/2.8.8/2.8.8?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### 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 was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/elastic/kibana).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-26 10:21:22 -07:00
Devin W. Hurley
d7493052e2
[Security Solution] [Detections] Adds support for system actions (and cases action) to detection rules (#183937)
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Vitalii Dmyterko <92328789+vitaliidm@users.noreply.github.com>
2024-07-26 12:20:39 -05:00
Brad White
1aee15f611 Merge branch 'main' of github.com:elastic/kibana into upstream-main 2024-07-26 11:15:08 -06:00
Brad White
6b64a9f803 Revert "[Security Solution] Auto-bundle Timeline API OpenAPI specs (#188844)"
This reverts commit efb2866d84.
2024-07-26 11:13:30 -06:00
Kylie Meli
77848e3521
[integration automatic-import] appending input.type to title (#189297)
Appending the input type to the title for better clarity during
configuration

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

<img width="816" alt="Screenshot 2024-07-26 at 10 46 26 AM"
src="https://github.com/user-attachments/assets/4c780cc5-7190-498c-b4ff-5633594dcb52">
2024-07-26 13:12:37 -04:00
Brad White
73cb20d3a4
[CI] Fix LauchDarkly References Action triggering on forks (#189232)
## Summary

This action is triggering on pushes to `main` on forks as well, this PR
skips the action on forks. The action will fail on the fork and notify
the developer.

### Testing
Failure on my fork's `main` before this PR
1010067456

Tested with this branch in my fork and it skipped properly
96e2ed6e60
1010151467

Flipped the flag to ensure it's working
2a586ccd73
1010153452
2024-07-26 10:01:53 -07:00
Luke G
7db28682dd
[Security Solution] Support experimental features in timelines (#189028)
## Summary

Adding generic support for experimental features in timelines

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-26 10:46:40 -05:00
Elena Stoeva
7e5907e816
[Console Monaco Migration] Fix variable replacement (#188994)
Fixes https://github.com/elastic/kibana/issues/185999

## Summary

This PR fixes the variable replacement when the variable contains an
object value .

**How to test:**
1. Go to Console and create the following variables:
`var1`: `{"match_all": {}}`
`var2`: `index`
`var3`: `match_all`
2. Test using an object variable inside the request data:
```
GET _search
{
  "query": "${var1}"
}
```
should be sent as `query: {match_all: {}}` in the payload.
3. Test using a variable in the URL:
`PUT /test-${var2}` should be sent as `PUT /test-index` in the payload.
4. Test using a string variable in the request data:
```
GET _search
{
  "query": {
    "${var3}": {}
  }
}
```
should be sent as `query: {match_all: {}}` in the payload.
5. Test using undefined variables:
```
GET _search
{
  "query": {
    "${var4}": {}
  }
}
```
or `PUT /test-${var5}`
Both should be sent as they are.

<!--
### Checklist

Delete any items that are not applicable to this PR.

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


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
-->
2024-07-26 16:42:52 +01:00
Joe Reuter
03958651d9
Observability Onboarding: Show otel tile on integrations page (#189163)
Similar to how APM is shown as an integration as well, show the new
OTel-based flow on the integrations page so people find it from there as
well:

<img width="991" alt="Screenshot 2024-07-25 at 11 32 46"
src="https://github.com/user-attachments/assets/4d806ed1-4b01-4ac8-985c-0e59708fa4c6">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-26 17:42:03 +02:00
Saikat Sarkar
fcd33b20f3
[Semantic Text UI] Modify select inference popover (#189221)
This PR resolves https://github.com/elastic/search-team/issues/7932

### After this change

![Screenshot 2024-07-25 at 2 12
01 PM](https://github.com/user-attachments/assets/63e1f935-6cdd-4b24-ba86-b28f6df96183)
2024-07-26 09:25:32 -06:00
Maryam Saeidi
b109e75e64
[Log threhsod, SLO burn rate] Save the ECS group by fields at the AAD root level (#189260)
Related to #183220

## Summary

This PR saves ECS groups in the Alert As Data (AAD) document for the log
threshold and SLO burn rate rules.

|Rule|AAD document|
|---|---|
|SLO burn
rate|![image](https://github.com/user-attachments/assets/c5476e33-95d0-4c39-af12-2ef5a9768ab0)|
|Log
threshold|![image](https://github.com/user-attachments/assets/34fc6662-c4c3-4b3e-9d77-f0959f726394)|

### 🧪 How to test
- Create a log threshold and SLO burn rate rule with multiple groups
(both ECS and non-ECS fields)
- Check the related AAD document; you should be able to see the ECS
fields at the root level and not see non-ECS fields there
- Check the same information for the recovered alerts
- Rules without group by should work as before

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-26 17:12:29 +02:00
Maryam Saeidi
9c242ac773
[Log threshold] Fix showing the correct log view in the rule creation flyout (#189205)
Related to #187291

## Summary

This PR passes the rule's logView to the Log threshold rule creation
flyout. Thanks to @Kerry350 and @weltenwort for explaining how this
logic works ❤️

For example, if the log view ID is passed an invalid id, like this:

<img
src="https://github.com/user-attachments/assets/f9d4ac74-9b16-406e-93e5-141ea82d1687"
width=500 />

it will fall back to the default log view will be used, and now we show
the correct log view in the rule flyout.

Example setting:


![image](https://github.com/user-attachments/assets/67b03d70-4e87-433a-830e-295f042bce92)

|Before|After|
|---|---|

|![image](2b727635-8403-4372-9a03-e124f3987ccb)|
2024-07-26 17:11:30 +02:00
Sander Philipse
98a7da9a83
[Search] Fix index error incorrectly showing up (#189283)
## Summary

This fixes a bug where the index error would show up for third-party
models because the logic for determining local models was incorrect.
2024-07-26 09:34:35 -05:00
Thom Heymann
27bddf284f
[Observability Onboarding] Various fixes for Quickstart Onboarding flows (#189134)
Resolves #188643
Resolves #188644
Resolves #188630

## Summary

Various fixes for Quickstart Onboarding flows

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
2024-07-26 15:14:38 +01:00
Julia Bardi
19010a0747
[Fleet] Re-enable flaky test manage agent policies (#189271)
## Summary

Closes https://github.com/elastic/kibana/issues/189004
2024-07-26 09:05:36 -05:00
Ying Mao
b693df92ff
[Response Ops][Task Manager] Dynamically set capacity for cloud deployments (#189117)
Followup to https://github.com/elastic/kibana/pull/187999

## Summary

Dynamically set capacity for cloud deployments if claim strategy is
`mget`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-07-26 09:32:07 -04:00
Konrad Szwarc
6b4a58a163
[Security Solution][QA] Fix Serverless grep in api integration config (#188291)
**Issue**
The regular expression used to grep tests for serverless execution is
too loose. Tests marked as `@skipInServerlessMKI` are not executed in
the regular serverless PR pipeline as expected.

**Expected Behavior**
Tests tagged with `@skipInServerlessMKI` should only be skipped in the
MKI environment. For example, a test tagged `@ess @serverless
@skipInServerlessMKI` should run in the ESS and regular Serverless
pipelines (PR, `main`) but should be skipped in the MKI environment.

**Current Behavior**
Tests with the tag `@ess @serverless @skipInServerlessMKI` are not being
executed in the regular serverless pipelines, nor in the MKI environment
where they are expected to be skipped.

**Reason**
The regular expression`'/^(?!.*@skipInServerless).*@serverless.*/'` is
too broad. It incorrectly excludes tests tagged with
`@skipInServerlessMKI` because it matches the common `@skipInServerless`
part.

**Solution**
Refine the grep pattern to match the whole word `@skipInServerless` at
the beginning or end of a string, or surrounded by whitespace
`'/^(?!.*(^|\\s)@skipInServerless(\\s|$)).*@serverless.*/'`

**Example**
Tests not executed in PR pipelines due to the `@skipInServerlessMKI`
tag:
1.
`detections_response/detection_engine/actions/trial_license_complete_tier/update_actions.ts`
 * Total test cases: 7
 *  Expected to execute in serverless: 7
 * Tests with @skipInServerlessMKI tag: 4
* [Actually executed in serverless environment:
3](https://buildkite.com/elastic/kibana-pull-request/builds/221346#0190b59a-76c0-4c8d-976c-a5de1070fb2d/1988-2280)
* [Executed with change in regexp:
7](https://buildkite.com/elastic/kibana-pull-request/builds/221386#0190b5fe-fd96-487a-a902-bd21db2bec3a/1981-2269)
2.
`detections_response/detection_engine/alerts/trial_license_complete_tier/assignments/assignments_serverless.ts`
 * Total test cases: 7
 *  Expected to execute in serverless: 7
 * Tests with @skipInServerlessMKI tag: 7
* [Actually executed in serverless environment:
0](https://buildkite.com/elastic/kibana-pull-request/builds/221346#0190b59a-764c-426f-a8b0-384eebf4c438/2621-2890)
* [Executed with change in regexp:
7](https://buildkite.com/elastic/kibana-pull-request/builds/221386#0190b5fe-fd56-445e-93cf-58c980c34228/3807-4146)
3.
`entity_analytics/risk_engine/trial_license_complete_tier/risk_scoring_task/task_execution.ts`
  * Total test cases: 7
 *  Expected to execute in serverless: 6
 * Tests with @skipInServerlessMKI tag: 6
* [Actually executed in serverless environment:
1](https://buildkite.com/elastic/kibana-pull-request/builds/221346#0190b59a-7670-4721-8984-778486b85c35/1625-2045)
* [Executed with change in regexp:
6](https://buildkite.com/elastic/kibana-pull-request/builds/221386#0190b5fe-fd56-445e-93cf-58c980c34228/3807-4146)
2024-07-26 15:13:17 +02:00
Yngrid Coello
7bb17aefc3
[Dataset quality] Adding execution context to data quality page within management app (#189272)
This PR aims to improve `context.page_name` within stack telemetry.
After the changes we will start seeing information about dataset quality
in `application:management:data_quality` rather than just a generic
pageName such as `application:management`.

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/d172353a-824d-46f7-8d5e-7c564375827a">
2024-07-26 08:04:32 -05:00
Maxim Palenov
218146ee69
[Security Solution] Auto-bundle Endpoint Management API OpenAPI specs (#188853)
**Addresses**: https://github.com/elastic/kibana/issues/184428

## Summary

This PR adds scripts for automatic bundling of Endpoint Management API OpenAPI specs as a part of PR pipeline. Corresponding result bundles are automatically committed to the Security Solution plugin `x-pack/plugins/security_solution` in the `docs/openapi/ess/` and `docs/openapi/serverless` folders (similar to https://github.com/elastic/kibana/pull/186384).
2024-07-26 14:59:17 +02:00
Jill Guyonnet
9bc57412bb
[Fleet] Fix namespaces property of created agent policies (#189199)
## Summary

I found a small bug while working on
https://github.com/elastic/kibana/issues/185040: when agent policies are
created, there should be a root-level `namespaces` property, which is
currently missing.

`GET .fleet-policies/_mapping` contains a `namespaces` property with
`keyword` type that was added in
https://github.com/elastic/elasticsearch.

Note: I was looking into removing the existing `data.namespaces`
property, however I don't see any issues with it. It is coming from
[here](f77e4d243f/x-pack/plugins/fleet/server/services/agent_policy.ts (L1140)),
i.e. the `data` property is generated from the full agent policy which
already has a `namespaces` property.

### 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-07-26 14:40:09 +02:00
Liam Thompson
e1f20116cb
[Search] Fix copy nit in semantic search guide (#189249)
- We use "Start by" twice, removes the second instance
- Tweaks inference endpoint copy
2024-07-26 07:33:14 -05:00
Joe McElroy
1b84a24872
[Search] [Playground] Enable Gemini Connector on ES3 (#189267)
## Summary

Enable Gemini connector on ES3 search projects so playground can use.


### Checklist

Delete any items that are not applicable to this PR.

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


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
2024-07-26 07:14:49 -05:00
Sander Philipse
1457428d7f
[Search] Add index errors in Search Index page (#188682)
## Summary

This adds an error callout to the index pages in Search if the mappings
contain a semantic text field that references a non-existent inference
ID, or an inference ID without a model that has started.
2024-07-26 07:09:05 -05:00
Jedr Blaszyk
754de3be4f
[Search/Connector] Make minute-level scheduling default option in ConnectorCronEditor (#189250)
## Summary

Enable minute level scheduling in UI for all connector sync jobs. This
fixes the bug with minute level scheduling not present for incremental
sync jobs.

It seems that during [this
migration](bb5ca2e187 (diff-328630e75e33bdb823bad243330681942ab5a391c5b83cad7f3186c4ca651e9dL219))
the minute level scheduling for incremental syncs was lost somehow.

As of now the `ConnectorCronEditor` is only used for connector sync
jobs, all connector sync jobs support minute-level scheduling so I
deleted the `MINUTE` from default `frequencyBlockList` in the component.

<img width="680" alt="Screenshot 2024-07-26 at 10 32 16"
src="https://github.com/user-attachments/assets/7070227e-b332-4217-beea-a169c8b3d4fc">
2024-07-26 14:04:03 +02:00
Eyo O. Eyo
6ddffb57fb
Compute dashboard panel selection list lazily (#187797)
## Summary

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

This PR changes how the dashboard panel selection items get computed, it
had previously been computed eagerly, in this implementation panel
selection items would only be computed when the user actually clicks the
`add panel` button, with it's results cached so that subsequent
interactions with the `add panel` button leverages the already computed
data.

**Notable Mention:**
The options presented as the dashboard panel list now only comprise of
uiActions specifically registered with the uiAction trigger
`ADD_PANEL_TRIGGER` and specific dashboard visualisation types. See
https://github.com/elastic/kibana/pull/187797#discussion_r1681320456 to
follow the reasoning behind this.

That been said adding new panels to the dashboard, would be something
along the following lines;


```ts
import { ADD_PANEL_TRIGGER } from '@kbn/ui-actions-plugin/public';

 uiActions.attachAction(ADD_PANEL_TRIGGER, <registredActionId>);

// alternatively
// uiActions.addTriggerAction(ADD_PANEL_TRIGGER, ...someActionDefintion);
````

### Visuals

7c029a64-2cd8-4e3e-af5a-44b6788faa45

### How to test 
- Navigate to a dashboard of choice
- Slow down your network speed using your browser dev tools, refresh
your dashboard, and click on the “Add panel” button as soon as it is
available (before the panels have a chance to load).
- You should be presented with a loading indicator, that eventually is
swapped out for the list of panels available for selection.


### Checklist

Delete any items that are not applicable to this PR.
<!--
- [ ] 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] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
<!--
- [ ] [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 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))
- [ ] 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 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)

### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
-->
2024-07-26 13:54:22 +02:00
Ying Mao
b75d74a9fa
[Response Ops][Alerting] Assigning extra large cost to indicator match rule types (#189220)
Resolves https://github.com/elastic/kibana/issues/189112

## Summary

Adds a mapping to the alerting rule type registry to manage rule types
with a custom task cost and register appropriately. Adds an integration
test to task manager so we can be alerted to task types that register
with non-normal task costs.
2024-07-26 07:43:47 -04:00
Ying Mao
6739a1ed63
Fixes Failing test: X-Pack Alerting API Integration Tests - Alerting - group2.x-pack/test/alerting_api_integration/spaces_only/tests/alerting/group2/monitoring_collection·ts - Alerting monitoring_collection inMemoryMetrics should count timeouts (#189214)
Resolves https://github.com/elastic/kibana/issues/187275

When looking at the flaky test logs, I could see some ES errors for the
`test.cancellableRule` rule type we're using in this test. This rule
type uses a shard delay aggregation to increase the execution duration
of a rule to force a timeout. Switching instead to just delaying using
an `await new Promise((resolve) => setTimeout(resolve, 10000));`.
2024-07-26 07:42:41 -04:00
Jeramy Soucy
b51c503479
Expose the encrypted saved objects key rotation API as internal in serverless (#189238)
## Summary

In order to begin work for encryption key rotation in serverless, we
will need to expose the endpoint use to bulk re-encrypt saved objects.
This endpoint was previously unregistered in serverless. This PR
registers the API and marks it as internal when a serverless build
flavor is detected.


### Tests
-
x-pack/test_serverless/api_integration/test_suites/common/platform_security/encrypted_saved_objects.ts

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-26 12:45:42 +02:00
Kevin Lacabane
10bfb4b4ae
[eem] narrow down index patterns in definition templates (#189182)
In https://github.com/elastic/kibana/pull/188410 we moved history and
latest index templates from global scope to definition scope. The
definition-scoped templates have a wide pattern that would grep any
other definition template already installed and throw the following
error because of conflicting priority. This change narrows down the
index patterns defined in the templates to only grep the ones from the
installed definition

```
{
  "statusCode": 500,
  "error": "Internal Server Error",
  "message": """[illegal_argument_exception
	Root causes:
		illegal_argument_exception: index template [entities_v1_history_admin-console-services_index_template] has index patterns [.entities.v1.history.*] matching patterns from existing templates [entities_v1_history_builtin_services_from_ecs_data_index_template] with patterns (entities_v1_history_builtin_services_from_ecs_data_index_template => [.entities.v1.history.*]) that have the same priority [200], multiple index templates may not match during index creation, please use a different priority]: index template [entities_v1_history_admin-console-services_index_template] has index patterns [.entities.v1.history.*] matching patterns from existing templates [entities_v1_history_builtin_services_from_ecs_data_index_template] with patterns (entities_v1_history_builtin_services_from_ecs_data_index_template => [.entities.v1.history.*]) that have the same priority [200], multiple index templates may not match during index creation, please use a different priority"""
}
```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-26 11:35:40 +02:00
Sebastián Zaffarano
61ad27e863
[Telemetry][Security Solution] Always enrich telemetry documents with license info (#188832) 2024-07-26 10:02:56 +01:00
elena-shostak
3f3713b567
Fixed URL hash appending for space next redirect URL (#189204)
## Summary

Fixed URL hash appending for space next redirect URL.

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

__Fixes: https://github.com/elastic/kibana/issues/189184__
2024-07-26 10:40:50 +02:00
Katerina
59f7b4b3a5
[APM][ECO] Show tour for the ui service experience (#188918)
## Summary

closes https://github.com/elastic/kibana/issues/188902 



https://github.com/user-attachments/assets/d96d3d47-467a-42d2-afd2-deac402f9935
2024-07-26 11:32:57 +03:00
Pierre Gayvallet
6982321dbb
@kbn/plugin-generator minor cleanup (#189059)
## Summary

Done while looking for https://github.com/elastic/kibana/issues/107773

- use `import type` modifier when possible
- fix imports to use the `@kbn/plugin` format
- remove references to CLI options that are no longer present
2024-07-26 09:39:31 +02:00
Valeriy Khakhutskyy
bd843dda3f
[ML] Add new custom rule action to force time shift (#188710)
This PR follows up https://github.com/elastic/elasticsearch/pull/110974
and extends the schema for custom rules.

A valid schema looks like this:
```http
POST _ml/anomaly_detectors/my_job/_update
{
	"detectors": {
		"detector_index": 0,
		"custom_rules": [
			// update the detector with a custom rule that forces a time shift of 1 hour back starting now
			{
				"actions": [
					"force_time_shift"
				],
				"params": {
					"force_time_shift": {
"time_shift_amount": 3600}
					}
				},
				"conditions": [{
					"applies_to": "time",
					"operator": "gt",
					"value": "now"
				},
{
					"applies_to": "time",
					"operator": "lt",
					"value": "now+bucket_span"
				},

]
			},
			...
```

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-07-26 09:04:43 +02:00
Antonio
64b45e0884
[ResponseOps][Rules] OAS schema registration for newly versioned Rule APIs (#189153)
## Summary

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

This PR updates `request` and `response` schemas below for rule APIs to
generate OAS documentation:
- `POST /api/alerting/rule/{id?}/_enable`
- `POST /api/alerting/rule/{id?}/_disable`
- `POST /api/alerting/rule/{id?}/_update_api_key`


### How to test

1. Start ES
2. Add `server.oas.enabled: true` to `kibana.dev.yml`
3. Start Kibana `yarn start --no-base-path`
4. `curl -s -u elastic:changeme
http://localhost:5601/api/oas\?pathStartsWith\=/api/alerting/rule/ | jq`
5. Look for `_enable`, `_disable` and `_update_api_key` in the resulting
JSON
2024-07-26 08:10:15 +02:00
Steph Milovic
dd9e94d189
[Bedrock chat] Fixes for BedrockChat model + tools (#189227)
## Summary

BedrockChat was not working as expected when triggering the tools. For
example, trying to invoke alerts tools caused this error:
<img width="1059" alt="Screenshot 2024-07-25 at 11 21 52 AM"
src="https://github.com/user-attachments/assets/fe302d41-482c-4a65-abc1-8d669abf928d">
 

This was not a helpful or proper error message to display. I fixed error
handling to bubble up the correct error:
<img width="857" alt="Screenshot 2024-07-25 at 11 26 08 AM"
src="https://github.com/user-attachments/assets/a4135269-6bcb-436f-bd17-f817c06f3778">

This error has something to do with the BedrockChat model not working
properly. @jacoblee93 is looking into a fix on the LC side.

In the meantime, I changed the prompt around and was able to coerce the
correct responses out of Sonnet 3.5 and Opus for the ESQL and RAG alerts
questions James was testing with:

<img width="1708" alt="alerts-opus"
src="https://github.com/user-attachments/assets/47df0500-6e2f-477b-a3b9-da792f1d9b03">
<img width="1510" alt="alerts-sonnet"
src="https://github.com/user-attachments/assets/0efd5519-196b-4309-9300-194196e5dde3">
<img width="1573" alt="esql-opus"
src="https://github.com/user-attachments/assets/d7f519be-262c-4767-9d84-3fcb4fde089c">
<img width="1580" alt="Screenshot 2024-07-25 at 3 40 05 PM"
src="https://github.com/user-attachments/assets/9d408ab8-2fd5-4bbb-bb2e-bb54e0277717">
2024-07-26 07:26:54 +02:00
Kibana Machine
0a1db3040d
[api-docs] 2024-07-26 Daily api_docs build (#189244)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/780
2024-07-26 04:55:22 +00:00
Lisa Cawley
e6795e5b0a
[DOCS][OAS] Add descriptions, tags, deprecation to connector APIs (#184956) 2024-07-25 16:46:30 -05:00