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

Integrating EuiDataGrid into Discover #51531

Closed
wants to merge 32 commits into from

Conversation

myasonik
Copy link
Contributor

@myasonik myasonik commented Nov 22, 2019

Summary

Gets EuiDataGrid into Discover! 🎉

Resolves #737
Resolves #38982
Resolves #58204
Resolves #56529
Resolves #54345
Resolves #696
Resolves #8706

Part of #38646

TODO

🐲 There be dragons here still!

  • 💬 Should pagination state be saved as a query param? [Nope]
  • 💬 Should column sort have some sort of indication in the column header? [Will be handled by EUI]
  • 💬 Should area behind the flyout be interactive?
  • 🤔 EuiFlyout in table.tsx should probably be broken out into its own file
  • 🚫 Big issue that could use a better solution: Reactify field formatters #48728. (Currently worked around the same way as Fix missing html formatting in Doc_Viewer #49326 but it's dangerous long term.)
  • 😨 Write lots of new tests [Forced existing tests to use legacy table, when legacy table is fully replaced, can migrate these tests to use the new table]
  • Timeseries sort isn't shown in the beginning.
  • For non-timeseries data we sort on _score which isn't automatically added to the table. We either need to show that in the UI somehow or add _score to be automatically added and show the sort as normal. (Related Discover: Sort automatically by _score if it makes sense #54362) [Adding it to the UI is a nightmare. Instead, rolling with a simpler change of removing _score sort when a new sort is added.]

Pain points with EUI

Tracked in elastic/projects/323

To further investigate

  • Anyone else feel like this whole page is crawling

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@myasonik myasonik added WIP Work in progress Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Nov 22, 2019
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Member

@kertal kertal left a comment

Choose a reason for hiding this comment

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

🎉 great to see EuiDataGrid's debut here. First dragon 🐉 I've encountered, seems new fields are propagated from to the grid, but they are not selectable?
Bildschirmfoto 2019-11-25 um 12 59 38

@elasticmachine
Copy link
Contributor

💔 Build Failed

@mdefazio
Copy link
Contributor

mdefazio commented Dec 9, 2019

For the cell popover with the 2 filter options, here is a screenshot from this prototype:

image

I will work on the flyout portion in Figma to see about cleaning up some of it.

@AlonaNadler
Copy link

AlonaNadler commented Dec 17, 2019

@myasonik nice progress on the data grid
Few questions/comments :

  • the default view shows the timestamp and _source. However, the text is wrapped and not using the screen real estate in the most optimized way
    image

*The expanded view always to only shows the expanded view without the ability to use the main Discover screen. The existing discover allows users to open and interact with discover, expanding multiple documents at once. I understand it is difficult to replicate it, however, we should at least let users see the discover main view while looking at the expanded document. This view also can use less of the screen with a smaller width
image

  • Selecting a field didnt add it to the table - perhaps it is not ready yet
  • The need to hover on a field, select it, point the mouse to the little icon to filter a field too long/tedious : @snide filtering from a cell is very common, the need to get the mouse to the small icon is not ideal. Ideally, if I click on a cell it should open a pop up and allow filter.
    image

Happy tp play with it again whenever it makes sense, I know there is a lot of work thank you @myasonik

@elasticmachine
Copy link
Contributor

💔 Build Failed

History

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

@rayafratkina rayafratkina changed the title PoC of integrating EuiDataGrid into Discover Integrating EuiDataGrid into Discover Feb 28, 2020
@kertal
Copy link
Member

kertal commented Mar 12, 2020

@elasticmachine merge upstream

@elasticmachine
Copy link
Contributor

merge conflict between base and head

@kibanamachine
Copy link
Contributor

💔 Build Failed


Test Failures

Kibana Pipeline / kibana-oss-agent / Accessibility Tests.test/accessibility/apps/discover·ts.Discover main view

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: Discover
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:00]             │ info [discover] Loading "mappings.json"
[00:00:00]             │ info [discover] Loading "data.json.gz"
[00:00:00]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_1/OLGyT1pmTlCbkmbLmoIL1Q] deleting index
[00:00:00]             │ info [discover] Deleted existing index [".kibana_1"]
[00:00:00]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:00]             │ info [discover] Created index ".kibana"
[00:00:00]             │ debg [discover] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:00]             │ info [discover] Indexed 2 docs into ".kibana"
[00:00:00]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana/GdBDeUxAT92nIU2cYHFF9Q] update_mapping [_doc]
[00:00:00]             │ debg Migrating saved objects
[00:00:00]             │ proc [kibana]   log   [17:09:51.117] [info][savedobjects-service] Creating index .kibana_2.
[00:00:00]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] updating number_of_replicas to [0] for indices [.kibana_2]
[00:00:00]             │ proc [kibana]   log   [17:09:51.203] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:00:00]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] updating number_of_replicas to [0] for indices [.kibana_1]
[00:00:00]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1], mappings [_doc]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] updating number_of_replicas to [0] for indices [.tasks]
[00:00:00]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] 104 finished with response BulkByScrollResponse[took=95.2ms,timed_out=false,sliceId=null,updated=0,created=2,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:00]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana/GdBDeUxAT92nIU2cYHFF9Q] deleting index
[00:00:00]             │ proc [kibana]   log   [17:09:51.699] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:00:01]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/OmjCmJvPRP-l7QrTGyIeow] update_mapping [_doc]
[00:00:01]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/OmjCmJvPRP-l7QrTGyIeow] update_mapping [_doc]
[00:00:01]             │ proc [kibana]   log   [17:09:51.925] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:00:01]             │ proc [kibana]   log   [17:09:52.016] [info][savedobjects-service] Finished in 902ms.
[00:00:01]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:00:01]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/OmjCmJvPRP-l7QrTGyIeow] update_mapping [_doc]
[00:00:02]             │ info [logstash_functional] Loading "mappings.json"
[00:00:02]             │ info [logstash_functional] Loading "data.json.gz"
[00:00:02]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:02]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]]).
[00:00:02]             │ info [logstash_functional] Created index "logstash-2015.09.22"
[00:00:02]             │ debg [logstash_functional] "logstash-2015.09.22" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:02]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:02]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]]).
[00:00:02]             │ info [logstash_functional] Created index "logstash-2015.09.20"
[00:00:02]             │ debg [logstash_functional] "logstash-2015.09.20" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:02]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:02]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]]).
[00:00:02]             │ info [logstash_functional] Created index "logstash-2015.09.21"
[00:00:02]             │ debg [logstash_functional] "logstash-2015.09.21" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:12]             │ info progress: 10826
[00:00:14]             │ info [logstash_functional] Indexed 4633 docs into "logstash-2015.09.22"
[00:00:14]             │ info [logstash_functional] Indexed 4757 docs into "logstash-2015.09.20"
[00:00:14]             │ info [logstash_functional] Indexed 4614 docs into "logstash-2015.09.21"
[00:00:15]             │ debg applying update to kibana config: {"defaultIndex":"logstash-*","doc_table:legacyTable":true}
[00:00:15]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/OmjCmJvPRP-l7QrTGyIeow] update_mapping [_doc]
[00:00:15]             │ debg navigating to discover url: http://localhost:61131/app/kibana#/discover
[00:00:15]             │ debg Navigate to: http://localhost:61131/app/kibana#/discover
[00:00:15]             │ debg ... sleep(700) start
[00:00:15]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1584033006250#/discover 340 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:00:15]             │
[00:00:15]             │ debg browser[INFO] http://localhost:61131/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:16]             │ debg ... sleep(700) end
[00:00:16]             │ debg returned from get, calling refresh
[00:00:16]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1584033006250#/discover 340 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:00:16]             │
[00:00:16]             │ debg browser[INFO] http://localhost:61131/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:16]             │ debg currentUrl = http://localhost:61131/app/kibana#/discover
[00:00:16]             │          appUrl = http://localhost:61131/app/kibana#/discover
[00:00:16]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:18]             │ debg browser[INFO] http://localhost:61131/bundles/plugin/data/data.plugin.js 90:139970 "INFO: 2020-03-12T17:10:09Z
[00:00:18]             │        Adding connection to http://localhost:61131/elasticsearch
[00:00:18]             │
[00:00:18]             │      "
[00:00:19]             │ debg TestSubjects.find(kibanaChrome)
[00:00:19]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:00:19]             │ debg ... sleep(501) start
[00:00:20]             │ debg ... sleep(501) end
[00:00:20]             │ debg in navigateTo url = http://localhost:61131/app/kibana#/discover
[00:00:20]             │ debg TestSubjects.exists(statusPageContainer)
[00:00:20]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:22]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:23]             │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:00:23]             │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:00:23]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:00:23]             │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:00:23]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:00:23]             │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:00:23]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:00:23]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:00:23]             │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:00:23]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:00:23]             │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:00:23]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:00:23]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:00:23]             │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:00:23]             │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:00:23]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:23]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:23]             │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:23]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:23]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:23]             │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:00:23]             │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:23]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:23]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:24]             │ debg ... sleep(500) start
[00:00:25]             │ debg ... sleep(500) end
[00:00:25]             │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:00:25]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:00:25]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:00:25]             │ debg Find.waitForElementStale with timeout=10000
[00:00:25]             │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:00:25]             │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:00:25]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:25]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:00:25]             │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:25]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:25]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:25]             │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:00:25]             │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:00:25]             │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:25]             │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:00:26]             │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:00:26]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:00:28]             │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:00:29]             │ debg TestSubjects.click(querySubmitButton)
[00:00:29]             │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:00:29]             │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:00:29]             │ debg Find.waitForElementStale with timeout=10000
[00:00:29]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:00:29]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:00:31]           └-> main view
[00:00:31]             └-> "before each" hook: global before each
[00:00:42]             │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/Discover main view.png"
[00:00:42]             │ info Current URL is: http://localhost:61131/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:%272015-09-19T06:31:44.000Z%27,to:%272015-09-23T18:31:44.000Z%27))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:00:42]             │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/Discover main view.html
[00:00:42]             └- ✖ fail: "Discover main view"
[00:00:42]             │

Stack Trace

Error: a11y report:

VIOLATION
  [label]: Ensures every form element has a label
    Help: https://dequeuniversity.com/rules/axe/3.5/label?application=axeAPI
    Elements:
      - #dscResultsIntervalSelector
    at Accessibility.testAxeReport (test/accessibility/services/a11y/a11y.ts:85:15)
    at Accessibility.testAppSnapshot (test/accessibility/services/a11y/a11y.ts:58:18)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/context/_discover_navigation·js.context app context link in discover "before all" hook for "should open the context view with the selected document as anchor"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 6 times on tracked branches: https://github.com/elastic/kibana/issues/53198

[00:00:00]       │
[00:00:12]         └-: context app
[00:00:12]           └-> "before all" hook
[00:00:12]           └-> "before all" hook
[00:00:12]             │ info [logstash_functional] Loading "mappings.json"
[00:00:12]             │ info [logstash_functional] Loading "data.json.gz"
[00:00:12]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:12]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]]).
[00:00:12]             │ info [logstash_functional] Created index "logstash-2015.09.22"
[00:00:12]             │ debg [logstash_functional] "logstash-2015.09.22" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:12]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:12]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]]).
[00:00:12]             │ info [logstash_functional] Created index "logstash-2015.09.20"
[00:00:12]             │ debg [logstash_functional] "logstash-2015.09.20" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:12]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:12]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]]).
[00:00:13]             │ info [logstash_functional] Created index "logstash-2015.09.21"
[00:00:13]             │ debg [logstash_functional] "logstash-2015.09.21" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:22]             │ info progress: 11383
[00:00:24]             │ info [logstash_functional] Indexed 4633 docs into "logstash-2015.09.22"
[00:00:24]             │ info [logstash_functional] Indexed 4757 docs into "logstash-2015.09.20"
[00:00:24]             │ info [logstash_functional] Indexed 4614 docs into "logstash-2015.09.21"
[00:00:25]             │ info [visualize] Loading "mappings.json"
[00:00:25]             │ info [visualize] Loading "data.json"
[00:00:25]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_1/uZ3tcxGGTqa09nCersHpqA] deleting index
[00:00:25]             │ info [visualize] Deleted existing index [".kibana_1"]
[00:00:25]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:25]             │ info [visualize] Created index ".kibana"
[00:00:25]             │ debg [visualize] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana/KND-zj9JTiWmud_mzVB0tA] update_mapping [_doc]
[00:00:25]             │ info [visualize] Indexed 7 docs into ".kibana"
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana/KND-zj9JTiWmud_mzVB0tA] update_mapping [_doc]
[00:00:25]             │ debg Migrating saved objects
[00:00:25]             │ proc [kibana]   log   [17:08:14.145] [info][savedobjects-service] Creating index .kibana_2.
[00:00:25]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:25]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] updating number_of_replicas to [0] for indices [.kibana_2]
[00:00:25]             │ proc [kibana]   log   [17:08:14.226] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:00:25]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:25]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] updating number_of_replicas to [0] for indices [.kibana_1]
[00:00:25]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1], mappings [_doc]
[00:00:25]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] updating number_of_replicas to [0] for indices [.tasks]
[00:00:25]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] 867 finished with response BulkByScrollResponse[took=80.2ms,timed_out=false,sliceId=null,updated=0,created=7,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:25]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana/KND-zj9JTiWmud_mzVB0tA] deleting index
[00:00:25]             │ proc [kibana]   log   [17:08:14.646] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/Cb6EHLKsRXSUfilUMEAPsQ] update_mapping [_doc]
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/Cb6EHLKsRXSUfilUMEAPsQ] update_mapping [_doc]
[00:00:26]             │ proc [kibana]   log   [17:08:14.761] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:00:26]             │ proc [kibana]   log   [17:08:14.816] [info][savedobjects-service] Finished in 673ms.
[00:00:26]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:00:26]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/Cb6EHLKsRXSUfilUMEAPsQ] update_mapping [_doc]
[00:00:27]             │ debg replacing kibana config doc: {"defaultIndex":"logstash-*"}
[00:00:27]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/Cb6EHLKsRXSUfilUMEAPsQ] update_mapping [_doc]
[00:00:28]             │ debg navigating to discover url: http://localhost:6111/app/kibana#/discover
[00:00:28]             │ debg Navigate to: http://localhost:6111/app/kibana#/discover
[00:00:28]             │ debg ... sleep(700) start
[00:00:28]             │ debg browser[INFO] http://localhost:6111/app/kibana?_t=1584032897265#/discover 340 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:00:28]             │
[00:00:28]             │ debg browser[INFO] http://localhost:6111/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:29]             │ debg ... sleep(700) end
[00:00:29]             │ debg returned from get, calling refresh
[00:00:29]             │ debg browser[INFO] http://localhost:6111/app/kibana?_t=1584032897265#/discover 340 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:00:29]             │
[00:00:29]             │ debg browser[INFO] http://localhost:6111/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:29]             │ debg currentUrl = http://localhost:6111/app/kibana#/discover
[00:00:29]             │          appUrl = http://localhost:6111/app/kibana#/discover
[00:00:29]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:31]             │ debg TestSubjects.find(kibanaChrome)
[00:00:31]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:00:31]             │ debg browser[INFO] http://localhost:6111/bundles/plugin/data/data.plugin.js 90:139970 "INFO: 2020-03-12T17:08:19Z
[00:00:31]             │        Adding connection to http://localhost:6111/elasticsearch
[00:00:31]             │
[00:00:31]             │      "
[00:00:31]             │ debg ... sleep(501) start
[00:00:31]             │ debg ... sleep(501) end
[00:00:31]             │ debg in navigateTo url = http://localhost:6111/app/kibana#/discover
[00:00:31]             │ debg TestSubjects.exists(statusPageContainer)
[00:00:31]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:34]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:34]           └-: context link in discover
[00:00:34]             └-> "before all" hook
[00:00:34]             └-> "before all" hook
[00:00:34]               │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/context app context link in discover _before all_ hook.png"
[00:00:35]               │ info Current URL is: http://localhost:6111/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:00:35]               │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/context app context link in discover _before all_ hook.html
[00:00:35]               └- ✖ fail: "context app context link in discover "before all" hook for "should open the context view with the selected document as anchor""
[00:00:35]               │

Stack Trace

TypeError: PageObjects.settings.setLegacyDiscoverTable is not a function
    at Context.apply (test/functional/apps/context/_discover_navigation.js:37:34)
    at Object.apply (packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:30)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/context/_discover_navigation·js.context app context link in discover "before all" hook for "should open the context view with the selected document as anchor"

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 6 times on tracked branches: https://github.com/elastic/kibana/issues/53198

[00:00:00]       │
[00:00:12]         └-: context app
[00:00:12]           └-> "before all" hook
[00:00:12]           └-> "before all" hook
[00:00:12]             │ info [logstash_functional] Loading "mappings.json"
[00:00:12]             │ info [logstash_functional] Loading "data.json.gz"
[00:00:12]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:12]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]]).
[00:00:12]             │ info [logstash_functional] Created index "logstash-2015.09.22"
[00:00:12]             │ debg [logstash_functional] "logstash-2015.09.22" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:12]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:12]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]]).
[00:00:12]             │ info [logstash_functional] Created index "logstash-2015.09.20"
[00:00:12]             │ debg [logstash_functional] "logstash-2015.09.20" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:12]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:00:12]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]]).
[00:00:12]             │ info [logstash_functional] Created index "logstash-2015.09.21"
[00:00:12]             │ debg [logstash_functional] "logstash-2015.09.21" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:22]             │ info progress: 11435
[00:00:23]             │ info [logstash_functional] Indexed 4633 docs into "logstash-2015.09.22"
[00:00:23]             │ info [logstash_functional] Indexed 4757 docs into "logstash-2015.09.20"
[00:00:23]             │ info [logstash_functional] Indexed 4614 docs into "logstash-2015.09.21"
[00:00:24]             │ info [visualize] Loading "mappings.json"
[00:00:24]             │ info [visualize] Loading "data.json"
[00:00:24]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_1/0IiBzcWGTuaNsAjQtPeoBQ] deleting index
[00:00:24]             │ info [visualize] Deleted existing index [".kibana_1"]
[00:00:24]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:24]             │ info [visualize] Created index ".kibana"
[00:00:24]             │ debg [visualize] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:24]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana/HikTqzGdRa60UZv-3gMl2Q] update_mapping [_doc]
[00:00:24]             │ info [visualize] Indexed 7 docs into ".kibana"
[00:00:24]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana/HikTqzGdRa60UZv-3gMl2Q] update_mapping [_doc]
[00:00:24]             │ debg Migrating saved objects
[00:00:24]             │ proc [kibana]   log   [17:06:09.926] [info][savedobjects-service] Creating index .kibana_2.
[00:00:24]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:24]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] updating number_of_replicas to [0] for indices [.kibana_2]
[00:00:24]             │ proc [kibana]   log   [17:06:09.999] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:00:24]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:24]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] updating number_of_replicas to [0] for indices [.kibana_1]
[00:00:25]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1], mappings [_doc]
[00:00:25]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] updating number_of_replicas to [0] for indices [.tasks]
[00:00:25]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] 867 finished with response BulkByScrollResponse[took=75.8ms,timed_out=false,sliceId=null,updated=0,created=7,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:25]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana/HikTqzGdRa60UZv-3gMl2Q] deleting index
[00:00:25]             │ proc [kibana]   log   [17:06:10.410] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/P-rxRc0KTP-Jj0UQrUbu1Q] update_mapping [_doc]
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/P-rxRc0KTP-Jj0UQrUbu1Q] update_mapping [_doc]
[00:00:25]             │ proc [kibana]   log   [17:06:10.527] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:00:25]             │ proc [kibana]   log   [17:06:10.578] [info][savedobjects-service] Finished in 654ms.
[00:00:25]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:00:25]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/P-rxRc0KTP-Jj0UQrUbu1Q] update_mapping [_doc]
[00:00:26]             │ debg replacing kibana config doc: {"defaultIndex":"logstash-*"}
[00:00:26]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1584031704817968419] [.kibana_2/P-rxRc0KTP-Jj0UQrUbu1Q] update_mapping [_doc]
[00:00:27]             │ debg navigating to discover url: http://localhost:6111/app/kibana#/discover
[00:00:27]             │ debg Navigate to: http://localhost:6111/app/kibana#/discover
[00:00:28]             │ debg ... sleep(700) start
[00:00:28]             │ debg browser[INFO] http://localhost:6111/app/kibana?_t=1584032773026#/discover 340 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:00:28]             │
[00:00:28]             │ debg browser[INFO] http://localhost:6111/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:28]             │ debg ... sleep(700) end
[00:00:28]             │ debg returned from get, calling refresh
[00:00:28]             │ debg browser[INFO] http://localhost:6111/app/kibana?_t=1584032773026#/discover 340 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:00:28]             │
[00:00:28]             │ debg browser[INFO] http://localhost:6111/bundles/app/kibana/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:29]             │ debg currentUrl = http://localhost:6111/app/kibana#/discover
[00:00:29]             │          appUrl = http://localhost:6111/app/kibana#/discover
[00:00:29]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:30]             │ debg TestSubjects.find(kibanaChrome)
[00:00:30]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:00:30]             │ debg browser[INFO] http://localhost:6111/bundles/plugin/data/data.plugin.js 90:139970 "INFO: 2020-03-12T17:06:15Z
[00:00:30]             │        Adding connection to http://localhost:6111/elasticsearch
[00:00:30]             │
[00:00:30]             │      "
[00:00:30]             │ debg ... sleep(501) start
[00:00:31]             │ debg ... sleep(501) end
[00:00:31]             │ debg in navigateTo url = http://localhost:6111/app/kibana#/discover
[00:00:31]             │ debg TestSubjects.exists(statusPageContainer)
[00:00:31]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:34]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:34]           └-: context link in discover
[00:00:34]             └-> "before all" hook
[00:00:34]             └-> "before all" hook
[00:00:34]               │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/context app context link in discover _before all_ hook.png"
[00:00:34]               │ info Current URL is: http://localhost:6111/app/kibana#/discover?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:00:34]               │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/context app context link in discover _before all_ hook.html
[00:00:34]               └- ✖ fail: "context app context link in discover "before all" hook for "should open the context view with the selected document as anchor""
[00:00:34]               │

Stack Trace

TypeError: PageObjects.settings.setLegacyDiscoverTable is not a function
    at Context.apply (test/functional/apps/context/_discover_navigation.js:37:34)
    at Object.apply (packages/kbn-test/src/functional_test_runner/lib/mocha/wrap_function.js:84:30)
    at process._tickCallback (internal/process/next_tick.js:68:7)

and 5 more failures, only showing the first 3.

History

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

} else {
setVisibleColumns(dataGridColumns.map(obj => obj.id));
}
}, [dataGridColumns.length]); // eslint-disable-line react-hooks/exhaustive-deps
Copy link
Member

Choose a reason for hiding this comment

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

So, when adding the first column, there is no change in length of columns, it switches between ['_source'] and ['myLovelyFirstColumn'], so the visible columns aren't set. The following code should fix this (using isEqual of lodash)

 useEffect(() => {
    // every time a column is added, make it visible
    if (!mounted.current) {
      mounted.current = true;
    } else {
      const newColumns = dataGridColumns.map(obj => obj.id);
      if (!isEqual(newColumns, visibleColumns)) {
        setVisibleColumns(newColumns);
      }
    }
  }, [dataGridColumns, visibleColumns]);

@kertal
Copy link
Member

kertal commented Jul 22, 2020

classing in favor of #67259

@kertal kertal closed this Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application Team:Visualizations Visualization editors, elastic-charts and infrastructure WIP Work in progress
Projects
None yet
8 participants