Commit graph

63673 commits

Author SHA1 Message Date
Kibana Machine
ef264f0ac4
[api-docs] 2023-05-31 Daily api_docs build (#158691)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/354
2023-05-31 01:01:10 -04:00
Chenhui Wang
c75df56de3
Add incremental_sync feature flag to Connector index (#158641)
# Part of https://github.com/elastic/enterprise-search-team/issues/4629

## Summary

This PR adds the feature flag `incremental_sync` to index
`.elastic-connectors`.

This PR also adds `sync_rules` feature flag, which I believed was missed
out previously.


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

- [ ] 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)
2023-05-31 09:32:17 +08:00
Tiago Costa
6aecd42239
skip flaky suite (#156809) 2023-05-31 00:02:25 +01:00
Davis McPhee
097666f1a0
[Discover] Update single doc view locator to URL encode rowId (#158635)
## Summary

Fixes #158525.

### Checklist

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

### 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)
2023-05-30 18:57:45 -03:00
Steph Milovic
99d948c771
[Security Solution] Alerts grouping, fix redux misuse (#156924) 2023-05-30 14:28:51 -06:00
Steph Milovic
28b4ec1490
[Security solution] Generative API connector, azure url fix (#158602) 2023-05-30 14:28:30 -06:00
Ievgen Sorokopud
1a3cad1b27
[Security Solution] Failed getFieldsForIndexPattern calls can result in Exception Flyout getting stuck in loading state (#158371)
## Summary

Original ticket https://github.com/elastic/kibana/issues/158110

These changes fixes the issue with the exception flyout which can be
stuck in loading state in case `getFieldsForIndexPattern` throws an
exception.

Fixed by putting the `getFieldsForIndexPattern` call in try/catch. We
use this call to fetch extended information about the fields [to show
warning to the user in case there are some index
issues](https://github.com/elastic/kibana/pull/149149). If
`getFieldsForIndexPattern` fails and throws an exception we will
continue using fields without conflicts/unmapped information.

I also, noticed that we do not fetch extended information for the case
where user uses index patterns instead of data views. Fixed this issue
in `useFetchIndex`.

cc @dhurley14 We will need to adjust either of our PRs depending whose
changes will go in first :-)

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 16:23:17 -04:00
Melissa Alvarez
03d4fe7515
[AIOps] Explain Log Rate Spikes: create shareable component containing only analysis (#158629)
## Summary

This PR exposes the `ExplainLogRateSpikesContent` shared component so
that it can be used independently of the search bar/datepicker
- The component accepts various external settings including a timerange
and query to run the analysis against.
- The `ExplainLogRateSpikesPage` component now uses the
`ExplainLogRateSpikesContent` component
- The `useData` hook has been simplified - the set up for the search
query has been extracted into a separate hook

<img width="1245" alt="image"
src="30dec4b2-3162-4a39-b598-0dec70993fa7">

This is the first step for the Observability Alert Details Page
Integration.

Style edits:

The component now uses EUI's ResizeableContainer to allow the main
histogram to be sticky.
Also adds some style updates from
https://github.com/elastic/kibana/issues/156605


### 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
- [ ] 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)
2023-05-30 13:44:59 -06:00
Nicolas Chaulet
0ff50e14cd
[Fleet] Disable requirement for Fleet server with standalone fleet server (#158633) 2023-05-30 15:13:50 -04:00
Nathan Reese
21151dd39f
[visualizations] read only config flag for vis_types (#158507)
Part of https://github.com/elastic/kibana/issues/154307

### Overview
PR adds `readOnly` configuration to all vis_type plugins.

### Test
* Start kibana with `yarn start --serverless=es`
* set the following yaml configuration values
    ```
    vis_type_gauge.readOnly: true
    vis_type_heatmap.readOnly: true
    vis_type_metric.readOnly: true
    vis_type_pie.readOnly: true
    vis_type_table.readOnly: true
    vis_type_tagcloud.readOnly: true
    vis_type_timelion.readOnly: true
    vis_type_timeseries.readOnly: true
    vis_type_vislib.readOnly: true
    vis_type_xy.readOnly: true
    ```

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>
2023-05-30 12:45:31 -06:00
Tiago Costa
b52988757f
skip flaky suite (#156061) 2023-05-30 18:45:06 +01:00
Alex Szabo
5ee40a9094
[cli] Adjust CLI to treat extra options consistently (#158257)
## Summary

Addresses: #105371 
One can use `--elasticsearch.password ---my-password---`,
`--elasticsearch.password=---mypassword---` or `--elasticsearch.password
\"---mypassword\"` both in these cases. Commander is splitting
single-dash inputs, it can't be prevented, so for those cases, use
quotes or compound options.

The original problem can be reproduced like this:
```shell
yarn start --elasticsearch.password "-some-password"
```

We were using some extra argument parsing prototype extension in
(command.js)[./src/cli/command.js] - this allows for collecting extra
options, but the proprietary logic had a few incorrect assumptions.
(e.g.: extra opts will be already split by `=` by the time we get them,
shorthands will be split to individual flags).

(1) This change makes it explicit in the code, that the single-letter
flags (`-fcz`) are not supported in the extra options.

The core of the problem is now how we treat an ambiguous expression like
this:
```
kibana --password "--kebabs--are--my--favourite--" --somethingElse 283
```
Is the `"--kebabs--are--my--favourite--"` another flag, or is it a value
for the previous option?

Unfortunately, both interpretations will have shortcomings. 
- if we treat it as a boolean flag, then values starting with "--" will
be incorrectly treated as flags, and an error will be displayed (in the
case of a very unfortunate random generated string)
- if we treat it as a value always, then incorrectly ordered
options/flags will be consumed in place of values

Maybe the latter one will happen less often. For that, people would have
to incorrectly assume that `--booleanOn` type flags exist, especially
among the non-listed options. Or they'd have to incorrectly parameterize
the command, for that they can review their own usage locally, and see
their error in the ordering.

(2) This change makes it explicit, that extra options will come in
pairs.

Also, added tests for the base use case, and the _dash_ edge case.

### 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] Checked and works on 7.17/7.13 (it was originally reported on
7.13).

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 18:09:16 +02:00
Patryk Kopyciński
bb1731786d
[Osquery] Prepare for versioned HTTP APIs (#158500) 2023-05-30 12:08:56 -04:00
Nathan Reese
47eed48cde
[maps] replace 'refresh: true' with 'refresh: wait_for' (#158220)
Fixes https://github.com/elastic/kibana/issues/157657

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 10:01:31 -06:00
Konrad Szwarc
c9658bf238
[Security Solution] ~200 ways to decrease flakiness in Cypress (#157387)
This PR addresses Cypress parallelisation in Security Solution scope. It
is a first step in improving e2e tests reliability and gives us a solid
foundation for further work on flakiness and run times. With this PR
each CI job starts 3 instances of ES, kibana and Cypress runner in
isolation.

Other issues addressed in this PR: 
- Use click() instead of trigger('click') in all Cypress tests.
- Use testIsolation in all Cypress tests.
- login before each test to ensure that the correct user is always
logged in. Also, with test isolation enabled, login should be required
before each test.
- use visit() instead of cy.visit() in some cases so that tests wait for
the page to fully load before executing.
- Cypress e2e tests are no longer compatible with Firefox (or any
non-Chromium based browser) due to using cypress-real-events
- Removes uses of cypress-pipe. Tests that used cypress-pipe in order to
retry click events will no longer retry click events.
- Fixes an error related to test files being overwritten by Webpack file
processing

---------

Co-authored-by: Patryk Kopycinski <contact@patrykkopycinski.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 17:40:18 +02:00
Carlos Crespo
3d05fc6ada
[Infrastructure UI] Asset Details clean up and improvements (#158511)
Part of: [#156696](https://github.com/elastic/kibana/issues/156696)

## Summary

This PR refactors some of the newly introduced Asset Details embeddable
code to make it easier to consume by other pages, decoupling its props
from what the Host View used to send to the old Host View Flyout.

Besides adjustments to the component responsiveness, this PR also
improves the logic around adding tabs and managing their state.

### How to test this PR

- Run `yarn storybook infra`
  - Check all the storybooks related to the Asset Detail Embeddable
- Start Kibana
  - Go to the Hosts View page, open the flyout, and play with it. 

### For reviewers
The Asset Details Embeddable still depends on a few things from the
`pages/*` folder, and a couple of components are still tightly coupled
with the Host View. We'll address these things to keep this PR small in
the next ones.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 11:57:52 -03:00
Kaarina Tungseth
c12e17c6dc
[DOCS] Adds #158338 breaking change to 8.6 release notes (#158397)
## Summary

Closes #158338.
2023-05-30 09:55:55 -05:00
Tiago Costa
8d1afc5c97
skip flaky suite (#157760) 2023-05-30 15:35:22 +01:00
Nathan Reese
94d4574b58
[maps] move routes from /api/maps to /internal/maps and add route versioning (#158328)
Fixes https://github.com/elastic/kibana/issues/157104 and
https://github.com/elastic/kibana/issues/156323

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 07:51:12 -06:00
Nathan Reese
ff8cebb407
[maps] fix size legend does not indicate when min or max clamped by std range (#156927)
Fixes https://github.com/elastic/kibana/issues/156907 and
https://github.com/elastic/kibana/issues/133810

Display `>` when max is clamped by standard deviation
<img width="200" alt="Screen Shot 2023-05-05 at 3 33 11 PM"
src="https://user-images.githubusercontent.com/373691/236572440-a0395094-5a70-45f8-b64a-dd4ecdc1412a.png">

Bottom label is not cut off when pixel size is 1
<img width="200" alt="Screen Shot 2023-05-05 at 3 33 18 PM"
src="https://user-images.githubusercontent.com/373691/236572444-51b5af9e-fa31-4033-a671-0a9642d10e3e.png">

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 07:28:45 -06:00
Rudolf Meijering
094b62a6d6
Migrations: dynamically adjust batchSize when reading (#157494)
## Summary

Migrations read 1000 documents by default which works well for most
deployments. But if any batch happens to be > ~512MB we hit NodeJS' max
string length limit and cannot process that batch. This forces users to
reduce the batch size to a smaller number which could severely slow down
migrations.

This PR reduces the impact of large batches by catching
elasticsearch-js' `RequestAbortedError` and reducing the batch size in
half. When subsequent batches are successful the batchSize increases by
20%. This means we'll have a sequence like:

1. Read 1000 docs  (small batch)
2. Read 1000 docs 🔴 (too large batch)
3. Read 500 docs  
4. Read 600 docs  
5. Read 720 docs 
6. Read 864 docs 
7. Read 1000 docs  (small batch)

This assumes that most clusters just have a few large batches exceeding
the limit. If all batches exceed the limit we'd have 1 failure for every
4 successful reads so we pay a 20% throughput penalty. In such a case it
would be better to configure a lower `migrations.batchSize`.

Tested this manually:
1. Start ES with more heap than the default, otherwise reading large
batches will cause it to run out of memory
`ES_JAVA_OPTS=' -Xms6g -Xmx6g' yarn es snapshot
--data-archive=/Users/rudolf/dev/kibana/src/core/server/integration_tests/saved_objects/migrations/archives/8.4.0_with_sample_data_logs.zip`
2. Ingest lots of large documents of ~5mb
   ```
curl -XPUT
"elastic:changeme@localhost:9200/_security/role/grant_kibana_system_indices"
-H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'
      {                           
        "indices": [                                            
          {
            "names": [
              ".kibana*"
            ],
            "privileges": [
              "all"
            ],
            "allow_restricted_indices": true
          }
        ]
      }'

curl -XPOST "elastic:changeme@localhost:9200/_security/user/superuser"
-H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'
      {
        "password" : "changeme",  
        "roles" : [ "superuser", "grant_kibana_system_indices" ]
      }'

curl -XPUT
"superuser:changeme@localhost:9200/.kibana_8.4.0_001/_mappings" -H
"kbn-xsrf: reporting" -H "Content-Type: application/json" -d'
      {
"dynamic": false,
            "properties": {

            }

      }'

      set -B                  # enable brace expansion
      for i in {1..400}; do
curl -k --data-binary
"@/Users/rudolf/dev/kibana/src/core/server/integration_tests/saved_objects/migrations/group3/body.json"
-X PUT
"http://superuser:changeme@localhost:9200/.kibana_8.4.0_001/_doc/cases-comments:"{$i}"?&pretty=true"
-H "Content-Type: application/json"
      done
   ```
3. Start Kibana with a modest batchSize otherwise we could OOM ES `node
scripts/kibana --dev --migrations.batchSize=120`



<details><summary>Example logs. Note the "Processed x documents" only
logs when the next batch is successfull read, so the order seems wrong.
To improve it we'd need to log progress after a batch is successfully
written instead 🤷 </summary>
```
[.kibana] Processed 120 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 3667ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1740ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1376ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1402ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1311ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1388ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 900ms.
[.kibana] Read a batch that exceeded the NodeJS maximum string length, retrying by reducing the batch size in half to 60.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_READ. took: 1538ms.
[.kibana] Processed 240 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 2054ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1042ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1310ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1388ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 1130ms.
[.kibana] Processed 300 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 2610ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1262ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1299ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1363ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1341ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 572ms.
[.kibana] Processed 372 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 3330ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1488ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1349ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1312ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1380ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1310ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 139ms.
[.kibana] Processed 458 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_TRANSFORM. took: 3278ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_TRANSFORM -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1460ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1370ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1303ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_INDEX_BULK. took: 1384ms.
[.kibana] REINDEX_SOURCE_TO_TEMP_INDEX_BULK -> REINDEX_SOURCE_TO_TEMP_READ. took: 1298ms.
[.kibana] Processed 542 documents out of 542.
[.kibana] REINDEX_SOURCE_TO_TEMP_READ -> REINDEX_SOURCE_TO_TEMP_CLOSE_PIT. took: 4ms.
```
</details>
### 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
- [ ] 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)


### Risks


### 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: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Gerard Soldevila <gerard.soldevila@elastic.co>
2023-05-30 06:25:07 -07:00
mohamedhamed-ahmed
c06b5efe17
[Logs+] Replace infra public usages of link-to routes (#158362)
part of #157985

## 📝  Summary

After implementing [infra
locators](https://github.com/elastic/kibana/pull/155156) to allow
navigation to the logs UI we need to replace all usages of the old
link-to routes so that we have strongly typed navigation to the logs UI.

This PR focuses on replacing `link-to` usages in the Infra Public
plugin.

##   Testing

A) 
1. Navigate to Observability -> Infrastructure -> Inventory
2. Choose any of the Host from the waffle
3. Click logs tab
4. Click open in logs link

B) 
1. Navigate to Observability -> Infrastructure -> Inventory
2. Switch to table view
3. Click any of the Host from the table
4. Click Host Logs


6646c496-1760-4788-9532-b318487070d1
2023-05-30 14:08:40 +01:00
Jordan
f89537909c
[Cloud Security][CNVM] Initial CNVM dashboard links and placeholder (#158188) 2023-05-30 16:05:40 +03:00
Sandra G
13806c8c8e
[Infrastructure UI] Decouple source config HTTP API schema from saved object schema (#158562)
Resolves https://github.com/elastic/kibana/issues/152279

Separates out the type for saved object `infrastructure-ui-source` so
the HTTP API no longer references the same type.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 08:45:07 -04:00
Jonathan Buttner
6547d33635
[Cases] Refactor decode logic (#158515)
This PR refactors a couple things:

1. Moves the decodeOrThrow logic inside of the `try/catch` within the
client. This handles the scenario where another plugin is calling the
client. This way we wrap the error such that it is more consumable by
other plugins. This also makes the code more consistent.
2. Adds `decodeWithExcessOrThrow` to a couple places we didn't have it
in the client
3. Adds `decodeWithExcessOrThrow` to a few places in the HTTP route
handlers where we were access fields from the query params or body but
weren't validating that they existed
4. Ensured we had `decodeOrThrow` in the service layer before returning
to the client
5. Unskipped a few tests now that we have the `strict` io-ts types in
place
2023-05-30 08:40:51 -04:00
Yan Savitski
815fddb9f0
[Search Application] Use ES JS client instead of Transport (#158446)
- ✔️ Update es client version
- ✔️ Replace transport api to es client
- ✔️ Update tests
- ✔️ Fix TS issues
2023-05-30 05:16:40 -07:00
Giorgos Bamparopoulos
76e36beead
[APM] Storage explorer improvements (#157303)
Adds several storage explorer improvements with a goal to change the
target to GA.
### Changes
- Adds a download report component that creates a JSON doc with the
service stats breakdown
- Changes `Sample rate` to `Sampling rate` in the services table
- Changes `Disk space used` to `Relative disk space used` and
`Incremental APM size` to `Delta in APM size` in the summary stats panel
- Updates the tooltip of the `Total APM size` summary stat to `Total
storage size of all APM indices including replicas, ignoring the filter
settings`
- Removes the storage explorer link from the header and adds it to the
left navigation component
- Adds a link from the data streams in the indices breakdown table to
data stream details in index management
- Removes the Beta label
- Adds `key` to the card items used in the documentation section
2023-05-30 13:07:49 +01:00
Chenhui Wang
ec400d62cf
Add last_incremental_sync_scheduled_at to connector index mapping (#158639)
# Part of https://github.com/elastic/enterprise-search-team/issues/4645

## Summary

This PR adds a new field `last_incremental_sync_scheduled_at ` to index
`.elastic-connectors`.


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

- [ ] 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)
2023-05-30 17:58:30 +08:00
Elena Stoeva
dd4e88e436
[Serverless] Disable Search Sessions (#158356)
Partially addresses https://github.com/elastic/kibana/issues/157756

## Summary

This PR disables the Search Sessions plugin for serverless.

**How to test:**

1. Start Elasticsearch with `yarn es snapshot` and Kibana with yarn
`serverless-{mode}` where `{mode}` can be `es`, `security`, or `oblt`.
2. Verify that the Search Sessions app is not accessible and its path
(`app/management/kibana/search_sessions`) leads to the Stack Management
landing page.
2023-05-30 10:55:45 +01:00
Gergő Ábrahám
771c8790d7
[Security Solution][Testing] Improve policy related endpoint regression test coverage (#157412)
## Summary

- Adds automated test coverage for Policy Detail page related manual
tests. See linked issue for test cases.
- fixes e2e alerts tests

~Note: 3 more e2e test cases are coming soon.~
Update: ready to review, the 3 e2e test cases will be added in a
separate PR.
2023-05-30 02:21:14 -07:00
mohamedhamed-ahmed
adb05f6e24
[APM UI] Replace logs link-to routes with appropriate locator (#158365)
part of #157985

## 📝  Summary

After implementing [infra
locators](https://github.com/elastic/kibana/pull/155156) to allow
navigation to the logs UI we need to replace all usages of the old
link-to routes so that we have strongly typed navigation to the logs UI.

This PR focuses on replacing `link-to` usages in the APM plugin.

##   Testing

1. Navigate to APM -> Services
2. Follow video below to navigate to where the logs links are located
3. Links should behave as before and maintain navigation params



c631ea31-c5d9-4d05-9219-7b208daf2c37
2023-05-30 09:58:25 +01:00
David Sánchez
fd67e1b37a
[Security Solution][Endpoint] Fix policy_details flaky test (#156963)
## Summary

- Increases timeout as element might take a bit to be displayed

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-05-30 10:48:28 +02:00
Chenhui Wang
66f9ccdfd2
Add sync_cursor to Sync job index mapping (#158638)
# Part of https://github.com/elastic/enterprise-search-team/issues/4665

## Summary

This PR adds a new field `sync_cursor` to index
`.elastic-connectors-sync-jobs`.


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

- [ ] 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)
2023-05-30 16:40:24 +08:00
Pierre Gayvallet
e12b716ae2
ZDT migration algorithm: allow to switch from a v2-managed state (#158434)
## Summary

Fix https://github.com/elastic/kibana/issues/158372

Change the logic of the `zdt` algorithm to be able to re-use an existing
"v2 managed" cluster state (a kibana cluster previously running the v2
migration algorithm) if compatible.

Technically the v2 index state is compatible with zdt after 8.8 (when we
introduced `indexTypeMap` and restricted to compatible mapping changes
only).

See https://github.com/elastic/kibana/issues/158372 for more detailed
explanations.
2023-05-30 01:25:14 -07:00
Maxim Palenov
0d3b63b1c1
[Security Solution] Remove forced actions from detection rules Cypress tests (#158560)
**Relates to:** https://github.com/elastic/kibana/issues/152344, https://github.com/elastic/kibana/issues/152470
**Depends on:** https://github.com/elastic/kibana/pull/158392

## Summary

Removes `force` option from Cypress actions like `type()`, `click()` and etc. It helps to catch UI quirks instead of silently ignoring them.

## Details

After merging back of https://github.com/elastic/kibana/pull/158392 it's possible to remove `force: true` flag from the Cypress actions used in Detection rules tests. Based on the discussion in https://github.com/elastic/kibana/issues/152470 it's bette to avoid forced actions and leave a comment if there is no other way than forcing an action.
2023-05-30 09:56:50 +02:00
Pierre Gayvallet
50950e9c3b
[ZDT] SOR: handle higher-version documents retrieved from persistence. (#158251)
## Summary

Follow-up of https://github.com/elastic/kibana/pull/157895
Part of https://github.com/elastic/kibana/issues/150312

Adapt the SOR to accept retrieving documents on higher versions from the
persistence, and convert them back to the latest knows version (using
the version schema feature added in
https://github.com/elastic/kibana/pull/157895).
2023-05-30 00:11:56 -07:00
Julia Rechkunova
e928b519f3
[Discover] Fix grid theme (#158231)
Addresses https://github.com/elastic/kibana/issues/158201

## Summary

This PR fixes grid row selection in dark mode.

Before:
<img width="300" alt="Screenshot 2023-05-23 at 09 53 11"
src="e447ebb5-ca75-4778-84a7-ec654aca3709">

After:
<img width="300" alt="Screenshot 2023-05-23 at 09 52 44"
src="86f7ccd0-a306-426b-9fcb-91d9131a7da6">

For testing:
Enable dark mode on User Profile page.
2023-05-30 07:31:25 +02:00
Kibana Machine
3ce1e44b2b
[api-docs] 2023-05-30 Daily api_docs build (#158642)
Generated by
https://buildkite.com/elastic/kibana-api-docs-daily/builds/353
2023-05-30 00:50:06 -04:00
Katerina Patticha
6aef8a5906
[codeowners] add apm-ui for serverless_observability (#158584)
add apm-ui for serverless_observability

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
2023-05-29 21:18:05 +02:00
Tiago Costa
098903aa7c
skip flaky suite (#155091) 2023-05-29 18:44:51 +01:00
Tiago Costa
1944e0c28d
skip flaky suite (#155090) 2023-05-29 18:43:44 +01:00
Rickyanto Ang
8f962c4351
[Cloud Posture]Right Align Back to resources button on Resource Findings page (#158526)
## Summary

Part of quick wins where back to resources button is now right aligned. 
**Notes:**
The solution where we are hiding the Vulnerabilities and
Misconfigurations tabs doesn't seem to be a 'Quick win' as such for now
the fix will be this
<img width="1429" alt="Screenshot 2023-05-27 at 1 26 28 AM"
src="a3d261da-96f6-4141-80fa-fd2c98ed7acb">
2023-05-29 08:37:47 -07:00
Peter Pisljar
fb4946d0a5
moving visualizations team owned paths to /internal (#157984) 2023-05-29 16:58:41 +02:00
Jordan
f28b694e5a
[Cloud Security] Table tab for vuln flyout (#158401) 2023-05-29 05:49:40 -07:00
Jordan
b243145461
[Cloud Security] Table tab for findings flyout (#158402) 2023-05-29 05:27:30 -07:00
Angela Chuang
3bf3e13bc6
[SecuritySolution] Get started page (#158461) 2023-05-29 10:31:48 +01:00
Luke
96e4a83dcb
Alert redirects w/ new flyout and share button (#157956)
## Summary

This PR ensures that alert redirection mechanism works the same way it
does for the legacy flyout (eg. that redirects done with
`kibana.alert.url` work),
and it introduces the share button, whenever `kibana.alert.url` is
present:


![image](dbb15607-f4b7-4dd2-abf7-9a76324576ac)

### Testing
The usual approach with switching the flag applies, it should work with
any alert created with detection rules.

### 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)
- [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: Philippe Oberti <philippe.oberti@elastic.co>
2023-05-29 11:15:17 +02:00
Peter Pisljar
6abee5af88
[CM] graph onboarding (#157698) 2023-05-29 10:36:47 +02:00
Chenhui Wang
d7570424b2
Add job_type to sync job index mapping (#158532)
# Part of https://github.com/elastic/enterprise-search-team/issues/4627

## Summary

This PR adds a new field `job_type` to index
`.elastic-connectors-sync-jobs`.


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

- [ ] 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)
2023-05-29 14:52:01 +08:00
Chenhui Wang
4c61dd5739
Add sync_cursor to connector index mapping (#158482)
# Part of https://github.com/elastic/enterprise-search-team/issues/4626

## Summary

This PR adds a new field `sync_cursor` to index `.elastic-connectors`.


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

- [ ] 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)
2023-05-29 14:39:19 +08:00