## Summary
After the ELSER model has been downloaded, the user has two options for
starting it: with a single-click using a minimal default configuration,
or fine-tuning it. Since the former is not meant for production use, we
encourage the user to make the model more resilient by configuring more
threads or allocations. This is mentioned on the ELSER status panel; it
shows "running single-threaded" if
- ~there is a single deployment of the model, AND~
- the model deployment is allocated to a single node, AND
- the deployment uses a single thread.
If any of these numbers is greater than 1, the panel just says the model
is running.

### 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/))
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fixes an onboarding issue related to using the old "create" and "edit"
fleet extensions. Agent flyout would not automatically open after adding
the integration.
Using the 'package-policy-replace-define-step' hook fixes the problem.
New hook does not implement integration **name** and **description**
fields, so those were added in as well.

### 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
## Summary
Adds the release notes for the 8.8.0 release.
---------
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Jen Huang <its.jenetic@gmail.com>
Co-authored-by: Larry Gregory <lgregorydev@gmail.com>
Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
Co-authored-by: István Zoltán Szabó <istvan.szabo@elastic.co>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
closes [#987](https://github.com/elastic/obs-infraobs-team/issues/987)
## Summary
This PR changes the hosts view to graciously handle exceptions caused by
invalid KQL submissions
<img width="1451" alt="image"
src="5bafc987-9a14-4b03-9038-53179f7b6735">
Besides, it changes the way it was handling a fatal error that can
happen if something wrong happens while creating an ad-hoc data-view -
this is highly unlike to happen, but we're standardizing how we display
errors on the hosts view
_Previously:_
<img width="1439" alt="image"
src="https://user-images.githubusercontent.com/2767137/236833673-c994512f-cb73-441b-9783-506bab67ff4b.png">
_Now:_
<img width="1439" alt="image"
src="https://user-images.githubusercontent.com/2767137/236862216-fada9f50-5d27-45b9-a6f3-8ac497a3e048.png">
### How to test
- Go to hosts view
- Type invalid KQL expressions on the search bar
### For reviewer
If the page is loaded with a querystring containing an invalid `query`
(e.g:
`_a=(dateRange:(from:now-15m,to:now),filters:!(),limit:20,panelFilters:!(),query:(language:kuery,query:%27%7D%27)`),
the Control components will show an error. However, they can't recover
from fatal errors. So even after the user corrects the mistake in the
query, the controls will remain in the error state.
A ticket has been opened to address this problem:
https://github.com/elastic/kibana/issues/156430
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes [#153942](https://github.com/elastic/kibana/issues/153942)
## Summary
This PR shows 'N/A' when the values inside the process summary are not
available (and the actual value when available)
## Testing
- Open Hosts view and find a host ( where the process summary is not
available )
- Open the flyout and select the "Processes" tab
- The values inside the process summary should be 'N/A'
(Same should be shown in inventory)
<img width="2259" alt="Screenshot 2023-05-11 at 13 34 58"
src="7f8a6e3d-cd87-452a-9f73-13dbc567501d">
<img width="2258" alt="Screenshot 2023-05-11 at 13 36 05"
src="2708ef2f-b119-46a4-80e8-048e25a22c21">
- Open Hosts view and find a host ( where the process summary is
available )
- Open the flyout and select the "Processes" tab
- The values inside the process summary should be available (and total
processes > 0)
(Same should be shown in inventory)
<img width="2262" alt="Screenshot 2023-05-11 at 13 35 33"
src="89aeb53f-c7c2-483f-b21f-9a0b67ca22c4">
<img width="2265" alt="Screenshot 2023-05-11 at 13 36 29"
src="06b44138-21bb-4c47-a31b-b43749df58a0">
## Summary
This PR fixes#155083 with the following changes:
- Create a new field to store the action context for an alert under
`ALERT_CONTEXT` (`kibana.alert.context`) for Log Threshold Rule.
- Change the alert detail page to reference the `groupByKeys` under
`ALERT_CONTEXT` for the group by section
- Change the history chart to only display `12h` buckets
I plan to do a follow up PR to add the ALERT_CONTEXT to the other
Observability Rules which we will also need for our alert details pages.
### How to test
1. Index data using:
https://github.com/elastic/high-cardinality-cluster/tree/main/high_cardinality_indexer
by running the following command:
```
DATASET="fake_stack" EVENTS_PER_CYCLE=1 INDEX_INTERVAL=60000 ELASTICSEARCH_HOSTS=http://localhost:9200 node src/run.js
```
2. Create a DataView for named "Admin Console" with the index pattern of
`high-cardinality-data-fake_stack.admin-console-*` and the timestamp
field set to `@timestamp`
3. Go to the Log Stream in Observability and change the index pattern to
"Admin Console"
4. Create a rule that looks like:
<img width="600" alt="image"
src="https://user-images.githubusercontent.com/41702/232578891-e65a3f1a-457c-459a-8d7f-cadc85e7067c.png">
5. Create a rule WITHOUT a group by that will trigger and check the
alert detail page
6. Create a rule with a ratio WITHOUT a group by that will trigger and
check the alert detail page
7. Create a rule with a ratio WITH a group by that will trigger and
check the alert detail page
---------
Co-authored-by: Kevin Delemme <kdelemme@gmail.com>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
closes: https://github.com/elastic/kibana/issues/155567
## Summary
This PR adds a new custom event to track the total number of hosts, as
well as adjusts a few `data-test-subj` attribute values to meet the
naming convention defined in the observability-dev
[docs](https://github.com/elastic/observability-dev/blob/main/docs/how-we-work/telemetry/telemetry-convention.md#naming-convention)
### For Reviewers
An option for not allowing yet a new custom event in FS could be
triggering the new custom events only for self-managed customers, and in
FS watch the element that holds the total number of hosts. But for now,
I decided to allow the new custom event in FS for consistency
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Fixes#155978
## Summary
- Remove the `fields` parameter from the find cases API
- Limit the `searchFields` parameter in the find cases API
One of the FTR tests was actually successfully calling the find_cases
API while passing the fields parameter but only certain combinations of
fields would actually work.
Passing single fields would not work.
I just removed the test as we won't support the `fields` param anymore.
---------
Co-authored-by: lcawl <lcawley@elastic.co>
## Summary
Adjust download links for Universal Profiling host-agent in the Add Data
page.
The links need to be updated because of a breaking change in the
protocol.
Signed-off-by: inge4pres <francesco.gualazzi@elastic.co>
## Summary
Updated the inference pipeline flyout logic to refetch ml models when
the user deploys the ELSER text expansion model. This will allow them to
select the model if they deploy it from the flyout.
25916c61-cdad-4213-8034-265aaac1f945
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Blocked by https://github.com/elastic/integrations/pull/6128
This PR changes Fleet's mapping generation logic in `@package` component
templates such that `time_series_dimension: true` and `metric_type`
properties are generated for all mappings regardless of whether
`index_mode: "time_series"` is set. Previously, Elasticsearch would
error if this were the case, however in newer versions of Elasticsearch
it's simply a no-op when `index_mode` is not set to `time_series` and
TSDS fields are declared.
This allows us to more easily toggle TSDB on/off via API requests for
user trial.
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Adds the possibility of registering external context menu items for Logs
UI/APM UI using UI Actions.
To test, revert the following commit:
4e5e99d674
**APM: Investigate button on the error sample section**
<img width="1446" alt="image"
src="3336213c-10e4-4670-9fce-1bd9cd261f38">
**Logs: Investigate button on a log line**
<img width="1472" alt="image"
src="b172bf68-86c4-45bd-9a87-9ee83211a1ca">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Add check to see if dependencies is undefined before checking length.
Dependencies can be undefined if a user's connector was created before
8.8.
Implements (currently mocked) serverless flags, with public/server APIs
and a reference implementation for agent configuration not being
available on serverless.
## Summary
Structural cleanup of the `SavedObjectsRepository` code, by extracting
the actual implementation of each API to their individual file (as it
was initiated for some by Joe a while ago, e.g `updateObjectsSpaces`)
### Why doing that, and why now?
I remember discussing about this extraction with Joe for the first time
like, what, almost 3 years ago? The 2.5k line SOR is a beast, and the
only reason we did not refactor that yet is because of (the lack of)
priorization of tech debt (and lack of courage, probably).
So, why now? Well, with the changes we're planning to perform to the SOR
code for serverless, I thought that doing a bit of cleanup beforehand
was probably a wise thing. So I took this on-week time to tackle this (I
know, so much for an on-week project, right?)
### API extraction
All of these APIs in the SOR class now look like:
```ts
/**
* {@inheritDoc ISavedObjectsRepository.create}
*/
public async create<T = unknown>(
type: string,
attributes: T,
options: SavedObjectsCreateOptions = {}
): Promise<SavedObject<T>> {
return await performCreate(
{
type,
attributes,
options,
},
this.apiExecutionContext
);
}
```
This separation allows a better isolation, testability, readability and
therefore maintainability overall.
### Structure
```
@kbn/core-saved-objects-api-server-internal
- /src/lib
- repository.ts
- /apis
- create.ts
- delete.ts
- ....
- /helpers
- /utils
- /internals
```
There was a *massive* amount of helpers, utilities and such, both as
internal functions on the SOR, and as external utilities. Some being
stateless, some requiring access to parts of the SOR to perform calls...
I introduced 3 concepts here, as you can see on the structure:
#### utils
Base utility functions, receiving (mostly) parameters from a given API
call's option (e.g the type or id of a document, but not the type
registry).
#### helpers
'Stateful' helpers. These helpers were mostly here to receive the
utility functions that were extracted from the SOR. They are
instantiated with the SOR's context (e.g type registry, mappings and so
on), to avoid the caller to such helpers to have to pass all the
parameters again.
#### internals
I would call them 'utilities with business logic'. These are the 'big'
chunks of logic called by the APIs. E.g `preflightCheckForCreate`,
`internalBulkResolve` and so on.
Note that given the legacy of the code, the frontier between those
concept is quite thin sometimes, but I wanted to regroups things a bit,
and also I aimed at increasing the developer experience by avoiding to
call methods with 99 parameters (which is why the helpers were created).
### Tests
Test coverage was not altered by this PR. The base repository tests
(`packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.test.ts`)
and the extension tests
(`packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/repository.{ext}_extension.test.ts`)
were remain untouched. These tests are performing 'almost unmocked'
tests, somewhat close to integration tests, so it would probably be
worth keeping them.
The new structure allow more low-level, unitary testing of the
individual APIs. I did **NOT** add proper unit test coverage for the
extracted APIs, as the amount of work it represent is way more
significant than the refactor itself (and, once again, the existing
coverage still applies / function here).
The testing utilities and mocks were added in the PR though, and an
example of what the per-API unit test could look like was also added
(`packages/core/saved-objects/core-saved-objects-api-server-internal/src/lib/apis/remove_references_to.test.ts`).
Overall, I think it of course would be beneficial to add the missing
unit test coverage, but given the amount of work it represent, and the
fact that the code is already tested by the repository test and the
(quite exhaustive) FTR test suites, I don't think it's worth the effort
right now given our other priorities.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Resolves https://github.com/elastic/kibana/issues/152773
Uses the `idWithLocation` value as the unique id for a monitor alert.
Given that we use uuid's for monitor config ids, this id should be
unique enough for any given monitor.
## Release note
All monitor status alerts for the Synthetics app that are active at the
time of upgrading will be resolved. A new alert will be created in its
place.
## Summary
Fixes https://github.com/elastic/kibana/issues/155630.
Fixes https://github.com/elastic/kibana/issues/156082.
Fixes filter generation to not generate `date_time` filters from
`date_nanos` field types.
Fixes filter generation to actually negate filters when clicking on the
minus button.
### 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
### Release note
Fixes an issue in Discover where filtering on a date_nanos field didn't
work correctly.
Fixes an issue in Discover where filtering out a range (date or
otherwise) would actually instead filter for the range.
## Summary
This enables a default native config, so that we don't show an empty
page to connectors that have `is_native` set to true but don't have a
known native configuration in Kibana.
## Summary
Starting with Chrome v113 we noticed that `_area_chart.ts` suite became
flaky #156821 failing with
`WebDriverError: unknown error: unhandled inspector error:
{"code":-32000,"message":"No node with given id found"}`
Updating chromedriver to v113 did not solve the issue and more tests
started to fail with the same error.
It happens occasionally when driver returns unhandled error instead of
StaleElementReferenceException. This PR adds the error to the
`RETRY_ON_ERRORS` list, so that FTR can search for the element again and
re-try the action on it:
```
│ debg getVisibleText: elementId=29C3E81151C86107290DD8F020524333_element_290
│ debg Chromedriver issue #4440, WebElementWrapper.getVisibleText: WebDriverError: unknown error: unhandled inspector error: {"code":-32000,"message":"No node with given id found"}
│ (Session info: chrome=113.0.5672.63)
│ debg current ElementID=29C3E81151C86107290DD8F020524333_element_290
│ debg new ElementID=29C3E81151C86107290DD8F020524333_element_293
│ debg Searching again for the element 'By(css selector, [data-test-subj="visEditorInterval"] + .euiFormErrorText)', 2 attempts left
│ debg getVisibleText: elementId=29C3E81151C86107290DD8F020524333_element_293
└- ✓ pass (1.8s)
```
There is no need to use `Retry` service, `WebDriverWrapper.retryCall`
should handle the issue.
Flaky test runner 100x for Vis Editor config:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2236
Flaky test runner 100x for Cases config:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2237
And 2 more 100x:
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2239https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2237