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

[7.6] Show error if field is not found during filter rendering (#59298) #66982

Closed
wants to merge 2 commits into from

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented May 19, 2020

Backports the following commits to 7.6:

* Show error if field is not found

* Errored filter state

* Design adjustments

* Fixing class names and making look similar to disabled

* code review fixes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: cchaos <caroline.horn@elastic.co>
# Conflicts:
#	src/plugins/data/public/ui/filter_bar/filter_editor/lib/filter_label.tsx
#	src/plugins/data/public/ui/filter_bar/filter_item.tsx
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/context/_date_nanos·js.context app context view for date_nanos displays correctly when predecessors and successors are loaded

Link to Jenkins

Standard Out

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

[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-centos-tests-xl-1589892096289678779] [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-centos-tests-xl-1589892096289678779] 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-centos-tests-xl-1589892096289678779] [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-centos-tests-xl-1589892096289678779] 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-centos-tests-xl-1589892096289678779] [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-centos-tests-xl-1589892096289678779] 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 [visualize] Loading "mappings.json"
[00:00:22]             │ info [visualize] Loading "data.json"
[00:00:23]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_1/RDuC8o_lRZK_BQVN_vd-Og] deleting index
[00:00:23]             │ info [visualize] Deleted existing index [".kibana_1"]
[00:00:23]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:23]             │ info [visualize] Created index ".kibana"
[00:00:23]             │ debg [visualize] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:00:23]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana/g_eDA0AER8S4DC1KenGf4Q] update_mapping [_doc]
[00:00:30]             │ info Creating index .kibana_2.
[00:00:30]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:30]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] updating number_of_replicas to [0] for indices [.kibana_2]
[00:00:30]             │ info Reindexing .kibana to .kibana_1
[00:00:30]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:00:30]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] updating number_of_replicas to [0] for indices [.kibana_1]
[00:00:30]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.tasks] creating index, cause [auto(task api)], templates [], shards [1]/[1], mappings [task]
[00:00:30]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] updating number_of_replicas to [0] for indices [.tasks]
[00:00:30]             │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] 849 finished with response BulkByScrollResponse[took=67.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:30]             │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana/g_eDA0AER8S4DC1KenGf4Q] deleting index
[00:00:30]             │ info Migrating .kibana_1 saved objects to .kibana_2
[00:00:30]             │ debg Migrating saved objects index-pattern:logstash-*, index-pattern:logstash*, index-pattern:long-window-logstash-*, visualization:Shared-Item-Visualization-AreaChart, visualization:68305470-87bc-11e9-a991-3b492a7c3e09, visualization:64983230-87bf-11e9-a991-3b492a7c3e09, visualization:5d2de430-87c0-11e9-a991-3b492a7c3e09
[00:00:30]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_2/ger1cUiWQDmr3lRlgmLrPg] update_mapping [_doc]
[00:00:30]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_2/ger1cUiWQDmr3lRlgmLrPg] update_mapping [_doc]
[00:00:30]             │ info Pointing alias .kibana to .kibana_2.
[00:00:30]             │ info Finished in 684ms.
[00:00:30]             │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC","telemetry:optIn":false}
[00:00:31]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_2/ger1cUiWQDmr3lRlgmLrPg] update_mapping [_doc]
[00:00:32]             │ debg replacing kibana config doc: {"defaultIndex":"logstash-*"}
[00:00:32]             │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_2/ger1cUiWQDmr3lRlgmLrPg] update_mapping [_doc]
[00:00:33]             │ debg navigating to discover url: http://localhost:6121/app/kibana#/discover
[00:00:33]             │ debg browser[INFO] http://localhost:6121/app/kibana?_t=1589893161143#/discover 350 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:33]             │
[00:00:33]             │ debg browser[INFO] http://localhost:6121/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:33]             │ debg ... sleep(700) start
[00:00:33]             │ debg ... sleep(700) end
[00:00:33]             │ debg returned from get, calling refresh
[00:00:34]             │ debg browser[INFO] http://localhost:6121/app/kibana?_t=1589893161143#/discover 350 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:34]             │
[00:00:34]             │ debg browser[INFO] http://localhost:6121/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:34]             │ debg currentUrl = http://localhost:6121/app/kibana#/discover
[00:00:34]             │          appUrl = http://localhost:6121/app/kibana#/discover
[00:00:34]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:36]             │ debg TestSubjects.find(kibanaChrome)
[00:00:36]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:00:36]             │ debg browser[INFO] http://localhost:6121/built_assets/dlls/vendors_2.bundle.dll.js 36:140950 "INFO: 2020-05-19T12:59:23Z
[00:00:36]             │        Adding connection to http://localhost:6121/elasticsearch
[00:00:36]             │
[00:00:36]             │      "
[00:00:36]             │ debg ... sleep(501) start
[00:00:36]             │ debg ... sleep(501) end
[00:00:36]             │ debg in navigateTo url = http://localhost:6121/app/kibana#/discover?_g=()
[00:00:36]             │ debg TestSubjects.exists(statusPageContainer)
[00:00:36]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:39]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:03:18]           └-: context view for date_nanos
[00:03:18]             └-> "before all" hook
[00:03:18]             └-> "before all" hook
[00:03:18]               │ info [date_nanos] Loading "mappings.json"
[00:03:18]               │ info [date_nanos] Loading "data.json"
[00:03:18]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [date-nanos] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:03:18]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[date-nanos][0]]]).
[00:03:18]               │ info [date_nanos] Created index "date-nanos"
[00:03:18]               │ debg [date_nanos] "date-nanos" settings {"index":{"number_of_replicas":"0","number_of_shards":"1"}}
[00:03:18]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [date-nanos/LHLN4xfqSfyM65bFrYCh4Q] update_mapping [_doc]
[00:03:18]               │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:18]               │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:18]               │ info Creating index .kibana_3.
[00:03:18]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_3] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:18]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] updating number_of_replicas to [0] for indices [.kibana_3]
[00:03:19]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_3][0]]]).
[00:03:19]               │ info Migrating .kibana_2 saved objects to .kibana_3
[00:03:19]               │ debg Migrating saved objects index-pattern:logstash*, index-pattern:long-window-logstash-*, visualization:Shared-Item-Visualization-AreaChart, visualization:68305470-87bc-11e9-a991-3b492a7c3e09, visualization:64983230-87bf-11e9-a991-3b492a7c3e09, visualization:5d2de430-87c0-11e9-a991-3b492a7c3e09, config:7.6.3-SNAPSHOT, index-pattern:logstash-*, ui-metric:kibana-user_agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/81.0.4044.122 Safari/537.36, index-pattern:date-nanos, search:ab12e3c0-f231-11e6-9486-733b1ac9221a
[00:03:19]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_3/gLwUErk_TIiY7ZL423RUlA] update_mapping [_doc]
[00:03:19]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_3/gLwUErk_TIiY7ZL423RUlA] update_mapping [_doc]
[00:03:19]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_3/gLwUErk_TIiY7ZL423RUlA] update_mapping [_doc]
[00:03:19]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_3/gLwUErk_TIiY7ZL423RUlA] update_mapping [_doc]
[00:03:19]               │ info Pointing alias .kibana to .kibana_3.
[00:03:19]               │ info Finished in 252ms.
[00:03:19]               │ debg replacing kibana config doc: {"defaultIndex":"date-nanos"}
[00:03:20]               │ debg applying update to kibana config: {"context:defaultSize":"1","context:step":"3"}
[00:03:20]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-centos-tests-xl-1589892096289678779] [.kibana_3/gLwUErk_TIiY7ZL423RUlA] update_mapping [_doc]
[00:03:21]             └-> displays predessors - anchor - successors in right order 
[00:03:21]             └-> displays correctly when predecessors and successors are loaded
[00:03:21]               └-> "before each" hook: global before each
[00:03:21]               │ debg browser.get(http://localhost:6121/app/kibana#/context/date-nanos/AU_x3-TaGFA8no6Qjisd?_a=(columns:!('@message')))
[00:03:21]               │ debg --- retry.try failed again with the same message...
[00:03:21]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:03:21]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:03:21]               │ debg browser[INFO] http://localhost:6121/app/kibana?_t=1589893329408#/context/date-nanos/AU_x3-TaGFA8no6Qjisd?_a=(columns:!(%27@message%27)) 350 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:03:21]               │
[00:03:21]               │ debg browser[INFO] http://localhost:6121/bundles/app/kibana/bootstrap.js 8:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:03:21]               │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:21]               │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:24]               │ debg browser[INFO] http://localhost:6121/built_assets/dlls/vendors_2.bundle.dll.js 36:140950 "INFO: 2020-05-19T13:02:12Z
[00:03:24]               │        Adding connection to http://localhost:6121/elasticsearch
[00:03:24]               │
[00:03:24]               │      "
[00:03:24]               │ debg TestSubjects.find(successorsLoadMoreButton)
[00:03:24]               │ debg Find.findByCssSelector('[data-test-subj="successorsLoadMoreButton"]') with timeout=10000
[00:03:34]               │ debg --- retry.try failed again with the same message...
[00:03:34]               │ debg TestSubjects.find(predecessorsLoadMoreButton)
[00:03:34]               │ debg Find.findByCssSelector('[data-test-subj="predecessorsLoadMoreButton"]') with timeout=10000
[00:03:34]               │ debg ... sleep(1000) start
[00:03:34]               └- ✖ fail: "context app context view for date_nanos displays correctly when predecessors and successors are loaded"
[00:03:34]               │

Stack Trace

{ DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
    at emitDeprecationWarning (internal/process/promises.js:111:13)
    at emitWarning (internal/process/promises.js:104:3)
    at emitPromiseRejectionWarnings (internal/process/promises.js:143:7)
    at process._tickCallback (internal/process/next_tick.js:69:34) name: 'DeprecationWarning', code: 'DEP0018', uncaught: true }

History

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

@lizozom
Copy link
Contributor Author

lizozom commented May 31, 2020

decided not to backport to 7.6

@lizozom lizozom closed this May 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants