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

[Lens] Add percentile function #86490

Merged
merged 11 commits into from
Dec 23, 2020
Merged

Conversation

flash1293
Copy link
Contributor

@flash1293 flash1293 commented Dec 18, 2020

Fixes #74574

Release Notes: Adds percentile to Lens.

Behavior

This PR adds a single level percentile operation. It works very similar to the median operation, including an input to enter the desired percentile. On creating a new column, it defaults to the 95th percentile. The percentile input is a debounced number input. Changes are validated to be a valid integer between 0 and 100 (inclusively). Changing the value also updates the label as long as no custom label has been set. If a top values function is used, it is sorted by a percentile column if available.
Non-integer percentiles are disallowed because Elasticsearch can't order a terms agg by them (elastic/elasticsearch#66677) - in this case it felt more important to me to keep the default sorting behavior we are using for other metrics as well than to allow decimal points in the percentile.

Technical changes

  • New operation percentile
  • Add a new optional property to operation definition - getEsAggsSuffix. This is necessary because both the bucket path for sorting the terms agg and the column containing the result of the percentile calculation include a suffix (.<percentile>, e.g. .95). This is implemented by the percentile operation and used by the terms agg (to set the orderBy argument) and the toExpression function (to map the column correctly). If we implement single value percentile rank at some point, it can use the some logic
  • Add the current layer as an argument to the toEsAggsFn function - this is required so top values can look up the referenced metric column to get the suffix for building the order by path

Considerations

I considered using a slider component for the value as the allowed range is known, but I decided against it because IMHO when using percentiles the exact value matters and is known before configuring it. Because of this, it felt strange to me using a slider to configure it.

@flash1293 flash1293 added enhancement New value added to drive a business result Feature:Lens Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.12.0 v8.0.0 labels Dec 22, 2020
@flash1293 flash1293 changed the title [Lens] Add percentile [Lens] Add percentile function Dec 22, 2020
@flash1293 flash1293 marked this pull request as ready for review December 22, 2020 12:47
@flash1293 flash1293 requested a review from a team December 22, 2020 12:47
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@flash1293 flash1293 added release_note:enhancement and removed enhancement New value added to drive a business result labels Dec 22, 2020
Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working as expected, but a few small comments!

!Number.isNaN(inputValueAsNumber) &&
inputValueAsNumber >= 0 &&
inputValueAsNumber <= 100 &&
inputValueAsNumber % 1 === 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move some of the basic integer checking into helpers? We're using it in 3 places now.

Also, why is 0 a valid percentile?

Copy link
Contributor Author

@flash1293 flash1293 Dec 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, why is 0 a valid percentile?

Interesting, Elasticsearch treats the 0th percentile as min and 100th percentile as max, but according to wikipedia this is not how it works in general:

Note that in theory the 0th percentile falls at negative infinity and the 100th percentile at positive infinity, although in
many practical applications, such as test results, natural lower and/or upper limits are enforced.

I suggest we follow the common definition of percentile here and make the allowed range 1-99 inclusive, wdyt? I would also be fine with following Elasticsearch

Comment on lines 182 to 183
min={0}
max={100}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
min={0}
max={100}
min={1}
max={100}
step={1}

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected. Some code comments left.

I see why you removed the slider, I was about to write to add it :) . Perhaps we can live without unless there's a strong request for it.

lowerBound?: number
) {
const inputValueAsNumber = Number(inputValue);
// an input is value if it's not an empty string, parses to a valid number, is between 0 and 100 (inclusive)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is checked for 0 to 100 inclusiveness?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment was outdated, removed it

Comment on lines 55 to 56
// on initialization values can be null (from the Infinity serialization), so handle it correctly
// or they will be casted to 0 by the editor ( see #78867 )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind this comment was addressing the isValidNumber implementation here. Probably it needs to be removed

setInputValue(val);
}, []);
return (
<>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this Fragment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a leftover, thanks

// and is an integer
const inputValueIsValid = isValidNumber(inputValue, true, 99, 1);

useDebounce(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mind that this useDebounce implementation triggers two times at bootstrap: there's the useDebounceWithOptions version which can skip the first render

Copy link
Contributor

@wylieconlon wylieconlon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still LGTM

@flash1293 flash1293 merged commit a5cfc7f into elastic:master Dec 23, 2020
flash1293 added a commit to flash1293/kibana that referenced this pull request Dec 23, 2020
@timroes timroes added the release_note:feature Makes this part of the condensed release notes label Feb 1, 2021
@kibanamachine
Copy link
Contributor

kibanamachine commented Feb 1, 2021

💔 Build Failed

Failed CI Steps


Test Failures

X-Pack Detection Engine API Integration Tests.x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_actions·ts.detection engine api security and spaces enabled add_actions adding actions should be able to create a new webhook action and attach it to a rule

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://dryrun

[00:00:00]       │
[00:00:00]         └-: detection engine api security and spaces enabled
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: add_actions
[00:00:00]             └-> "before all" hook
[00:00:00]             └-: adding actions
[00:00:00]               └-> "before all" hook
[00:00:00]               └-> should be able to create a new webhook action and attach it to a rule
[00:00:00]                 └-> "before each" hook: global before each
[00:00:00]                 └-> "before each" hook
[00:00:00]                   │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] adding index lifecycle policy [.siem-signals-default-migration-cleanup]
[00:00:00]                   │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] adding index lifecycle policy [.siem-signals-default]
[00:00:00]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] adding template [.siem-signals-default] for index patterns [.siem-signals-default-*]
[00:00:00]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] [.ds-ilm-history-5-2021.02.01-000001] creating index, cause [initialize_data_stream], templates [ilm-history], shards [1]/[0]
[00:00:00]                   │ info [o.e.c.m.MetadataCreateDataStreamService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] adding data stream [ilm-history-5] with write index [.ds-ilm-history-5-2021.02.01-000001] and backing indices []
[00:00:00]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] [.siem-signals-default-000001] creating index, cause [api], templates [.siem-signals-default], shards [1]/[1]
[00:00:00]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.ds-ilm-history-5-2021.02.01-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.siem-signals-default-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [.siem-signals-default]
[00:00:00]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.ds-ilm-history-5-2021.02.01-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] [.kibana_1/jZEJqu0kRZe0tv1FjpjwkA] update_mapping [_doc]
[00:00:00]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.siem-signals-default-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [.siem-signals-default]
[00:00:00]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.ds-ilm-history-5-2021.02.01-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [ilm-history-ilm-policy]
[00:00:00]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.siem-signals-default-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [.siem-signals-default]
[00:00:03]                 └- ✖ fail: detection engine api security and spaces enabled add_actions adding actions should be able to create a new webhook action and attach it to a rule
[00:00:03]                 │      Error: expected 200 "OK", got 400 "Bad Request"
[00:00:03]                 │       at Test._assertStatus (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:268:12)
[00:00:03]                 │       at Test._assertFunction (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:283:11)
[00:00:03]                 │       at Test.assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:173:18)
[00:00:03]                 │       at assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:131:12)
[00:00:03]                 │       at /dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:128:5
[00:00:03]                 │       at Test.Request.callback (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:718:3)
[00:00:03]                 │       at /dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
[00:00:03]                 │       at IncomingMessage.<anonymous> (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
[00:00:03]                 │       at endReadableNT (internal/streams/readable.js:1327:12)
[00:00:03]                 │       at processTicksAndRejections (internal/process/task_queues.js:80:21)
[00:00:03]                 │ 
[00:00:03]                 │ 

Stack Trace

Error: expected 200 "OK", got 400 "Bad Request"
    at Test._assertStatus (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:268:12)
    at Test._assertFunction (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:283:11)
    at Test.assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:173:18)
    at assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:131:12)
    at /dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:128:5
    at Test.Request.callback (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:718:3)
    at /dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
    at IncomingMessage.<anonymous> (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

X-Pack Detection Engine API Integration Tests.x-pack/test/detection_engine_api_integration/security_and_spaces/tests/add_actions·ts.detection engine api security and spaces enabled add_actions adding actions should be able to create a new webhook action and attach it to a rule

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:00:00]         └-: detection engine api security and spaces enabled
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: add_actions
[00:00:00]             └-> "before all" hook
[00:00:00]             └-: adding actions
[00:00:00]               └-> "before all" hook
[00:00:00]               └-> should be able to create a new webhook action and attach it to a rule
[00:00:00]                 └-> "before each" hook: global before each
[00:00:00]                 └-> "before each" hook
[00:00:00]                   │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] adding index lifecycle policy [.siem-signals-default-migration-cleanup]
[00:00:00]                   │ info [o.e.x.i.a.TransportPutLifecycleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] adding index lifecycle policy [.siem-signals-default]
[00:00:00]                   │ info [o.e.c.m.MetadataIndexTemplateService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] adding template [.siem-signals-default] for index patterns [.siem-signals-default-*]
[00:00:00]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] [.siem-signals-default-000001] creating index, cause [api], templates [.siem-signals-default], shards [1]/[1]
[00:00:00]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.siem-signals-default-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [.siem-signals-default]
[00:00:00]                   │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.siem-signals-default-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [.siem-signals-default]
[00:00:00]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.siem-signals-default-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [.siem-signals-default]
[00:00:00]                 │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] [.kibana_1/damEmmzwTEypXgn6SPuP5Q] update_mapping [_doc]
[00:00:02]                 │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] [.ds-ilm-history-5-2021.02.01-000001] creating index, cause [initialize_data_stream], templates [ilm-history], shards [1]/[0]
[00:00:02]                 │ info [o.e.c.m.MetadataCreateDataStreamService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] adding data stream [ilm-history-5] with write index [.ds-ilm-history-5-2021.02.01-000001] and backing indices []
[00:00:02]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.ds-ilm-history-5-2021.02.01-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ilm-history-ilm-policy]
[00:00:02]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.ds-ilm-history-5-2021.02.01-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] in policy [ilm-history-ilm-policy]
[00:00:02]                 │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] moving index [.ds-ilm-history-5-2021.02.01-000001] from [{"phase":"hot","action":"unfollow","name":"wait-for-indexing-complete"}] to [{"phase":"hot","action":"unfollow","name":"wait-for-follow-shard-tasks"}] in policy [ilm-history-ilm-policy]
[00:00:03]                 └- ✖ fail: detection engine api security and spaces enabled add_actions adding actions should be able to create a new webhook action and attach it to a rule
[00:00:03]                 │      Error: expected 200 "OK", got 400 "Bad Request"
[00:00:03]                 │       at Test._assertStatus (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:268:12)
[00:00:03]                 │       at Test._assertFunction (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:283:11)
[00:00:03]                 │       at Test.assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:173:18)
[00:00:03]                 │       at assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:131:12)
[00:00:03]                 │       at /dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:128:5
[00:00:03]                 │       at Test.Request.callback (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:718:3)
[00:00:03]                 │       at /dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
[00:00:03]                 │       at IncomingMessage.<anonymous> (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
[00:00:03]                 │       at endReadableNT (internal/streams/readable.js:1327:12)
[00:00:03]                 │       at processTicksAndRejections (internal/process/task_queues.js:80:21)
[00:00:03]                 │ 
[00:00:03]                 │ 

Stack Trace

Error: expected 200 "OK", got 400 "Bad Request"
    at Test._assertStatus (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:268:12)
    at Test._assertFunction (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:283:11)
    at Test.assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:173:18)
    at assert (/dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:131:12)
    at /dev/shm/workspace/kibana/node_modules/supertest/lib/test.js:128:5
    at Test.Request.callback (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:718:3)
    at /dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/index.js:906:18
    at IncomingMessage.<anonymous> (/dev/shm/workspace/kibana/node_modules/supertest/node_modules/superagent/lib/node/parsers/json.js:19:7)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/api_keys/home_page·ts.API Keys app Home page Loads the app

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has not failed recently on tracked branches

[00:00:00]       │
[00:30:33]         └-: API Keys app
[00:30:33]           └-> "before all" hook
[00:30:33]           └-: Home page
[00:30:33]             └-> "before all" hook
[00:30:33]             └-> "before all" hook
[00:30:33]               │ debg set roles = kibana_admin
[00:30:33]               │ debg creating user test_user
[00:30:33]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] updated user [test_user]
[00:30:33]               │ debg created user test_user
[00:30:33]               │ debg TestSubjects.exists(kibanaChrome)
[00:30:33]               │ debg Find.existsByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=2500
[00:30:33]               │ debg TestSubjects.find(kibanaChrome)
[00:30:33]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=100000
[00:30:33]               │ debg browser[INFO] http://localhost:61191/app/logs/stream?sourceId=default&logPosition=(end:%272021-02-01T10:36:04.690Z%27,position:(tiebreaker:0,time:1612172164690),start:%272021-02-01T08:36:04.690Z%27,streamLive:!f)&logFilter=(expression:%27trace.id:433b4651687e18be2c6c8e3b11f53d09%27,kind:kuery) 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:30:33]               │
[00:30:33]               │ debg browser[INFO] http://localhost:61191/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:30:34]               │ debg navigating to apiKeys url: http://localhost:61191/app/management/security/api_keys
[00:30:34]               │ debg navigate to: http://localhost:61191/app/management/security/api_keys
[00:30:35]               │ proc [kibana]  error  [10:06:40.728]  Error: Internal Server Error
[00:30:35]               │ proc [kibana]     at HapiResponseAdapter.toError (/dev/shm/workspace/kibana-build-xpack-19/src/core/server/http/router/response_adapter.js:132:19)
[00:30:35]               │ proc [kibana]     at HapiResponseAdapter.toHapiResponse (/dev/shm/workspace/kibana-build-xpack-19/src/core/server/http/router/response_adapter.js:86:19)
[00:30:35]               │ proc [kibana]     at HapiResponseAdapter.handle (/dev/shm/workspace/kibana-build-xpack-19/src/core/server/http/router/response_adapter.js:81:17)
[00:30:35]               │ proc [kibana]     at Router.handle (/dev/shm/workspace/kibana-build-xpack-19/src/core/server/http/router/router.js:164:34)
[00:30:35]               │ proc [kibana]     at runMicrotasks (<anonymous>)
[00:30:35]               │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:30:35]               │ proc [kibana]     at handler (/dev/shm/workspace/kibana-build-xpack-19/src/core/server/http/router/router.js:124:50)
[00:30:35]               │ proc [kibana]     at exports.Manager.execute (/dev/shm/workspace/kibana-build-xpack-19/node_modules/@hapi/hapi/lib/toolkit.js:60:28)
[00:30:35]               │ proc [kibana]     at Object.internals.handler (/dev/shm/workspace/kibana-build-xpack-19/node_modules/@hapi/hapi/lib/handler.js:46:20)
[00:30:35]               │ proc [kibana]     at exports.execute (/dev/shm/workspace/kibana-build-xpack-19/node_modules/@hapi/hapi/lib/handler.js:31:20)
[00:30:35]               │ proc [kibana]     at Request._lifecycle (/dev/shm/workspace/kibana-build-xpack-19/node_modules/@hapi/hapi/lib/request.js:370:32)
[00:30:35]               │ proc [kibana]     at Request._execute (/dev/shm/workspace/kibana-build-xpack-19/node_modules/@hapi/hapi/lib/request.js:279:9)
[00:30:35]               │ERROR browser[SEVERE] http://localhost:61191/api/log_entries/entries - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
[00:30:35]               │ERROR browser[SEVERE] http://localhost:61191/api/infra/log_source_configurations/default/status - Failed to load resource: the server responded with a status of 403 (Forbidden)
[00:30:35]               │ debg browser[INFO] http://localhost:61191/app/management/security/api_keys?_t=1612174000648 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:30:35]               │
[00:30:35]               │ debg browser[INFO] http://localhost:61191/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:30:35]               │ debg ... sleep(700) start
[00:30:35]               │ debg ... sleep(700) end
[00:30:35]               │ debg returned from get, calling refresh
[00:30:36]               │ERROR browser[SEVERE] http://localhost:61191/39215/bundles/core/core.entry.js 12:194770 TypeError: Failed to fetch
[00:30:36]               │          at _callee3$ (http://localhost:61191/39215/bundles/core/core.entry.js:6:43987)
[00:30:36]               │          at l (http://localhost:61191/39215/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:968491)
[00:30:36]               │          at Generator._invoke (http://localhost:61191/39215/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:968244)
[00:30:36]               │          at Generator.forEach.e.<computed> [as throw] (http://localhost:61191/39215/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:321:968848)
[00:30:36]               │          at fetch_asyncGeneratorStep (http://localhost:61191/39215/bundles/core/core.entry.js:6:39045)
[00:30:36]               │          at _throw (http://localhost:61191/39215/bundles/core/core.entry.js:6:39453)
[00:30:36]               │ debg browser[INFO] http://localhost:61191/app/management/security/api_keys?_t=1612174000648 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:30:36]               │
[00:30:36]               │ debg browser[INFO] http://localhost:61191/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:30:36]               │ debg currentUrl = http://localhost:61191/app/management/security/api_keys
[00:30:36]               │          appUrl = http://localhost:61191/app/management/security/api_keys
[00:30:36]               │ debg TestSubjects.find(kibanaChrome)
[00:30:36]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:30:37]               │ debg ... sleep(501) start
[00:30:37]               │ debg ... sleep(501) end
[00:30:37]               │ debg in navigateTo url = http://localhost:61191/app/management/security/api_keys
[00:30:37]               │ debg TestSubjects.exists(statusPageContainer)
[00:30:37]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:30:40]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:30:40]             └-> Hides management link if user is not authorized
[00:30:40]               └-> "before each" hook: global before each
[00:30:40]               │ debg TestSubjects.missingOrFail(apiKeys)
[00:30:40]               │ debg Find.waitForDeletedByCssSelector('[data-test-subj="apiKeys"]') with timeout=2500
[00:30:41]               └- ✓ pass  (521ms) "API Keys app Home page Hides management link if user is not authorized"
[00:30:41]             └-> Loads the app
[00:30:41]               └-> "before each" hook: global before each
[00:30:41]               │ debg set roles = test_api_keys
[00:30:41]               │ debg creating user test_user
[00:30:41]               │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1612170025660142720] updated user [test_user]
[00:30:41]               │ debg created user test_user
[00:30:41]               │ debg TestSubjects.exists(kibanaChrome)
[00:30:41]               │ debg Find.existsByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=2500
[00:30:41]               │ debg TestSubjects.find(kibanaChrome)
[00:30:41]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=100000
[00:30:41]               │ debg browser[INFO] http://localhost:61191/app/management/security/api_keys?_t=1612174000648 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:30:41]               │
[00:30:41]               │ debg browser[INFO] http://localhost:61191/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:30:42]               │ debg Checking for section header
[00:30:42]               │ debg TestSubjects.findAll(noApiKeysHeader)
[00:30:42]               │ debg Find.allByCssSelector('[data-test-subj="noApiKeysHeader"]') with timeout=10000
[00:30:52]               │ debg TestSubjects.getVisibleText(apiKeyAdminDescriptionCallOut)
[00:30:52]               │ debg TestSubjects.find(apiKeyAdminDescriptionCallOut)
[00:30:52]               │ debg Find.findByCssSelector('[data-test-subj="apiKeyAdminDescriptionCallOut"]') with timeout=10000
[00:30:52]               │ERROR browser[SEVERE] http://localhost:61191/internal/security/api_key/privileges - Failed to load resource: the server responded with a status of 400 (Bad Request)
[00:31:02]               │ info Taking screenshot "/dev/shm/workspace/parallel/19/kibana/x-pack/test/functional/screenshots/failure/API Keys app Home page Loads the app.png"
[00:31:03]               │ info Current URL is: http://localhost:61191/app/management/security/api_keys
[00:31:03]               │ info Saving page source to: /dev/shm/workspace/parallel/19/kibana/x-pack/test/functional/failure_debug/html/API Keys app Home page Loads the app.html
[00:31:03]               └- ✖ fail: API Keys app Home page Loads the app
[00:31:03]               │      TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="apiKeyAdminDescriptionCallOut"])
[00:31:03]               │ Wait timed out after 10057ms
[00:31:03]               │       at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:31:03]               │       at runMicrotasks (<anonymous>)
[00:31:03]               │       at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:31:03]               │ 
[00:31:03]               │ 

Stack Trace

TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="apiKeyAdminDescriptionCallOut"])
Wait timed out after 10057ms
    at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  remoteStacktrace: ''
}

and 5 more failures, only showing the first 3.

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 462 463 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
lens 1.0MB 1.0MB +7.8KB

Distributable file count

id before after diff
default 47265 48025 +760

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens release_note:feature Makes this part of the condensed release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Single-value percentile metric
6 participants