kibana/x-pack/plugins/ux
Nathan Reese b5bcf69022
[search source] remove is_partial check (#164506)
Closes https://github.com/elastic/kibana/issues/164893

### Background

"is partial" has 2 meanings
1) Results are incomplete because search is still running
2) Search is finished. Results are incomplete because there are shard
failures (either in local or remote clusters)

[async
search](https://www.elastic.co/guide/en/elasticsearch/reference/current/async-search.html)
defines 2 flags.
1) `is_running`: Whether the search is still being executed or it has
completed
2) `is_partial`: When the query is no longer running, indicates whether
the search failed or was successfully completed on all shards. While the
query is being executed, is_partial is always set to true
**note**: there is a bug in async search where requests to only local
clusters return `is_partial:false` when there are shard errors on the
local cluster. See
https://github.com/elastic/elasticsearch/issues/98725. This should be
resolved in 8.11

Kibana's existing search implementation does not align with
Elasticsearch's `is_running` and `is_partial` flags. Kibana defines "is
partial" as definition "1)". Elasticsearch async search defines "is
partial" as definition "2)".

This PR aligns Kibana's usage of "is partial" with Elasticsearch's
definition. This required the following changes
1) `isErrorResponse` renamed to `isAbortedResponse`. Method no longer
returns true when `!response.isRunning && !!response.isPartial`. Kibana
handles results with incomplete data. **Note** removed export of
`isErrorResponse` from data plugin since its use outside of data plugin
does not make sense.
2) Replace `isPartialResponse` with `isRunningResponse`. This aligns
Kibana's definition with Elasticsearch async search flags.
3) Remove `isCompleteResponse`. The word "complete" is ambiguous. Does
it mean the search is finished (no longer running)? Or does it mean the
search has all results and there are no shard failures?

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Jatin Kathuria <jatin.kathuria@elastic.co>
Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com>
2023-10-02 13:25:08 -06:00
..
.buildkite/pipelines Enable synthetics flaky runner (#137289) 2022-07-28 16:33:08 +02:00
.storybook
common [UX Dashboard] Unify processor event (#135367) 2022-08-02 15:22:19 -04:00
e2e [es_archives] add 'auto_expand_replicas: 0-1' in index mappings (#162499) 2023-07-26 14:30:54 +01:00
public [search source] remove is_partial check (#164506) 2023-10-02 13:25:08 -06:00
scripts [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
typings [Synthetics] Migrate service list query out of APM (#132548) 2022-05-23 17:04:55 -07:00
.prettierrc
CONTRIBUTING.md
jest.config.js
kibana.jsonc [Infra] Disable infra plugin in serverless projects (#165289) 2023-09-08 15:05:28 +02:00
readme.md Add a simple set of instructions on running and developing e2e tests for UX dashboard. (#134371) 2022-06-14 10:29:48 -07:00
tsconfig.json [Observability AI Assistant] Action menu item (#163463) 2023-08-11 09:51:36 +02:00

Documentation for UX UI developers

https://docs.elastic.dev/kibana-dev-docs/welcome

Running E2E Tests

The tests are managed via the scripts/e2e.js file. This script accepts numerous options.

From the kibana root you can run node x-pack/plugins/ux/scripts/e2e.js to simply stand up the stack, load data, and run the tests.

If you are developing a new test, it is better to stand up the stack in one shell and load data/run tests in a second session. You can do this by running:

  • node ./x-pack/plugins/ux/scripts/e2e.js --server
  • node ./x-pack/plugins/ux/scripts/e2e.js --runner, you can also specify --grep "{TEST_NAME}" to run a specific series of tests