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

[Console] Get ES Config from core #75406

Merged

Conversation

jloleysens
Copy link
Contributor

Summary

Refactor console to use platform provided ES config and to fetch ES host config from Kibana server.

This change should be fairly safe because the configuration object is the same (we just get it from a different place), but we should test manually that we can connect to Kibana with SSL configuration to be safe.

Fix #68497

Checklist

- removed console_legacy plugin!
- added new es_config endpoint that returns server side es config
  at the moment this is just the first value in hosts
- Slight refactor to how routes are registered to bring them more
  in line with other ES UI plugins
- Updated the client to not get es host from injected metadata.
  Instead use the new endpoint created server side that returns
  this value
- Added a small README.md regarding the hooks lib and need to
  refactor use of jQuery in console
- Write code to init the es host value on the client once at start
  up in a non-blocking way. If this fails we just use the default
  value of http://localhost:9200 as this powers non-essential
  console functionality (i.e., copy as cURL).
@jloleysens jloleysens added Feature:Console Dev Tools Console Feature v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Aug 19, 2020
@jloleysens jloleysens marked this pull request as ready for review August 20, 2020 12:29
@jloleysens jloleysens requested a review from a team as a code owner August 20, 2020 12:29
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@jloleysens jloleysens changed the title [WIP][Console] Get ES Config from core [Console] Get ES Config from core Aug 20, 2020
@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Tested locally both with and without SSL, code LGTM. Nice work, JL!

services,
router,
proxy:
defaultProxyValue !== proxy
Copy link
Contributor

Choose a reason for hiding this comment

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

Had to do some mental gymnastics to work this logic out! I wonder if it might be easier to grok if we left out the default assignment:

export const getProxyRouteHandlerDeps = ({
  proxyOverrides, // Renaming this might also make its role clearer
  /* snip */
}) => {
  /* snip */
  const proxy = proxyOverrides ? {
    ...defaultProxyValue,
    ...proxyOverrides,
  } : defaultProxyValue;

  return {
    services,
    router,
    proxy,
  };
};
}

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Chrome UI Functional Tests.test/functional/apps/visualize/_vega_chart·ts.visualize app vega chart in visualize app vega chart with filters should render different data in response to filter change

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: visualize app
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:00:00]             │ debg Starting visualize before method
[00:00:00]             │ info [logstash_functional] Loading "mappings.json"
[00:00:00]             │ info [logstash_functional] Loading "data.json.gz"
[00:00:01]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0]
[00:00:01]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]])." previous.health="YELLOW" reason="shards started [[logstash-2015.09.22][0]]"
[00:00:01]             │ info [logstash_functional] Created index "logstash-2015.09.22"
[00:00:01]             │ 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:01]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0]
[00:00:01]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]])." previous.health="YELLOW" reason="shards started [[logstash-2015.09.20][0]]"
[00:00:01]             │ info [logstash_functional] Created index "logstash-2015.09.20"
[00:00:01]             │ 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:01]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0]
[00:00:01]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]])." previous.health="YELLOW" reason="shards started [[logstash-2015.09.21][0]]"
[00:00:01]             │ info [logstash_functional] Created index "logstash-2015.09.21"
[00:00:01]             │ 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:10]             │ info progress: 3308
[00:00:20]             │ info progress: 11383
[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:23]             │ info [long_window_logstash] Loading "mappings.json"
[00:00:23]             │ info [long_window_logstash] Loading "data.json.gz"
[00:00:23]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [long-window-logstash-0] creating index, cause [api], templates [], shards [1]/[0]
[00:00:24]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[long-window-logstash-0][0]]])." previous.health="YELLOW" reason="shards started [[long-window-logstash-0][0]]"
[00:00:24]             │ info [long_window_logstash] Created index "long-window-logstash-0"
[00:00:24]             │ debg [long_window_logstash] "long-window-logstash-0" settings {"index":{"analysis":{"analyzer":{"makelogs_url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:00:33]             │ info progress: 9030
[00:00:39]             │ info [long_window_logstash] Indexed 14005 docs into "long-window-logstash-0"
[00:00:39]             │ info [visualize] Loading "mappings.json"
[00:00:39]             │ info [visualize] Loading "data.json"
[00:00:39]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana_1/hVyVfApURged6hQB_Wnv7w] deleting index
[00:00:39]             │ info [visualize] Deleted existing index [".kibana_1"]
[00:00:39]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:00:39]             │ info [visualize] Created index ".kibana"
[00:00:39]             │ debg [visualize] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:39]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana/cc-ENg-9QwChjf0FSLGI7Q] update_mapping [_doc]
[00:00:39]             │ info [visualize] Indexed 12 docs into ".kibana"
[00:00:40]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana/cc-ENg-9QwChjf0FSLGI7Q] update_mapping [_doc]
[00:00:40]             │ debg Migrating saved objects
[00:00:40]             │ proc [kibana]   log   [08:35:34.740] [info][savedobjects-service] Creating index .kibana_2.
[00:00:40]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:00:40]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] updating number_of_replicas to [0] for indices [.kibana_2]
[00:00:40]             │ proc [kibana]   log   [08:35:34.847] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:00:40]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:00:40]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] updating number_of_replicas to [0] for indices [.kibana_1]
[00:00:40]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1]
[00:00:40]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] updating number_of_replicas to [0] for indices [.tasks]
[00:00:40]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] 1553 finished with response BulkByScrollResponse[took=111.4ms,timed_out=false,sliceId=null,updated=0,created=12,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:00:40]             │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana/cc-ENg-9QwChjf0FSLGI7Q] deleting index
[00:00:40]             │ proc [kibana]   log   [08:35:35.317] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:00:40]             │ proc [kibana]   log   [08:35:35.356] [error][savedobjects-service] Error: Unable to migrate the corrupt Saved Object document index-pattern:test_index*. To prevent Kibana from performing a migration on every restart, please delete or fix this document by ensuring that the namespace and type in the document's id matches the values in the namespace and type fields.
[00:00:40]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana_2/JoBW0Wo1RXCOg1YfWY8Drw] update_mapping [_doc]
[00:00:40]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana_2/JoBW0Wo1RXCOg1YfWY8Drw] update_mapping [_doc]
[00:00:40]             │ proc [kibana]   log   [08:35:35.496] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:00:40]             │ proc [kibana]   log   [08:35:35.591] [info][savedobjects-service] Finished in 853ms.
[00:00:40]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:00:41]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-debian-tests-xxl-1597997853547476987] [.kibana_2/JoBW0Wo1RXCOg1YfWY8Drw] update_mapping [_doc]
[00:00:42]             │ debg replacing kibana config doc: {"defaultIndex":"logstash-*","format:bytes:defaultPattern":"0,0.[000]b"}
[00:00:43]           └-: 
[00:00:43]             └-> "before all" hook
[00:22:50]             └-: vega chart in visualize app
[00:22:50]               └-> "before all" hook
[00:22:50]               └-> "before all" hook
[00:22:50]                 │ debg navigateToApp visualize
[00:22:50]                 │ debg navigating to visualize url: http://localhost:61201/app/visualize#/
[00:22:50]                 │ debg navigate to: http://localhost:61201/app/visualize#/
[00:22:50]                 │ debg browser[INFO] http://localhost:61201/app/visualize?_t=1598000265052#/ 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:22:50]                 │
[00:22:50]                 │ debg browser[INFO] http://localhost:61201/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:22:50]                 │ debg ... sleep(700) start
[00:22:51]                 │ debg ... sleep(700) end
[00:22:51]                 │ debg returned from get, calling refresh
[00:22:51]                 │ debg browser[INFO] http://localhost:61201/app/visualize?_t=1598000265052#/ 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:22:51]                 │
[00:22:51]                 │ debg browser[INFO] http://localhost:61201/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:22:51]                 │ debg currentUrl = http://localhost:61201/app/visualize#/
[00:22:51]                 │          appUrl = http://localhost:61201/app/visualize#/
[00:22:51]                 │ debg TestSubjects.find(kibanaChrome)
[00:22:51]                 │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:22:52]                 │ debg browser[INFO] http://localhost:61201/35735/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-08-21T08:57:46Z
[00:22:52]                 │        Adding connection to http://localhost:61201/elasticsearch
[00:22:52]                 │
[00:22:52]                 │      "
[00:22:52]                 │ debg ... sleep(501) start
[00:22:53]                 │ debg ... sleep(501) end
[00:22:53]                 │ debg in navigateTo url = http://localhost:61201/app/visualize#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:22:53]                 │ debg --- retry.try error: URL changed, waiting for it to settle
[00:22:53]                 │ debg ... sleep(501) start
[00:22:54]                 │ debg ... sleep(501) end
[00:22:54]                 │ debg in navigateTo url = http://localhost:61201/app/visualize#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:22:54]                 │ debg TestSubjects.exists(statusPageContainer)
[00:22:54]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:22:56]                 │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:22:57]                 │ debg TestSubjects.exists(newItemButton)
[00:22:57]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:22:57]                 │ debg TestSubjects.click(newItemButton)
[00:22:57]                 │ debg Find.clickByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:22:57]                 │ debg Find.findByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:22:57]                 │ debg TestSubjects.find(visNewDialogTypes)
[00:22:57]                 │ debg Find.findByCssSelector('[data-test-subj="visNewDialogTypes"]') with timeout=10000
[00:22:57]                 │ debg clickVega
[00:22:57]                 │ debg TestSubjects.click(visType-vega)
[00:22:57]                 │ debg Find.clickByCssSelector('[data-test-subj="visType-vega"]') with timeout=10000
[00:22:57]                 │ debg Find.findByCssSelector('[data-test-subj="visType-vega"]') with timeout=10000
[00:22:57]                 │ debg isGlobalLoadingIndicatorVisible
[00:22:57]                 │ debg TestSubjects.exists(globalLoadingIndicator)
[00:22:57]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:22:57]                 │ debg browser[INFO] http://localhost:61201/app/visualize#/create?type=vega 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:22:57]                 │
[00:22:57]                 │ debg browser[INFO] http://localhost:61201/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:22:58]                 │ debg browser[INFO] http://localhost:61201/35735/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-08-21T08:57:53Z
[00:22:58]                 │        Adding connection to http://localhost:61201/elasticsearch
[00:22:58]                 │
[00:22:58]                 │      "
[00:22:59]                 │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:22:59]                 │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:22:59]                 │ debg Waiting up to 20000ms for rendering count to stabilize...
[00:22:59]                 │ debg TestSubjects.find(visualizationLoader)
[00:22:59]                 │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:22:59]                 │ proc [kibana]   log   [08:57:53.968] [info][data][data][plugins] Get strategy es
[00:22:59]                 │ proc [kibana]   log   [08:57:53.969] [info][data][data][plugins] search _all
[00:22:59]                 │ debg -- firstCount=0
[00:22:59]                 │ debg ... sleep(2000) start
[00:22:59]                 │ debg browser[INFO] http://localhost:61201/35735/bundles/plugin/visTypeVega/visTypeVega.chunk.1.js 0:16084 "%cWelcome to Kibana Vega Plugin!" "font-size: 16px; font-weight: bold;"
[00:22:59]                 │ debg browser[INFO] http://localhost:61201/35735/bundles/plugin/visTypeVega/visTypeVega.chunk.1.js 0:16170 "You can access the Vega view with VEGA_DEBUG. Learn more at https://vega.github.io/vega/docs/api/debugging/."
[00:23:01]                 │ debg ... sleep(2000) end
[00:23:01]                 │ debg TestSubjects.find(visualizationLoader)
[00:23:01]                 │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:23:01]                 │ debg -- secondCount=1
[00:23:01]                 │ debg TestSubjects.find(visualizationLoader)
[00:23:01]                 │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:23:01]                 │ debg -- firstCount=1
[00:23:01]                 │ debg ... sleep(2000) start
[00:23:03]                 │ debg ... sleep(2000) end
[00:23:03]                 │ debg TestSubjects.find(visualizationLoader)
[00:23:03]                 │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:23:03]                 │ debg -- secondCount=1
[00:23:03]               └-: vega chart
[00:23:03]                 └-> "before all" hook
[00:23:06]                 └-: with filters
[00:23:06]                   └-> "before all" hook
[00:23:06]                   └-> "before all" hook
[00:23:06]                     │ debg setAbsoluteRange
[00:23:06]                     │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:23:06]                     │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:23:06]                     │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:23:06]                     │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:23:06]                     │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:23:06]                     │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:23:06]                     │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:23:06]                     │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:23:06]                     │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:23:06]                     │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:23:06]                     │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:23:06]                     │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:23:06]                     │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:23:06]                     │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:23:06]                     │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:23:06]                     │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:23:06]                     │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:23:07]                     │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:23:07]                     │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:23:07]                     │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:23:07]                     │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:23:07]                     │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:23:07]                     │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:23:07]                     │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:23:07]                     │ debg ... sleep(500) start
[00:23:08]                     │ debg ... sleep(500) end
[00:23:08]                     │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:23:08]                     │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:23:08]                     │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:23:08]                     │ debg Find.waitForElementStale with timeout=10000
[00:23:08]                     │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:23:08]                     │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:23:08]                     │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:23:08]                     │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:23:08]                     │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:23:08]                     │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:23:08]                     │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:23:08]                     │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:23:08]                     │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:23:08]                     │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:23:08]                     │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:23:09]                     │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:23:09]                     │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:23:11]                     │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:23:12]                     │ debg TestSubjects.click(querySubmitButton)
[00:23:12]                     │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:23:12]                     │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:23:12]                     │ proc [kibana]   log   [08:58:07.126] [info][data][data][plugins] Get strategy es
[00:23:12]                     │ proc [kibana]   log   [08:58:07.126] [info][data][data][plugins] search _all
[00:23:12]                     │ debg Find.waitForElementStale with timeout=10000
[00:23:12]                     │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:23:12]                     │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:23:12]                   └-> should render different data in response to filter change
[00:23:12]                     └-> "before each" hook: global before each
[00:23:12]                     │ debg TestSubjects.find(vega-editor)
[00:23:12]                     │ debg Find.findByCssSelector('[data-test-subj="vega-editor"]') with timeout=10000
[00:23:13]                     │ debg TestSubjects.find(visualizationLoader)
[00:23:13]                     │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:23:13]                     │ debg Before Rendering count 2
[00:23:13]                     │ debg TestSubjects.clickWhenNotDisabled(visualizeEditorRenderButton)
[00:23:13]                     │ debg Find.clickByCssSelectorWhenNotDisabled('[data-test-subj="visualizeEditorRenderButton"]') with timeout=10000
[00:23:13]                     │ debg Find.findByCssSelector('[data-test-subj="visualizeEditorRenderButton"]') with timeout=10000
[00:23:13]                     │ debg Waiting up to 20000ms for rendering count to be greater than or equal to [3]...
[00:23:13]                     │ debg TestSubjects.find(visualizationLoader)
[00:23:13]                     │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:23:13]                     │ debg -- currentRenderingCount=2
[00:23:14]                     │ debg TestSubjects.find(visualizationLoader)
[00:23:14]                     │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:23:14]                     │ debg -- currentRenderingCount=3
[00:23:14]                     │ debg Waiting up to 20000ms for rendering count to stabilize...
[00:23:14]                     │ debg TestSubjects.find(visualizationLoader)
[00:23:14]                     │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:23:14]                     │ debg -- firstCount=3
[00:23:14]                     │ debg ... sleep(2000) start
[00:23:16]                     │ debg ... sleep(2000) end
[00:23:16]                     │ debg TestSubjects.find(visualizationLoader)
[00:23:16]                     │ debg Find.findByCssSelector('[data-test-subj="visualizationLoader"]') with timeout=10000
[00:23:16]                     │ debg -- secondCount=3
[00:23:16]                     │ debg Find.findByCssSelector('[aria-label^="Y-axis"]') with timeout=10000
[00:23:26]                     │ info Taking screenshot "/dev/shm/workspace/parallel/20/kibana/test/functional/screenshots/failure/visualize app  vega chart in visualize app vega chart with filters should render different data in response to filter change.png"
[00:23:26]                     │ info Current URL is: http://localhost:61201/app/visualize#/create?type=vega&_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=(filters:!(),linked:!f,query:(language:kuery,query:%27%27),uiState:(),vis:(aggs:!(),params:(spec:%27%7B%0A%2F*%0A%0AWelcome%20to%20Vega%20visualizations.%20%20Here%20you%20can%20design%20your%20own%20dataviz%20from%20scratch%20using%20a%20declarative%20language%20called%20Vega,%20or%20its%20simpler%20form%20Vega-Lite.%20%20In%20Vega,%20you%20have%20the%20full%20control%20of%20what%20data%20is%20loaded,%20even%20from%20multiple%20sources,%20how%20that%20data%20is%20transformed,%20and%20what%20visual%20elements%20are%20used%20to%20show%20it.%20%20Use%20help%20icon%20to%20view%20Vega%20examples,%20tutorials,%20and%20other%20docs.%20%20Use%20the%20wrench%20icon%20to%20reformat%20this%20text,%20or%20to%20remove%20comments.%0A%0AThis%20example%20graph%20shows%20the%20document%20count%20in%20all%20indexes%20in%20the%20current%20time%20range.%20%20You%20might%20need%20to%20adjust%20the%20time%20filter%20in%20the%20upper%20right%20corner.%0A*%2F%0A%0A%20%20$schema:%20https:%2F%2Fvega.github.io%2Fschema%2Fvega-lite%2Fv4.json%0A%20%20title:%20Event%20counts%20from%20all%20indexes%0A%0A%20%20%2F%2F%20Define%20the%20data%20source%0A%20%20data:%20%7B%0A%20%20%20%20url:%20%7B%0A%2F*%0AAn%20object%20instead%20of%20a%20string%20for%20the%20%22url%22%20param%20is%20treated%20as%20an%20Elasticsearch%20query.%20Anything%20inside%20this%20object%20is%20not%20part%20of%20the%20Vega%20language,%20but%20only%20understood%20by%20Kibana%20and%20Elasticsearch%20server.%20This%20query%20counts%20the%20number%20of%20documents%20per%20time%20interval,%20assuming%20you%20have%20a%20@timestamp%20field%20in%20your%20data.%0A%0AKibana%20has%20a%20special%20handling%20for%20the%20fields%20surrounded%20by%20%22%25%22.%20%20They%20are%20processed%20before%20the%20the%20query%20is%20sent%20to%20Elasticsearch.%20This%20way%20the%20query%20becomes%20context%20aware,%20and%20can%20use%20the%20time%20range%20and%20the%20dashboard%20filters.%0A*%2F%0A%0A%20%20%20%20%20%20%2F%2F%20Apply%20dashboard%20context%20filters%20when%20set%0A%20%20%20%20%20%20%25context%25:%20true%0A%20%20%20%20%20%20%2F%2F%20Filter%20the%20time%20picker%20(upper%20right%20corner)%20with%20this%20field%0A%20%20%20%20%20%20%25timefield%25:%20@timestamp%0A%0A%2F*%0ASee%20.search()%20documentation%20for%20:%20%20https:%2F%2Fwww.elastic.co%2Fguide%2Fen%2Felasticsearch%2Fclient%2Fjavascript-api%2Fcurrent%2Fapi-reference.html%23api-search%0A*%2F%0A%0A%20%20%20%20%20%20%2F%2F%20Which%20index%20to%20search%0A%20%20%20%20%20%20index:%20_all%0A%20%20%20%20%20%20%2F%2F%20Aggregate%20data%20by%20the%20time%20field%20into%20time%20buckets,%20counting%20the%20number%20of%20documents%20in%20each%20bucket.%0A%20%20%20%20%20%20body:%20%7B%0A%20%20%20%20%20%20%20%20aggs:%20%7B%0A%20%20%20%20%20%20%20%20%20%20time_buckets:%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20date_histogram:%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Use%20date%20histogram%20aggregation%20on%20@timestamp%20field%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20field:%20@timestamp%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20The%20interval%20value%20will%20depend%20on%20the%20daterange%20picker%20(true),%20or%20use%20an%20integer%20to%20set%20an%20approximate%20bucket%20count%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20interval:%20%7B%25autointerval%25:%20true%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Make%20sure%20we%20get%20an%20entire%20range,%20even%20if%20it%20has%20no%20data%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20extended_bounds:%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Use%20the%20current%20time%20range!%27s%20start%20and%20end%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20min:%20%7B%25timefilter%25:%20%22min%22%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20max:%20%7B%25timefilter%25:%20%22max%22%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20Use%20this%20for%20linear%20(e.g.%20line,%20area)%20graphs.%20%20Without%20it,%20empty%20buckets%20will%20not%20show%20up%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20min_doc_count:%200%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%2F%2F%20Speed%20up%20the%20response%20by%20only%20including%20aggregation%20results%0A%20%20%20%20%20%20%20%20size:%200%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%2F*%0AElasticsearch%20will%20return%20results%20in%20this%20format:%0A%0Aaggregations:%20%7B%0A%20%20time_buckets:%20%7B%0A%20%20%20%20buckets:%20%5B%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20key_as_string:%202015-11-30T22:00:00.000Z%0A%20%20%20%20%20%20%20%20key:%201448920800000%0A%20%20%20%20%20%20%20%20doc_count:%200%0A%20%20%20%20%20%20%7D,%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20key_as_string:%202015-11-30T23:00:00.000Z%0A%20%20%20%20%20%20%20%20key:%201448924400000%0A%20%20%20%20%20%20%20%20doc_count:%200%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20...%0A%20%20%20%20%5D%0A%20%20%7D%0A%7D%0A%0AFor%20our%20graph,%20we%20only%20need%20the%20list%20of%20bucket%20values.%20%20Use%20the%20format.property%20to%20discard%20everything%20else.%0A*%2F%0A%20%20%20%20format:%20%7Bproperty:%20%22aggregations.time_buckets.buckets%22%7D%0A%20%20%7D%0A%0A%20%20%2F%2F%20%22mark%22%20is%20the%20graphics%20element%20used%20to%20show%20our%20data.%20%20Other%20mark%20values%20are:%20area,%20bar,%20circle,%20line,%20point,%20rect,%20rule,%20square,%20text,%20and%20tick.%20%20See%20https:%2F%2Fvega.github.io%2Fvega-lite%2Fdocs%2Fmark.html%0A%20%20mark:%20line%0A%0A%20%20%2F%2F%20%22encoding%22%20tells%20the%20%22mark%22%20what%20data%20to%20use%20and%20in%20what%20way.%20%20See%20https:%2F%2Fvega.github.io%2Fvega-lite%2Fdocs%2Fencoding.html%0A%20%20encoding:%20%7B%0A%20%20%20%20x:%20%7B%0A%20%20%20%20%20%20%2F%2F%20The%20%22key%22%20value%20is%20the%20timestamp%20in%20milliseconds.%20%20Use%20it%20for%20X%20axis.%0A%20%20%20%20%20%20field:%20key%0A%20%20%20%20%20%20type:%20temporal%0A%20%20%20%20%20%20axis:%20%7Btitle:%20false%7D%20%2F%2F%20Customize%20X%20axis%20format%0A%20%20%20%20%7D%0A%20%20%20%20y:%20%7B%0A%20%20%20%20%20%20%2F%2F%20The%20%22doc_count%22%20is%20the%20count%20per%20bucket.%20%20Use%20it%20for%20Y%20axis.%0A%20%20%20%20%20%20field:%20doc_count%0A%20%20%20%20%20%20type:%20quantitative%0A%20%20%20%20%20%20axis:%20%7Btitle:%20%22Document%20count%22%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A%22config%22:%20%7B%20%22kibana%22:%20%7B%22renderer%22:%20%22svg%22%7D%20%7D,%27),title:%27%27,type:vega))
[00:23:26]                     │ info Saving page source to: /dev/shm/workspace/parallel/20/kibana/test/functional/failure_debug/html/visualize app  vega chart in visualize app vega chart with filters should render different data in response to filter change.html
[00:23:26]                     └- ✖ fail: visualize app  vega chart in visualize app vega chart with filters should render different data in response to filter change
[00:23:26]                     │      TimeoutError: Waiting for element to be located By(css selector, [aria-label^="Y-axis"])
[00:23:26]                     │ Wait timed out after 10044ms
[00:23:26]                     │       at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
[00:23:26]                     │       at process._tickCallback (internal/process/next_tick.js:68:7)
[00:23:26]                     │ 
[00:23:26]                     │ 

Stack Trace

{ TimeoutError: Waiting for element to be located By(css selector, [aria-label^="Y-axis"])
Wait timed out after 10044ms
    at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:842:17
    at process._tickCallback (internal/process/next_tick.js:68:7) name: 'TimeoutError', remoteStacktrace: '' }

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
console 163 +4 159

async chunks size

id value diff baseline
console 1.1MB +2.9KB 1.1MB

page load bundle size

id value diff baseline
console 30.4KB -175.0B 30.6KB

History

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

@jloleysens jloleysens merged commit 7376e4c into elastic:master Aug 21, 2020
@jloleysens jloleysens deleted the console/fix/get-es-config-from-core branch August 21, 2020 10:20
jloleysens added a commit to jloleysens/kibana that referenced this pull request Aug 21, 2020
* Server side changes

- removed console_legacy plugin!
- added new es_config endpoint that returns server side es config
  at the moment this is just the first value in hosts
- Slight refactor to how routes are registered to bring them more
  in line with other ES UI plugins

* Client side update

- Updated the client to not get es host from injected metadata.
  Instead use the new endpoint created server side that returns
  this value
- Added a small README.md regarding the hooks lib and need to
  refactor use of jQuery in console
- Write code to init the es host value on the client once at start
  up in a non-blocking way. If this fails we just use the default
  value of http://localhost:9200 as this powers non-essential
  console functionality (i.e., copy as cURL).

* fix type issue and jest tests

* fix another type issue

* simplify proxy assignment in proxy handler mock

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
jloleysens added a commit that referenced this pull request Aug 21, 2020
* Server side changes

- removed console_legacy plugin!
- added new es_config endpoint that returns server side es config
  at the moment this is just the first value in hosts
- Slight refactor to how routes are registered to bring them more
  in line with other ES UI plugins

* Client side update

- Updated the client to not get es host from injected metadata.
  Instead use the new endpoint created server side that returns
  this value
- Added a small README.md regarding the hooks lib and need to
  refactor use of jQuery in console
- Write code to init the es host value on the client once at start
  up in a non-blocking way. If this fails we just use the default
  value of http://localhost:9200 as this powers non-essential
  console functionality (i.e., copy as cURL).

* fix type issue and jest tests

* fix another type issue

* simplify proxy assignment in proxy handler mock

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 21, 2020
* master: (71 commits)
  [Lens] Show 'No data for this field' for empty field in accordion (elastic#73772)
  Skip failing lens test
  Configure ScopedHistory consistenty regardless of URL used to mount app (elastic#75074)
  Fix returned payload by "search" usage collector (elastic#75340)
  [Security Solution] Fix missing key error (elastic#75576)
  Upgrade EUI to v27.4.1 (elastic#75240)
  Update datasets UI copy to data streams (elastic#75618)
  [Lens] Register saved object references (elastic#74523)
  [DOCS] Update links to Beats documentation (elastic#70380)
  [Enterprise Search] Convert our `public_url` route to `config_data` and collect initialAppData (elastic#75616)
  [Usage Collection Schemas] Remove Legacy entries (elastic#75652)
  [Dashboard First] Lens Originating App Breadcrumb (elastic#75470)
  Improve login UI error message. (elastic#75642)
  [Security Solution] modify circular deps checker to output images of circular deps graphs (elastic#75579)
  [Data Telemetry] Add index pattern to identify "meow" attacks (elastic#75163)
  Migrate CSP usage collector to `kibana_usage_collection` plugin (elastic#75536)
  [Console] Get ES Config from core (elastic#75406)
  [Uptime] Add delay in telemetry test (elastic#75162)
  [Lens] Use index pattern service instead saved object client (elastic#74654)
  Embeddable input (elastic#73033)
  ...
thomasneirynck pushed a commit to thomasneirynck/kibana that referenced this pull request Aug 21, 2020
* Server side changes

- removed console_legacy plugin!
- added new es_config endpoint that returns server side es config
  at the moment this is just the first value in hosts
- Slight refactor to how routes are registered to bring them more
  in line with other ES UI plugins

* Client side update

- Updated the client to not get es host from injected metadata.
  Instead use the new endpoint created server side that returns
  this value
- Added a small README.md regarding the hooks lib and need to
  refactor use of jQuery in console
- Write code to init the es host value on the client once at start
  up in a non-blocking way. If this fails we just use the default
  value of http://localhost:9200 as this powers non-essential
  console functionality (i.e., copy as cURL).

* fix type issue and jest tests

* fix another type issue

* simplify proxy assignment in proxy handler mock

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Console Dev Tools Console Feature release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Console] Legacy Config Deprecations in 7.10
4 participants