Commit graph

77610 commits

Author SHA1 Message Date
Maxim Kholod
d2aa051887 show unpriviliged page for benchmark and dashboard pages 2024-08-22 16:52:06 +02:00
Patrick Mueller
07717a43ab
[ResponseOps][alerting] add rule info to logging in alertsClient (#190857)
## Summary

While investigating some issues with the alertsClient, I realized that
we weren't writing out any rule information for the logged messages.
This made debugging quite difficult, as I wanted to see the rule, so had
to search through the alerts indices for the specified alert to get it's
rule id, rule type, etc.

As an example, see https://github.com/elastic/kibana/issues/190376

This PR adds that kind of rule info to the logged messages in
alertsClient, as well as the typical sort of tags we write out (rule id,
rule type, module).
2024-08-22 10:29:22 -04:00
Alexey Antonov
e782811877
fix: [Obs Inventory][KEYBOARD]: The map view tooltips must be available on keyboard focus (#187861)
Closes: https://github.com/elastic/observability-accessibility/issues/43
Closes: https://github.com/elastic/observability-accessibility/issues/18

## Description
- https://github.com/elastic/observability-accessibility/issues/43: The
Observability Inventory map view has a grid of map tiles that each
accept a mouse event to show a tooltip. This tooltip must also be
available when the tile receives keyboard focus.

- https://github.com/elastic/observability-accessibility/issues/18: The
Inventory > Kubernetes Pods popover stays open when I click "Create
Inventory Rule" and the modal dialog opens. This creates an odd stacking
order and obscures content for users at smaller viewport width.

## Steps to recreate
1. Open [Inventory Hosts map
view](https://keep-serverless-fyzdg-f07c50.kb.eu-west-1.aws.qa.elastic.cloud/app/metrics/inventory?inventoryViewId=%270%27&waffleFilter=(expression:%27%27,kind:kuery)&waffleTime=(currentTime:1719523489979,isAutoReloading:!f)&waffleOptions=(accountId:%27%27,autoBounds:!t,boundsOverride:(max:1,min:0),customMetrics:!(),customOptions:!(),groupBy:!(),legend:(palette:cool,reverseColors:!f,steps:10),metric:(type:cpu),nodeType:host,region:%27%27,sort:(by:name,direction:desc),timelineOpen:!f,view:map)&assetDetailsFlyout=(assetType:!n,detailsItemId:!n)&assetDetails=!n)
2. Change Hosts to Kubernetes Clusters
3. Try to select specific node using the keyboard 

## Screens


https://github.com/user-attachments/assets/9ab3b20d-1144-48ed-9760-363f43bafb4b



https://github.com/user-attachments/assets/e41bba9f-f3c5-4ce7-bba4-98cf26a2137a
2024-08-22 16:46:37 +03:00
Eyo O. Eyo
44fafb88d5
Extract authorization logic and it's peripherals into packages (#190028)
## Summary

This PR is a precursor to https://github.com/elastic/kibana/pull/189871,
as part of the spaces improvement initiative there's a need to be able
to share the user privilege assignment component between the roles
experience and the new spaces experience to prevent duplication of
business logic and cohesiveness in the privilege assignment experience.

The aforementioned PR extracts the required component into it's own
package so it might be consumed as needed, this PR is particularly
concerned with extracting business logic said UI component depends on
that exists still within the security plugin. For context; the security
plugin already depends on the spaces plugin, so having the spaces plugin
in turn statically depend on the security plugin creates a cyclic
dependency. That being said to complement the eventual state of said
component so it might be imported elsewhere outside of the security
plugin there's a need to extract further logic into standalone packages,
so that the spaces plugin can consume this plugin without the afore
mentioned cyclic dependency problem.


#### Visually; 

##### Problem;


![image](https://github.com/user-attachments/assets/6be85fb0-3ba3-4d5f-b614-3c0ff2cf7c69)

##### Proposal

![image](https://github.com/user-attachments/assets/5c4f423d-4ad4-48f4-b5bd-2ea0a99b196e)[^legend]

[^legend]: items marked in blue are the packages created in this PR,
whilst the entire diagram is the proposed future state

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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-22 15:44:54 +02:00
Pierre Gayvallet
7217ad0c05
Change the ownership of the inference plugin (#191071)
## Summary

Change the ownership from `@elastic/kibana-core` to
`@elastic/appex-ai-infra`

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-22 15:43:08 +02:00
Vadim Kibana
08fbd9caae
[ES|QL] Correctly parse source nodes (#190941)
## Summary

Fixes `source` node parsing. Correctly handles cluster part and
unescapes the quoted index string part.

1. First removes the cluster string part.
2. Unquotes and unescapes the index string part (if it is quoted and
escaped).

Those two were not done before: the index patter string was unquoted as
a whole (with cluster part attached); and, the index string was not
unescaped.


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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-22 15:35:14 +02:00
Sander Philipse
e932b932f0
[Search] Fix one instance of div nesting inside p warning (#191061)
## Summary

This fixes one error of a div being nested inside of a p, and fixes some
header order issues.
2024-08-22 09:33:31 -04:00
Jon
cafe71a6dd
[ci] Upgrade axios to 1.7.4 (#191023) 2024-08-22 08:07:14 -05:00
Maxim Kholod
432faea77b
[Cloud Security] align vertically controls on bechmark pages (#191066)
## Summary

- part of https://github.com/elastic/security-team/issues/10316
- fixes
https://github.com/elastic/security-team/issues/9428#issuecomment-2107656242

## Screenshots


<img width="1725" alt="Screenshot 2024-08-22 at 12 34 47"
src="https://github.com/user-attachments/assets/1ff67185-e67d-4aad-9fa2-004508149230">
<img width="1728" alt="Screenshot 2024-08-22 at 12 34 54"
src="https://github.com/user-attachments/assets/7c2f359c-f8c9-4b1d-8a44-b7be76e16610">
2024-08-22 14:34:32 +02:00
Saarika Bhasi
a524e27bed
[Search] Search assistant plugin setup (#190633)
## Summary

Introducing new plugin for search assistant. in the future this will be
extension of Observability AI solution solution
[plugin](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/observability_ai_assistant)

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

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Sander Philipse <sander.philipse@elastic.co>
2024-08-22 06:27:33 -05:00
Cauê Marcondes
cdcdfddd3f
[APM][ECO] enabling FF by default (#191056)
I missed changing these two files on my previous
[PR](https://github.com/elastic/kibana/pull/190422).
2024-08-22 05:24:10 -05:00
Maryam Saeidi
34d392b9cd
Add alert grouping functionality to the observability alerts page (#189958)
Closes #190995

## Summary

This PR adds grouping functionality to the alerts page alert table based
on @umbopepato's implementation in this [draft
PR](https://github.com/elastic/kibana/pull/183114) (basically, he
implemented the feature and I adjusted a bit for our use case :D).

For now, we only added the **rule** and **source** as default grouping,
and I will create a ticket to add tags as well. The challenge with tags
is that since it is an array, the value of the alert is joined by a
comma as the group, which does not match with what we want for tags.


![image](https://github.com/user-attachments/assets/c08c3cb1-4c6c-4918-8071-3c5913de41f6)

Here is how we show the rules that don't have a group by field selected
for them: (We used "ungrouped" similar to what we have in SLOs)


![image](https://github.com/user-attachments/assets/280bbd34-6c3b-41c1-803b-dcc6448f6fb4)

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: DeDe Morton <dede.morton@elastic.co>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
2024-08-22 12:20:24 +02:00
Carlos Crespo
00975ad1a4
[Infra] Add a link to host metrics docs (#190993)
## Summary

The link is not shown for K8s pods

<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/5c86d44e-4088-4bd6-a151-3fcf518dc752">

The link is shown for hosts

<img width="500px" alt="image"
src="https://github.com/user-attachments/assets/7b195990-1b28-4e73-818e-3024a0725007">



### How to test

- Navigate to `Inventory` 
- Click on Alerts and Rules > Infrastructure > Create Inventory rule
- Click on the metric to open the metric selection popover
  - Validate if the link appears and redirects to the docs page
- Do the same with other asset types (Containers, Docker, etc)
2024-08-22 12:15:13 +02:00
James Gowdy
3177b037d7
[ML] File upload: Adds support for PDF files (#186956)
Also txt, rtf, doc, docx, xls, xlsx, ppt, pptx, odt, ods, and odp.

Adds the ability to automatically add a semantic text field to the
mappings and a `copy_to` processor to duplicate the field. This is
needed for the mappings generated for the attachment processor which
adds a nested `attachment.content` field which cannot be used as a
semantic text field.

After a successful import, a link to Search's Playground app is shown.
Navigating there lets the user instantly query the newly uploaded file.


https://github.com/user-attachments/assets/09b20a5f-0e02-47fa-885e-0ed21374cc60

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Liam Thompson <32779855+leemthompo@users.noreply.github.com>
2024-08-22 11:14:59 +01:00
Antonio
c5b38e487a
[ResponseOps][Connectors] Add deprecation warning to the Teams Connector (#190958)
Fixes #190944

## Summary

**The exact text is still a work in progress.**

<img width="895" alt="Screenshot 2024-08-21 at 11 02 37"
src="https://github.com/user-attachments/assets/8aca356d-cd3d-425d-b849-7769b18324d9">

---------

Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2024-08-22 04:08:30 -05:00
Gergely Kalapos
5c0991b03e
Add otel datastream patterns to APM indices (#190533)
## Summary

Part of the OTel effort. This PR adds otel datastream patterns into the
default indices that are used by the APM UI.


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


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

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Caue Marcondes <caue.marcondes@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-22 04:07:24 -05:00
Yngrid Coello
a04e5f94e4
[Dataset quality] Use dockerized package registry in api tests (#190688)
Closes https://github.com/elastic/kibana/issues/189802.

This PR aims to use a dockerized package registry version for testing.
In order to test it locally you have to set the value of
`FLEET_PACKAGE_REGISTRY_PORT` env var in your terminal, and you also
need to have a docker daemon running.

For example, you can open a terminal and start the server
```
  node x-pack/plugins/observability_solution/dataset_quality/scripts/api --server
```
then open a new terminal set the var value and start the runner with the
specific test using this configuration
```
  export set FLEET_PACKAGE_REGISTRY_PORT=12345
  node x-pack/plugins/observability_solution/dataset_quality/scripts/api --runner --grep-files=integrations
```
If you want to test again without the dockerized version, you should
remove the value of the var
```
  unset FLEET_PACKAGE_REGISTRY_PORT 
```
2024-08-22 04:06:42 -05:00
florent-leborgne
2d44619f07
[Docs] Reorder What's new (#190976)
## Summary

This PR updates the structure and ordering of the What's new document
for 8.15 and deletes some duplicate entries

![Whats New
Guide](https://github.com/user-attachments/assets/34b76d60-467f-44cb-b0d6-b6408872dddf)
<img width="636" alt="image"
src="https://github.com/user-attachments/assets/518d0316-640d-4e35-aa0c-c3bbb222a264">
<img width="654" alt="image"
src="https://github.com/user-attachments/assets/a3e3cf90-5fc1-4dd4-9cfe-b3922e60812c">
<img width="657" alt="image"
src="https://github.com/user-attachments/assets/35f6fcdb-5eae-47d0-a8d2-28b186f3c155">
2024-08-22 08:28:39 +00:00
Aleh Zasypkin
3ac931fb79
fix(security, http): expose authentication headers in the authentication result when HTTP authentication is used (#190998)
## Summary

When Kibana tries to authenticate a request that already has an
`Authorization` header (not a cookie, client certificate, or Kerberos
ticket), the authentication is performed by the [HTTP authentication
provider](https://www.elastic.co/guide/en/kibana/current/kibana-authentication.html#http-authentication).

Unlike session/Kerberos/PKI providers, this provider returns an
authentication result that doesn't explicitly tell Core which
authorization headers should be used (e.g., `t.authenticated({ state:
authenticationResult.user, --> requestHeaders:
authenticationResult.authHeaders <-- ... });`), assuming that Core will
just use the headers from the request. The `Authorization` header is
forwarded to Elasticsearch by default, no additional configuration is
required.

This worked well previously, but I think with the introduction of the
the
[`getSecondaryAuthHeaders`](https://github.com/elastic/kibana/pull/184901)
method this is the first time where this assumption doesn't hold.
Internally, this method tries to reuse authentication headers that were
provided to Core by the authentication provider during the request
authentication stage — headers that the HTTP authentication provider
never provided before.

This PR makes the HTTP authentication provider behave consistently with
the rest of the providers we support today.
2024-08-22 09:48:35 +02:00
Antonio
29a45fc645
[ResponseOps] Fix scss deprecation issue (#190948)
Fixes #190927

## Summary

This pr fixes a small deprecation issue after the SASS upgrade. I opted
into the new syntax.
2024-08-22 08:22:34 +01:00
Ilya Nikokoshev
2a8b6d0a44
[Automatic Import] Better recognize (ND)JSON formats and send samplesFormat to the backend (#190588)
## Summary

This adds a `samplesFormat` group to the API. This group is filled out
by the frontend when parsing the provided samples and used to set the
log parsing specification for the produced integration.

We check this parameter to add toggle to support multiline
newline-delimited JSON in the filestream input.

## Release note

Automatic Import now supports the 'multiline newline-delimited JSON' log
sample format for the Filestream input.

## Detailed Explanation

We add the optional `samplesFormat` group to the API, consisting of 
 - `name`, 
 - (optional) `multiline`, 
 - and (optional) `json_path`.

Example values of this parameter:

- `{ name: 'ndjson', multiline: false }` for a newline-delimited JSON,
known as [NDJSON](https://github.com/ndjson/ndjson-spec) (where each
entry only takes one line)
- `{ name: 'ndjson', multiline: true }` for newline-delimited JSON where
each entry can span multiline lines
- `{ name: 'json', json_path: [] }` for valid JSON with the structure
`[{"key": "message1"}, {"key": "message2"}]`
- `{ name: 'json', json_path: ['events'] }` for valid JSON with the
structure `{"events": [{"key": "message1"}, {"key": "message2"}]}`

The `json_path` parameter is only relevant for `name: 'json'` and refers
to the path in the original JSON to the array representing the events to
ingest. Currently only one level is recognized:

Not all combinations of a log format with input type will work; more
supported combinations as well as better user feedback on unsupported
combinations will come later (see
https://github.com/elastic/security-team/issues/10290).

In this PR we add support for the multiline NDJSON format for the
`fileinput` input type. This support comes in the form of the
user-changeable toggle under "Advanced Settings" that will be set to on
in cases where we multiline NDJSON format

---------

Co-authored-by: Marius Iversen <marius.iversen@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-22 04:25:12 +03:00
Jiawei Wu
a2873c0c87
[Response Ops] Rule Specific Flapping - Create/Edit Rule Flyout Frontend Changes (#189341)
## Summary
Issue: https://github.com/elastic/kibana/issues/189135

Frontend changes for the rule specific flapping feature in the existing
rule flyout.

To test: Simply go to
`x-pack/plugins/triggers_actions_ui/public/common/constants/index.ts`
and set line 89 `IS_RULE_SPECIFIC_FLAPPING_ENABLED = false` to `true`.
This acts as a feature flag. Then you may go to the create/edit rule
flyout to see this new input. This PR does not contain changes to allow
for saving/editing of this field. That will come with the backend PR.

### Flapping Enabled Without Override
<img width="648" alt="Screenshot 2024-07-29 at 12 11 02 AM"
src="https://github.com/user-attachments/assets/82b552c5-faf3-459f-a22d-69ea95292d89">

### Flapping Enabled With Override
<img width="652" alt="Screenshot 2024-07-29 at 12 11 07 AM"
src="https://github.com/user-attachments/assets/2d305570-8cd6-4488-af5b-8c78cb3c2b3a">

### Flapping Disabled With or Without Override
<img width="652" alt="image"
src="https://github.com/user-attachments/assets/5bb76e6a-85e5-4992-a37f-a737d083ec54">

### 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-08-21 19:55:00 -05:00
Nathan Reese
01aae2331d
[Control group] Open "add control editor" with last used width and grow settings (#190749)
### test instructions
1. run kibana with `yarn start --run-examples`
2. navigate to the "Controls" developer example
3. Click "Add new data-control" button. Notice how the menu sets "width"
to medium and selects "grow".
4. Add new control, setting "width" to small and unselected "grow".
Click "Save and close".
5. Click "Add new data-control" button. Notice how the menu sets "width"
and "grow" to last used values.

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Hannah Mudge <Heenawter@users.noreply.github.com>
2024-08-21 18:43:38 -06:00
Tim Sullivan
f512acf9c3
[SharedUX] Resolve Sass Mixed Declaration issues (#191033)
## Summary

Closes https://github.com/elastic/kibana/issues/190886
Closes https://github.com/elastic/kibana/issues/190887

This resolves Sass mixed declaration issues by moving declarations to
the top of the rule, above all nesting.

The following screenshots show that no style regressions were created by
this PR:

----
**`.kbnCollapsibleNav__recentsListGroup`:**

![image](https://github.com/user-attachments/assets/74218960-3c9f-48c3-a0de-e1924b9f89a8)

----
**`.kbnSolutionNav`:**

![image](https://github.com/user-attachments/assets/b59088f3-d845-4b8a-b0eb-44642de90a60)


### Checklist

Delete any items that are not applicable to this PR.

- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] 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))
- [x] 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))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2024-08-21 19:20:54 -05:00
Yara Tercero
16c7ca2428
[Detection Engine] addressing icon color (#190744)
## Summary

Addresses https://github.com/elastic/kibana/issues/131306 - makes trash
icon red.
2024-08-21 18:31:30 -05:00
Jon
4b28aa8ef0
[ci] Add retry to saved object migration step (#191034)
This is running on a spot instance and should retry if the agent is
lost.
2024-08-21 18:28:13 -05:00
Alex Szabo
a25433c394
[CI] Parallelize quick checks (#190401)
## Summary
Use typescript's async processes to start quick checks in parallel 👍 
Check out these for runs:
- happy case:
https://buildkite.com/elastic/kibana-pull-request/builds/227443#01914ca3-1f0d-4178-b539-263fbc588e98
- some broken checks:
https://buildkite.com/elastic/kibana-pull-request/builds/228957#01917607-f7bd-4e08-8c70-7fdc3f9c12d1
 
Benefits:
- with this (+more CPU) we can speed up the quick-check step's runtime,
from ~15m to ~7m.
- the added benefit is that all checks run so that we won't bail on the
1st one

Disadvantage:
- uglier error output, since we collect the logs asynchronously, and
print it only upon failure
- ~no output printed for happy checks (can be changed)~

Extra:
- additionally, `yarn quick-checks` will now allow devs to run these
checks locally (adjustments made so that the checks won't fail in local
dev)
- added the option to declare a 'context' for tooling loggers, so we can
identify which script logs

Solves 2/3 of https://github.com/elastic/kibana-operations/issues/124
(+speedup)
2024-08-21 23:10:41 +02:00
Kevin Delemme
ca6f3edf0d
feat(rca): items management api (#190852) 2024-08-21 15:34:33 -05:00
Saikat Sarkar
24b4eb4d18
Revert "Revert "[Index management] Unskip api_integration tests for inference endpoints"" (#190855)
Reverts elastic/kibana#189742
2024-08-21 14:34:08 -06:00
Lisa Cawley
385281b2a6
[DOCS] Improve connector privateKey and certificateAuthoritiesData setting examples (#190932) 2024-08-21 12:24:14 -07:00
Alex Szabo
be2f7f414d
[CI] Log error on fast-async-transform failure (#191012)
## Summary
A missed catch+log during the fast transformation of typescript files to
js files caused the task pooling library, `piscina` to terminate without
a warning. The terminated workers would crash with unexpected messages,
and that resulted in original errors to be lost, and misleading error
messages. This PR adds some logging.

See:
https://buildkite.com/elastic/kibana-pull-request/builds/228663#019170d4-4f00-4ccc-915e-7d8b0a6ca020
- the original causes were incorrect `await` usages, but that was never
revealed, because we only got the messages that arrived to a terminated
worker.

See also, for more background:
https://elastic.slack.com/archives/C5UDAFZQU/p1724236149083029
2024-08-21 13:59:33 -05:00
Alex Szabo
748326d1e2
Context for tooling logs (#190766)
## Summary
Allows to set context for the tooling logger. The context would be
logged before the log output, like so:

```
info [My-Tool] Hello!
```

Split from: https://github.com/elastic/kibana/pull/190401

---------

Co-authored-by: Tiago Costa <tiago.costa@elastic.co>
2024-08-21 20:47:29 +02:00
elastic-renovate-prod[bot]
f3142bacae
Update dependency chromedriver to ^127.0.3 (main) (#191019)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [chromedriver](https://togithub.com/giggio/node-chromedriver) |
devDependencies | patch | [`^127.0.2` ->
`^127.0.3`](https://renovatebot.com/diffs/npm/chromedriver/127.0.3/127.0.3)
|

---

### 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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjUuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQyNS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJUZWFtOk9wZXJhdGlvbnMiLCJyZWxlYXNlX25vdGU6c2tpcCJdfQ==-->

Co-authored-by: elastic-renovate-prod[bot] <174716857+elastic-renovate-prod[bot]@users.noreply.github.com>
2024-08-21 13:35:22 -05:00
Anton Dosov
64e1116b4b
Dashboard insights flyout with dashboard views (#187993)
## Summary

close https://github.com/elastic/kibana/issues/183687

## Feature

- Implement dashboard view stats UI on top of usage counter that counts
dashboard views for last 90 day and shows weekly histogram.
- (Even if there is not a lot of data, we still show it as a weekly
histogram, so it can be pretty empty intially)

![Screenshot 2024-08-15 at 13 00
11](https://github.com/user-attachments/assets/adeabf78-e3d3-4cfa-adc3-76a32ede595b)


## Implementation

### Server side
Dashboard plugin registers new routes to increase the view count and get
stats. Routes are protected for users with dashboard access only. The
implementation is located in
`@kbn/content-management-content-insights-server` and internally uses
usage counters. The retention is 90 days, so we can only show stats for
last 90 days.

 ### Client side

- Dashboard uses the client from
`@kbn/content-management-content-insights-public` to increase the view
count every time a user opens a dashboard.
- TableListView opens the flyout from
`@kbn/content-management-content-insights-public`to display the stats

## How to test

- For new views just open a dashboard and check that view stat is
increased
- For old views you can populate the usage counters with historic data.
I used the following script:
https://gist.github.com/Dosant/425042fcf75d5e40e5a46374f6234a54
2024-08-21 13:08:49 -05:00
Ignacio Rivas
6db6a8d7a6
[Ingest Pipelines] Fix scss deprecation issue (#190945) 2024-08-21 19:34:50 +02:00
Nathan Reese
1da096793d
[canvas] fix by-value map embeddables have broken layers (#190996)
Resolves https://github.com/elastic/kibana/issues/190994

### Test instructions
1. create new canvas workpad
2. Click "Select type" and select "Maps"
3. Add a documents layer to your map and click "Save and return"
4. Click "canvas" bread crumb to go back to canvas listing page
5. Open you work pad again. Map should still display data
2024-08-21 11:19:35 -06:00
Lola
0ffd37a074
[Cloud Security] fix disabled button when Agentless is selected (#190713)
## Summary

Summarize your PR. If it involves visual changes include a screenshot or
gif.
This PR is to create Security project and to debug validation errors in
Serverless QA. In Serverless QA, when we submit save an Agentless
integration, the Save and Continue button is disabled. Locally, the
button works as expected. I need to add `console.debug on Validation
errors` since I don't have visibility on the package policy validation
errors.

[Reverted code back to show Agent-based
pop-ups](https://github.com/elastic/kibana/pull/189932/files#r1707816416)
and setFormState depending on the agentCount.

**Before:**

**Locally**

https://github.com/user-attachments/assets/940cd523-c83b-44e2-8bf7-92bff019d85a

**QA**

https://github.com/user-attachments/assets/ce15011c-ccc0-4941-8798-40e78cf81023

**After Project CI Build:**
**Serverless QA**


https://github.com/user-attachments/assets/364903f4-c6af-4768-ab48-ca8da9cdb476

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-21 12:52:38 -04:00
Tim Sullivan
c1e751d9ff
[Reporting] small documentation updates (#190930)
## Summary

This PR offers small updates to documentation on:
* Calling Kibana APIs to automate report generation
* Using Elasticsearch APIs directly to export data
2024-08-21 09:36:22 -07:00
Efe Gürkan YALAMAN
1949de076a
Query builder base page (#190091)
## Summary

Adds the base Search Playground behind a feature flag. This will be used
to create new Search Playground page mode that is used for queries
rather than LLMs
<img width="1533" alt="Screenshot 2024-08-13 at 16 00 32"
src="https://github.com/user-attachments/assets/d1c78ef2-88c0-4c67-bbdd-2704142b95df">
<img width="1523" alt="Screenshot 2024-08-13 at 16 00 41"
src="https://github.com/user-attachments/assets/01b3b3cb-95e4-4a09-a07d-069d810cf42c">



### Checklist

Delete any items that are not applicable to this PR.

- [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
- [ ] [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
- [x] 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 was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
2024-08-21 11:33:50 -05:00
Sander Philipse
8f39bdfe25
[Search] Change model id to inference id in index error message (#190787)
## Summary

Changing 'model_id' to 'inference_id' to align with the new API spec.
See also: https://github.com/elastic/kibana/pull/190729
2024-08-21 18:00:11 +02:00
Kibana Machine
6cc30f99d5 skip failing test suite (#190952) 2024-08-22 01:45:02 +10:00
Kibana Machine
c4a39e1291 skip failing test suite (#190960) 2024-08-22 01:44:57 +10:00
Rachel Shen
5bd3f902f8
[Dashboard] Interactive Managed Dashboard Popover vs badge (#189404)
## Summary

Closes #https://github.com/elastic/kibana/issues/179152

This PR makes the managed badge into an interactive popover that allows
users to duplicate the managed dashboard. The user is automatically
redirected to the new dashboard where they can edit it and make changes.



### 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] [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/))
- [x] 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))
2024-08-21 10:41:36 -05:00
jennypavlova
22031dfb05
[Infra] Replace MetricsUIAggregation in favor of estypes.AggregationsAggregate (#190495)
Closes [#190311](https://github.com/elastic/kibana/issues/190311)

## Summary

This PR replaces `MetricsUIAggregation` in favor of
`estypes.AggregationsAggregate`. Now the `MetricsUIAggregation` uses
estypes.AggregationsAggregate and the `MetricsUIAggregationRT `is
removed which also allows us to remove the `ESAggregationRT`. Instead of
maintaining the runtime types we now rely on the types provided by
elasticsearch.

A follow-up issue will be linked here to address the other aggregation
types related changes:
[#190497](https://github.com/elastic/kibana/issues/190497)

## Testing
- Check the types 
- Host page should load with no errors
- To test if the API works use the request provided in the
[x-pack/plugins/observability_solution/infra/server/routes/infra/README.md](https://github.com/elastic/kibana/compare/main...jennypavlova:kibana:190311-infra-replace-metricsuiaggregation-in-favor-of-estypesaggregationsaggregate?expand=1#diff-e853fdd3f4073eff8ff8a4df6a657f8cb5fefaa231be0116fe3692ae929f26a8)
- if the body is not valid 400 is returned

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2024-08-21 17:34:07 +02:00
Mike Côté
fdae1348df
Rename task claimers (#190542)
In this PR, I'm renaming the task managers as we prepare to rollout the
`mget` task claiming strategy as the default.

Rename:
- `unsafe_mget` -> `mget`
- `default` -> `update_by_query`

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-21 11:09:10 -04:00
Steph Milovic
730f8eae87
[Security solution] Assistant package assistant/index.tsx cleanup (#190151) 2024-08-21 08:59:24 -06:00
Panagiota Mitsopoulou
e3d6cf69b4
[SLO] [Alerting] deployment agnostic slo burn rate rule tests (#187924)
Addresses https://github.com/elastic/kibana/issues/179549
Relates to https://github.com/elastic/kibana/pull/183113 

## Update
Since the Appex QA team has taken on deployment agnostic tests, a lot of
the original implementation of this PR has changed. Now that the Appex
QA team has provided a current directly to write deployment agnostic
tests, the burn rate rule tests have been moved here.

To finish onboarding the burn rate rule test to this new framework, the
following was done.
1. Add an `oblt.stateful.config.ts` file to complement the existing
`oblt.serverless.config.ts` file to ensure the tests are run in CI
2. Ensure our test config is added to the buildkite pipepline
3. Add the alerting service to the new `deployment_agnostic/services`
directory.
4. Port the tests over to the new `deployment_agnostic` directory


To run serverless
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/serverless/oblt.serverless.config.ts --grep="Burn rate rule"
```

To run stateful
```
node scripts/functional_tests_server --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts
node scripts/functional_test_runner --config x-pack/test/api_integration/deployment_agnostic/configs/stateful/oblt.stateful.config.ts --grep="Burn rate rule"
```

For context, I've kept the history from the original PR description
below.

## 🍒 History

A new type of config file will be allowed for API integration and
functional tests within the `x-pack/test` folder, using a pattern of
`*.serverless.config.ts` — these config files will specify configuration
needed to run a set of tests in a serverless deployment context.

FTR tests already make use of the `it.tags(['my-tag-1', 'my-tag-2'])`
pattern, and so we would like to stay with that pattern rather than
introducing a new type of mocha tag in the it block's "description" as
it was introduced in this
[POC](https://github.com/elastic/kibana/pull/183113). The difference
with the previous PR in terms of tagging is that we use `suiteTags`
instead of `mochaOps`

Adding following in the config files:

**serverless config**

```
suiteTags: {
        include: ['serverless'],
      },
```

**ess config**

```
suiteTags: {
        include: ['ess'],
      },
```

and then adding `this.tags(['serverless', 'ess'])` in the test suite
instructs the test runner to run the same test suite in both
environments.

In order to keep things simple, we stay with the current skip approach,
which means that flaky tests will be skipped for all environments by
appending .skip() to the suite or to specific test cases.

## Description

- This PR uses `suiteTags` for tagging the tests appropriately. We
decide through following labels in which environment the tests are going
to be executed:
- **@ess**: Runs in an ESS environment (on-prem installation) as part of
the CI validation on PRs.
  - **@serverless**: Runs in a serverless environment.
- It introduces a new folder
`x-pack/test/observability_solution_api_integration` which will serve as
a centralized location for all tests by obs-ux-management team that must
be run in Serverless and ESS environments. A list of all tests can be
found in the R&D
[issue](https://github.com/elastic/kibana/issues/179549)
- Within this folder, there is a "**config**" subdirectory that stores
base configurations specific to both the Serverless and ESS
environments. These configurations build upon the base configuration
provided by test_serverless and api_integration, incorporating
additional settings such as environment variables and tagging options.
- The file
`x-pack/test/observability_solution_api_integration/test_suites/alerting/burn_rate/burn_rate_rule.ts`
is functional in both Serverless and ESS
- It removes the existing burn rate rule from
`x-pack/test_serverless/api_integration/test_suites/observability/alerting/burn_rate/burn_rate_rule.ts`
- The `alertingApi` and `sloApi` services are moved to
`test/api_integration` servers

In the screenshot below you can see the `test_suites` folder structure,
after having migrated the current slo burn rate rule. We recommend
having an `alerting` and `slo` subfolders. Rest observability apps could
be added as another subfolder under test_suites. As part of this PR, the
`alerting > burn_rate` subfolders are created.

<img width="376" alt="Screenshot 2024-05-13 at 09 21 28"
src="3ccaf0a5-1443-4bad-ad06-daa347488bf1">

## How to run locally
You can navigate into the new `observability_solution_api_integration`
folder and use following commands to run the tests in serverless and ess
environments accordingly. You can find more information in the README
file of the observability_solution_api_integration folder.

```
cd x-pack/test/observability_solution_api_integration

// SERVERLESS
npm run alerting_burn_rate:server:serverless
npm run alerting_burn_rate🏃serverless

// ESS
npm run alerting_burn_rate:server:ess
npm run alerting_burn_rate🏃ess
```

## CI

- It includes a new entry in the `ftr_configs.yml` to execute the newly
added tests in the pipeline.
- It involves the addition of `suiteTags` in both
serverless/config.base.ts and ess/config.base.ts. In the case of
serverless, it includes **@serverless** while excluding
**@skipInServerless**. Similarly, for ess, it includes **@ess** and
excludes **@skipInEss**.

## Quality Gates and MKI pipeline
The Platform team will support config files within `x-pack/test` folder
with a pattern of `*.serverless.config.ts`, so these tests will be
included in Kibana's Quality gates and will be run against a real MKI
environment.

---------

Co-authored-by: Dominique Belcher <dominique.clarke@elastic.co>
Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
Co-authored-by: Robert Oskamp <traeluki@gmail.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-21 09:39:57 -05:00
Marco Liberati
9c35c15d7d
[Lens] Fix no data collapse by scenario with Metric chart (#190966)
## Summary

Fixes #182628 

This PR provides a fix for the editor crash on no data when using
collapsing by.
In addition the rendering of no data in such scenario now matches the no
data rendering with a single tile.

<img width="533" alt="Screenshot 2024-08-21 at 12 57 43"
src="https://github.com/user-attachments/assets/71c40e3b-5e1a-48f1-a03f-5a4a5774e9d7">
<img width="1008" alt="Screenshot 2024-08-21 at 12 57 28"
src="https://github.com/user-attachments/assets/e35b9612-743b-412e-9565-0afcb5fd8735">
<img width="1229" alt="Screenshot 2024-08-21 at 12 56 31"
src="https://github.com/user-attachments/assets/f64f38f8-8995-4214-9954-386aac62f0c7">


### 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-08-21 16:36:27 +02:00
Kyle Pollich
8b7de03bf3
[Fleet] Add toggles for agent.monitoring.http.enabled and agent.monitoring.http.buffer.enabled to agent policy advanced settings (#190984)
## Summary

Ref https://github.com/elastic/kibana/pull/180922

Re-add the `agent.monitoring.enabled` and
`agent.monitoring.buffer.enabled` settings under Agent Policy ->
Advanced Settings.

cc @pierrehilbert
2024-08-21 09:24:00 -05:00
Ying Mao
a6c4120b35
[Response Ops][Alerting] Adding new value to warning reasons enum schema in rule saved object (#190743)
## Summary

We want to allow rule executors to report warnings back to the framework
and have them show up in the stack management UI. We currently have a
mechanism for this that is used by detection rules but they handle how
to show the warning in their custom UI so the warning does not appear in
the stack management UI. This PR adds a new value to the allow list of
"warning reasons". This should not warrant a schema version bump because
it is a new value for an existing enum but we need to do an intermediate
release so the new schema is recognized before we start setting it
anywhere. This PR is just for schema changes. PR that uses these schema
changes can be found here: https://github.com/elastic/kibana/pull/189312

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2024-08-21 10:17:29 -04:00