## Summary
This PR addresses a bug that when a rule is created using data view,
analyzer preview is blank. This is due to a check on if index exists
before rendering the analyzer preview. This PR updated the index field
from `kibana.alert.rule.parameter.index` to 'kibana.alert.rule.indices`,
the later is introduced in https://github.com/elastic/kibana/pull/130929
and is available when a rule is created using either index patterns or
data view.
**How to reproduce the bug**
- Refer to bug report https://github.com/elastic/kibana/issues/164829
**How to test**
- Create a rule using data view
- Generate some alerts
- Go to alerts page, expand a row in alerts table
- Go to Visualization -> Analyzer preview, the analyzer preview tree
should be present

### 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
## Summary
While working with @1Copenut on troubleshooting an EUI upgrade issue, we
ran into some problems following these instructions, so I've updated
them to include the full steps needed to test shared failures.
---------
Co-authored-by: Matthias Wilhelm <ankertal@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This PR just temporarily enables more detail logging for WebDriver
NoSuchSessionError happening on FTR.
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
## Summary
This PR calls the pipeline introduced on
https://github.com/elastic/gpctl/pull/167 which calls the e2e tests
before updating serverless gitops.
The previous change which was introduced on the commits below, used
gpctl to update the image tags for kibana on the controller. This change
resulted in skipping the part where the e2e tests were being run 😬bf148fb35f3cfbf24190
The present PR fixes this, by using the new pipeline which includes the
e2e tests introduced on https://github.com/elastic/gpctl/pull/167
## Summary
There are cases where the editor is rendered only on the expanded mode.
For example on the esql rule creation. In this case we want to hide the
minimize button as it is not used.
<img width="1070" alt="Screenshot 2023-08-31 at 11 01 30 AM"
src="4ce3859a-08bb-466f-bfb8-1879b2fb8ed5">
### Checklist
- [ ] [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
Attempt at fixing https://github.com/elastic/kibana/issues/127545
The failing tests use `esArchiver` to cleanup Saved Object indices
between tests.
Strangely, the cleanup method calls the migration logic to update the SO
indices.
In this particular source of flakiness, a test fails during the
migration (problem is tracked by
https://github.com/elastic/kibana/issues/163289).
Performing a migration as part of the cleanup does not make too much
sense (at least in this test suite), so the goal of this PR is to
simplify the cleanup operation, getting rid of the call to
`migrateSavedObjectIndices`.
50 runs flaky test runner
https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2850✅
## Summary
Fixes issue in descriptions of landing page icons which were always
displaying in white color. It only happens in Safari, other browsers
show the text in the correct color.
Fix: Remove misuse of `color` property in `EuiText` component
Before:

After:

## Summary
Original ticket: https://github.com/elastic/kibana/issues/163472
This PR fixes Rule Preview UI which is broken when user closes the
preview component.
**Broken State:**
<img width="1724" alt="Screenshot 2023-08-28 at 14 56 42"
src="ec123a06-fef1-47c2-8b29-3567b8037cff">
**Fixed UI:**
<img width="1723" alt="Screenshot 2023-08-28 at 14 55 23"
src="fb4955fc-77af-4f02-b326-cec01f09f4ed">
## Summary
Use monitor location id for filtering.
Also removed redundant code which was their to account for missing label
in location objects which were part of monitors.
### Testing
1. Make sure location filtering is working as expected in overview and
management pages
2. Make sure sorting by locaiton is working as expected on both pages
## Summary
Closes https://github.com/elastic/kibana/issues/137810
Part of https://github.com/elastic/kibana/issues/163248
This PR is the **first iteration** of the new ES|QL language in kibana.
The majority of the functionality is based on the existing functionality
for SQL (which has already been merged). This builds on top of it to
enable the functionality for ES|QL. We decided to remove SQL for now so
this PR enables ES|QL and hides SQL. We are not removing the code for
now.
### Important notes:
- This PR contains basic autocomplete functionality for the ES|QL
commands. We want to improve it in follow up PRs
- The majority of the tests for SQL were moved to work with ES|QL
instead
- The search strategy is a very simple endpoint for now as we don't have
async search nor pagination
- Now that we remove SQL, the ui for ES|QL selection has changed
- The documentation for ESQL has been handled by the docs team so it is
already reviewed and in sync with the official documentation
- ES|QL is disabled in serverless projects for now
### Changes from SQL:
- The Discover histogram now is being created with ES|QL (using the
date_trunc function). This gives it the ability to be saved on a
dashboard and also to be edited inline.
- ES|QL sometimes returns some warnings (on the search headers). For
example when we are trying to date parse a string that doesnt contain a
valid date). These warnings are also reported on the UI. There is a bug
in ES and the warning doesnt come always
https://github.com/elastic/elasticsearch-internal/issues/1465)
- We have 2 types of commands:
- Transformational commands (keep, stats) -> when they exist in the
query Discover should render the Table view (selected columns)
- Non transformational commands (all the others) -> in that case
Discover renders the Document view
- ESQL switch on advanced settings is now on by default
**Discover view with non transformational commands**
<img width="1678" alt="image"
src="abe100e1-01e9-4fe0-9b89-6d8bdf6443fc">
**Discover view with transformational commands**
<img width="1679" alt="image"
src="e46af422-daeb-4be5-88cf-522211674ff5">
### Missing
- ESQL autocomplete is not perfect, we are going to work on it on a
future PR. Specifically:
- There is a bug in autocomplete, sometimes writing a query overwrites
the existing one, will deal with it in a future PR
- Further improvements
### 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
- [ ] [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: Alexey Antonov <alexwizp@gmail.com>
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Abdon Pijpelink <abdon.pijpelink@elastic.co>
Co-authored-by: gchaps <33642766+gchaps@users.noreply.github.com>
Co-authored-by: Peter Pisljar <peter.pisljar@elastic.co>
Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
Co-authored-by: Matthias Wilhelm <matthias.wilhelm@elastic.co>
Co-authored-by: Davis McPhee <davis.mcphee@elastic.co>
Part of https://github.com/elastic/kibana/issues/152807
## Summary
Change the way the `update` API of the savedObjects repository works, to
stop using ES `update` and perform the update manually instead by
fetching the document, applying the update and then re-indexing the
whole document.
This is required for BWC and version cohabitation reasons, to allow us
converting the document to the last known version before applying the
update.
The retry on conflict behavior is manually performed too, by detecting
conflict errors during the `index` calls and performing the whole loop
(fetch->migrate->update->index) again.
Upserts are done in a similar way, by checking the document's existence
first, and then using the `create` API.
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: pgayvallet <pierre.gayvallet@elastic.co>
This is part 1 of a series of PRs to expose the flamegraph to be used by
other plugins.
**The problem**
Currently for plugin-A to show data from plugin-B, it needs to add
dependency on plugin-B. If plugin-B wants to show data from plugin-A, it
also needs to add plugin-A as a dependency, and here is where the
problem happens. In such scenario, we have a cyclic dependency problem.
**The solution**
To solve this problem a new plugin is created, `profiling-data-access`.
This plugin exposes services that consumer plugins can call in other to
have the data they need to show on their end. The `profiling` plugin is
also using this new plugin. For now, only the flamegraph service is
available, The idea is to slowly migrate the data fetching from
profiling to this new plugin in other to facilitate the integration
across plugins.
**Why some many files?**
As I said, only the flamegraph logic was moved to the new plugin, but it
has many files that it needs to properly build the response of the
service call. I moved all these files to the `common` folder inside the
new plugin and adjusted the imports in the profiling plugin.
<img width="1032" alt="Screenshot 2023-08-31 at 09 29 27"
src="287bd28e-b834-45e0-8042-576d1fcff6cd">
---------
Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary
Fix https://github.com/elastic/kibana/issues/165166
- remove `getAllIndices` from the SO service's setup contract
- adapt `getAllIndices` from the start contract to only return indices
that are effectively present in the current environment
Closes#164657
## Summary
- Improve kbn/es docs to include prerequisites for using serverless
- Better guidance to use `--ssl` flag to enable security
- Alert the user how to authenticate with Elastic registry if it fails
- Guidance for using `--ssl` and authentication
## Summary
If a user is running serverless ES in the cloud and serverless KBN
locally, passing the token can trigger an invalid configuration error:
`serviceAccountToken cannot be specified when "username" is also
defined`
Additionally, the token is likely invalid anyways because the SES
instance was not seeded with it. This PR checks the
`elasticsearch.hosts` configuration for non-localhost values before
passing along the token.
## Testing
Add something like the following to `config/kibana.dev.yml` and run
`yarn serverless`. Should not get a configuration error.
```yml
elasticsearch.hosts: https://xxxxxxxxxx.es.us-west2.gcp.elastic-cloud.com:443
elasticsearch.username: kibana_system_user
elasticsearch.password: xxxxxxxxxxxxxx
```
---------
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
## Summary
The config does not propagate to downstream workflow jobs in all cases
so things break if we don't use the default. Therefore we will make dev
the exception.
Update the gpctl config we reference in the gitops repo. The default
config needs to be the promotion workflow and dev needs to be separate
otherwise other promotion infrastructure breaks since it does not know
to look for the overridden config.
https://github.com/elastic/serverless-gitops/pull/688
Slack: https://elastic.slack.com/archives/C9PPG4EJH/p1693480365606699
Resolves#162518
This PR updates the logic that detects whether Kibana has booted
correctly during interactive setup.
The issue described in #162518 was a false positive and only effected
Kibana when run in development mode.
We already have end-to-end tests which go through the entire enrollment
flow and ensure that Kibana correctly redirects to the login page once
interactive setup completes:
https://github.com/elastic/kibana/blob/main/test/interactive_setup_functional/tests/enrollment_token.ts#L78-L81
These tests passed with both the previous and the updated logic.
However, the end-to-end tests do not check development mode which is why
the build never failed and we started seeing this issue.
Closes https://github.com/elastic/kibana/issues/160253.
### Changes
- Schema was added to observabilityOnboarding SO
- `x-elastic-internal-origin` was added to requests from installation
script