Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover] Inline shard failures warnings #161271

Merged
merged 76 commits into from Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from 74 commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
eab86d5
[Discover] Intercept shard failures
jughosta Jul 5, 2023
bfd44e3
[Discover] Update deps
jughosta Jul 5, 2023
38e17fc
[Discover] Add a todo
jughosta Jul 5, 2023
86e7e16
[Discover] Rearrange the code
jughosta Jul 5, 2023
1af6f16
[Discover] Revert changes
jughosta Jul 6, 2023
d7b95ad
[Discover] Render warnings
jughosta Jul 6, 2023
5ebe38c
[Discover] Show a warning badge on dashboard
jughosta Jul 6, 2023
d37dcf0
[Discover] Handle NoResults case too
jughosta Jul 7, 2023
338559b
[Discover] Rearrange components
jughosta Jul 7, 2023
4854473
[Discover] Support long list
jughosta Jul 7, 2023
2400388
[Discover] Update tests
jughosta Jul 7, 2023
9be17a9
[Discover] Catch timeouts too
jughosta Jul 7, 2023
30ed661
[Discover] Better layout for timeouts
jughosta Jul 7, 2023
9c685f6
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 10, 2023
d11195f
[Discover] Allow to close warnings
jughosta Jul 10, 2023
993ea5c
[Discover] Inline context app shard warnings
jughosta Jul 10, 2023
e26cc30
Merge remote-tracking branch 'upstream/main' into 155216-inline-shard…
jughosta Jul 11, 2023
71190b6
[Discover] Update jest tests
jughosta Jul 11, 2023
4940876
[Discover] Add tests
jughosta Jul 11, 2023
e04aaca
[Discover] Simplify imports
jughosta Jul 11, 2023
bdac782
[Discover] Add tests
jughosta Jul 12, 2023
46361a0
[Discover] Update warning mocks
jughosta Jul 12, 2023
f5485b2
[Discover] Add more tests
jughosta Jul 12, 2023
3f102cf
[Discover] Add a test for the dashboard badge
jughosta Jul 12, 2023
932e345
[Discover] Update snapshots
jughosta Jul 12, 2023
369d135
Merge remote-tracking branch 'upstream/main' into 155216-inline-shard…
jughosta Jul 17, 2023
939b146
[Discover] Update adapters
jughosta Jul 17, 2023
b9de037
Update src/plugins/discover/public/application/main/components/no_res…
jughosta Jul 17, 2023
6fc2927
Merge remote-tracking branch 'origin/155216-inline-shard-error' into …
jughosta Jul 17, 2023
a28330d
[Discover] Update type
jughosta Jul 17, 2023
25a9d81
Update src/plugins/discover/public/utils/get_search_response_intercep…
jughosta Jul 17, 2023
03bcdfc
Update src/plugins/discover/public/components/common/warnings_callout…
jughosta Jul 17, 2023
c2ccd0f
[Discover] Remove sass styles and fragment
jughosta Jul 17, 2023
e83ac9d
Merge remote-tracking branch 'origin/155216-inline-shard-error' into …
jughosta Jul 17, 2023
38df2fe
[Discover] Fix icon and title alignment
jughosta Jul 17, 2023
70509c9
[Discover] Fit content for smaller screens
jughosta Jul 17, 2023
64a368b
[Discover] Make callouts scrollable
jughosta Jul 17, 2023
5b80495
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 17, 2023
4fb3d94
Merge remote-tracking branch 'origin/155216-inline-shard-error' into …
jughosta Jul 17, 2023
6ce4053
[Discover] Update jest snapshots
jughosta Jul 17, 2023
bc9d634
[Discover] Fix scollable container
jughosta Jul 18, 2023
65bc4fa
[Discover] Update jest snapshots
jughosta Jul 18, 2023
e2172ea
Merge main
jughosta Jul 19, 2023
76dc8f0
[Discover] Update comment
jughosta Jul 19, 2023
5e521c2
[CI] Auto-commit changed files from 'node scripts/eslint --no-cache -…
kibanamachine Jul 19, 2023
77e667a
[Discover] Extract warnings into a new package
jughosta Jul 20, 2023
f604b0b
[Discover] Suppress shards failure toasts for hits number request
jughosta Jul 24, 2023
c5111d4
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 24, 2023
fbc0053
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Jul 24, 2023
f1341ef
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Jul 24, 2023
cc4973a
[Discover] Fix imports
jughosta Jul 24, 2023
2d05b3d
[Discover] Update tests
jughosta Jul 24, 2023
2dea556
[Discover] Fix mock imports
jughosta Jul 24, 2023
4cb789b
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 25, 2023
d6930c6
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 25, 2023
d9f0fe4
Merge remote-tracking branch 'upstream/main' into 155216-inline-shard…
jughosta Jul 27, 2023
412f5bc
[Discover] Add a comment
jughosta Jul 27, 2023
39f4910
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 27, 2023
bd880bc
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 31, 2023
50271de
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 31, 2023
40a89ab
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 31, 2023
72253ab
Merge branch 'main' into 155216-inline-shard-error
jughosta Jul 31, 2023
fcb44ff
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine Jul 31, 2023
2696592
Merge remote-tracking branch 'upstream/main' into 155216-inline-shard…
jughosta Aug 2, 2023
c9ad004
[Discover] Show warning badge outside of grid in a saved search panel
jughosta Aug 2, 2023
e640e68
Merge remote-tracking branch 'upstream/main' into 155216-inline-shard…
jughosta Aug 2, 2023
fb6eafe
[Discover] Add comments
jughosta Aug 2, 2023
5249333
Merge remote-tracking branch 'upstream/main' into 155216-inline-shard…
jughosta Aug 3, 2023
b7dd1ef
[Discover] Update old callout
jughosta Aug 3, 2023
e0a581b
[Discover] Update warning empty prompt
jughosta Aug 3, 2023
da0bd76
[Discover] Update tests
jughosta Aug 3, 2023
99b98c8
Merge remote-tracking branch 'upstream/main' into 155216-inline-shard…
jughosta Aug 4, 2023
7a3331f
[Discover] Update error callout
jughosta Aug 4, 2023
4c0358a
Merge branch 'main' into 155216-inline-shard-error
jughosta Aug 8, 2023
ed630be
Merge branch 'main' into 155216-inline-shard-error
jughosta Aug 8, 2023
2e3731e
Merge branch 'main' into 155216-inline-shard-error
jughosta Aug 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -589,6 +589,7 @@ src/plugins/screenshot_mode @elastic/appex-sharedux
x-pack/examples/screenshotting_example @elastic/appex-sharedux
x-pack/plugins/screenshotting @elastic/kibana-reporting-services
examples/search_examples @elastic/kibana-data-discovery
packages/kbn-search-response-warnings @elastic/kibana-data-discovery
x-pack/plugins/searchprofiler @elastic/platform-deployment-management
x-pack/test/security_api_integration/packages/helpers @elastic/kibana-core
x-pack/plugins/security @elastic/kibana-security
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Expand Up @@ -92,6 +92,7 @@
"server": "src/legacy/server",
"share": "src/plugins/share",
"sharedUXPackages": "packages/shared-ux",
"searchResponseWarnings": "packages/kbn-search-response-warnings",
"securitySolutionPackages": "x-pack/packages/security-solution",
"serverlessPackages": "packages/serverless",
"coloring": "packages/kbn-coloring/src",
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -592,6 +592,7 @@
"@kbn/screenshotting-example-plugin": "link:x-pack/examples/screenshotting_example",
"@kbn/screenshotting-plugin": "link:x-pack/plugins/screenshotting",
"@kbn/search-examples-plugin": "link:examples/search_examples",
"@kbn/search-response-warnings": "link:packages/kbn-search-response-warnings",
"@kbn/searchprofiler-plugin": "link:x-pack/plugins/searchprofiler",
"@kbn/security-plugin": "link:x-pack/plugins/security",
"@kbn/security-solution-ess": "link:x-pack/plugins/security_solution_ess",
Expand Down
3 changes: 3 additions & 0 deletions packages/kbn-search-response-warnings/README.md
@@ -0,0 +1,3 @@
# @kbn/search-response-warnings

Components and utils to render warnings which happen when executing search request. For example, shard failures and time outs.
19 changes: 19 additions & 0 deletions packages/kbn-search-response-warnings/index.ts
@@ -0,0 +1,19 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

export type { SearchResponseInterceptedWarning } from './src/types';

export {
SearchResponseWarnings,
type SearchResponseWarningsProps,
} from './src/components/search_response_warnings';

export {
getSearchResponseInterceptedWarnings,
removeInterceptedWarningDuplicates,
} from './src/utils/get_search_response_intercepted_warnings';
13 changes: 13 additions & 0 deletions packages/kbn-search-response-warnings/jest.config.js
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-search-response-warnings'],
};
5 changes: 5 additions & 0 deletions packages/kbn-search-response-warnings/kibana.jsonc
@@ -0,0 +1,5 @@
{
"type": "shared-common",
"id": "@kbn/search-response-warnings",
"owner": "@elastic/kibana-data-discovery"
}
6 changes: 6 additions & 0 deletions packages/kbn-search-response-warnings/package.json
@@ -0,0 +1,6 @@
{
"name": "@kbn/search-response-warnings",
"private": true,
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0"
}
@@ -0,0 +1,50 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import type { SearchResponseWarning } from '@kbn/data-plugin/public';

export const searchResponseTimeoutWarningMock: SearchResponseWarning = {
type: 'timed_out',
message: 'Data might be incomplete because your request timed out',
reason: undefined,
};

export const searchResponseShardFailureWarningMock: SearchResponseWarning = {
type: 'shard_failure',
message: '3 of 4 shards failed',
text: 'The data might be incomplete or wrong.',
reason: {
type: 'illegal_argument_exception',
reason: 'Field [__anonymous_] of type [boolean] does not support custom formats',
},
};

export const searchResponseWarningsMock: SearchResponseWarning[] = [
searchResponseTimeoutWarningMock,
searchResponseShardFailureWarningMock,
{
type: 'shard_failure',
message: '3 of 4 shards failed',
text: 'The data might be incomplete or wrong.',
reason: {
type: 'query_shard_exception',
reason:
'failed to create query: [.ds-kibana_sample_data_logs-2023.07.11-000001][0] Testing shard failures!',
},
},
{
type: 'shard_failure',
message: '1 of 4 shards failed',
text: 'The data might be incomplete or wrong.',
reason: {
type: 'query_shard_exception',
reason:
'failed to create query: [.ds-kibana_sample_data_logs-2023.07.11-000001][0] Testing shard failures!',
},
},
];