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

Clear cache when index pattern is deleted #63220

Conversation

kertal
Copy link
Member

@kertal kertal commented Apr 10, 2020

Summary

The cache containing the index patterns wasn't cleanup up, when an index pattern was removed in management. This caused problems in Discover: When the previously selected index pattern was deleted, there was an exception in Discover's rendering. This PR cleans up the cache when an index pattern is deleted in management, and furthermore, it triggers a refresh of the in the ensureDefaultIndexPattern function used by Discover/Virtualize/Dashboard.

Fixes: #63180, #62269

Checklist

@kertal kertal added the Feature:Data Views Data Views code and UI - index patterns before 8.0 label Apr 10, 2020
@kertal kertal self-assigned this Apr 10, 2020
@kertal kertal added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Apr 15, 2020
@elasticmachine
Copy link
Contributor

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

@kertal kertal added v7.7.0 v7.8.0 v8.0.0 Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes labels Apr 15, 2020
@kibanamachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / kibana-oss-agent / Accessibility Tests.test/accessibility/apps/dashboard·ts.Dashboard create dashboard button

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:03:24]         └-: Dashboard
[00:03:24]           └-> "before all" hook
[00:03:24]           └-> "before all" hook
[00:03:24]             │ debg navigateToUrl http://localhost:61131/app/kibana#/home/tutorial_directory/sampleData
[00:03:24]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587015107525#/home/tutorial_directory/sampleData 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:03:24]             │
[00:03:24]             │ 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:03:24]             │ debg currentUrl = http://localhost:61131/app/kibana#/home/tutorial_directory/sampleData
[00:03:24]             │          appUrl = http://localhost:61131/app/kibana#/home/tutorial_directory/sampleData
[00:03:24]             │ debg TestSubjects.find(kibanaChrome)
[00:03:24]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:03:27]             │ debg TestSubjects.exists(addSampleDataSetflights)
[00:03:27]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=2500
[00:03:27]             │ debg browser[INFO] http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-04-16T05:31:50Z
[00:03:27]             │        Adding connection to http://localhost:61131/elasticsearch
[00:03:27]             │
[00:03:27]             │      "
[00:03:28]             │ debg TestSubjects.click(addSampleDataSetflights)
[00:03:28]             │ debg Find.clickByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=10000
[00:03:28]             │ debg Find.findByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=10000
[00:03:28]             │ debg TestSubjects.find(sampleDataSetCardflights)
[00:03:28]             │ debg Find.findByCssSelector('[data-test-subj="sampleDataSetCardflights"]') with timeout=10000
[00:03:28]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] applying create index request using v1 templates []
[00:03:29]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] [kibana_sample_data_flights] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:29]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] updating number_of_replicas to [0] for indices [kibana_sample_data_flights]
[00:03:29]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[kibana_sample_data_flights][0]]])." previous.health="YELLOW" reason="shards started [[kibana_sample_data_flights][0]]"
[00:03:33]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] [.kibana_2/6zcx86fBS_KtxLjIhQZSWg] update_mapping [_doc]
[00:03:34]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] [.kibana_2/6zcx86fBS_KtxLjIhQZSWg] update_mapping [_doc]
[00:03:35]             │ debg TestSubjects.exists(addSampleDataSetflights)
[00:03:35]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=2500
[00:03:37]             │ debg --- retry.tryForTime error: [data-test-subj="addSampleDataSetflights"] is not displayed
[00:03:38]           └-> dashboard
[00:03:38]             └-> "before each" hook: global before each
[00:03:38]             │ debg navigating to dashboard url: http://localhost:61131/app/kibana#/dashboards
[00:03:38]             │ debg navigate to: http://localhost:61131/app/kibana#/dashboards
[00:03:38]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587015121505#/dashboards 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:03:38]             │
[00:03:38]             │ 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:03:38]             │ debg ... sleep(700) start
[00:03:39]             │ debg ... sleep(700) end
[00:03:39]             │ debg returned from get, calling refresh
[00:03:39]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587015121505#/dashboards 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:03:39]             │
[00:03:39]             │ 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:03:39]             │ debg currentUrl = http://localhost:61131/app/kibana#/dashboards
[00:03:39]             │          appUrl = http://localhost:61131/app/kibana#/dashboards
[00:03:39]             │ debg TestSubjects.find(kibanaChrome)
[00:03:39]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:03:41]             │ debg TestSubjects.find(kibanaChrome)
[00:03:41]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:03:41]             │ debg browser[INFO] http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-04-16T05:32:03Z
[00:03:41]             │        Adding connection to http://localhost:61131/elasticsearch
[00:03:41]             │
[00:03:41]             │      "
[00:03:41]             │ debg ... sleep(501) start
[00:03:41]             │ debg ... sleep(501) end
[00:03:41]             │ debg in navigateTo url = http://localhost:61131/app/kibana#/dashboards?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:03:41]             │ debg TestSubjects.exists(statusPageContainer)
[00:03:41]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:03:44]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:03:45]             └- ✓ pass  (7.0s) "Dashboard dashboard"
[00:03:45]           └-> create dashboard button
[00:03:45]             └-> "before each" hook: global before each
[00:03:45]             │ debg TestSubjects.exists(newItemButton)
[00:03:45]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="newItemButton"]') with timeout=2500
[00:03:45]             │ debg TestSubjects.click(newItemButton)
[00:03:45]             │ debg Find.clickByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:03:45]             │ debg Find.findByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:03:46]             │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/Dashboard create dashboard button.png"
[00:03:46]             │ info Current URL is: http://localhost:61131/app/kibana#/dashboard?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:%27%27,filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!(),query:(language:kuery,query:%27%27),timeRestore:!f,title:%27%27,viewMode:edit)
[00:03:46]             │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/Dashboard create dashboard button.html
[00:03:46]             └- ✖ fail: "Dashboard create dashboard button"
[00:03:46]             │

Stack Trace

Error: a11y report:

VIOLATION
  [bypass]: Ensures each page has at least one mechanism for a user to bypass navigation and jump straight to the content
    Help: https://dequeuniversity.com/rules/axe/3.5/bypass?application=axeAPI
    Elements:
      - html
    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 / Accessibility Tests.test/accessibility/apps/dashboard·ts.Dashboard "after all" hook for "Open flight dashboard"

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:03:24]         └-: Dashboard
[00:03:24]           └-> "before all" hook
[00:03:24]           └-> "before all" hook
[00:03:24]             │ debg navigateToUrl http://localhost:61131/app/kibana#/home/tutorial_directory/sampleData
[00:03:24]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587015107525#/home/tutorial_directory/sampleData 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:03:24]             │
[00:03:24]             │ 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:03:24]             │ debg currentUrl = http://localhost:61131/app/kibana#/home/tutorial_directory/sampleData
[00:03:24]             │          appUrl = http://localhost:61131/app/kibana#/home/tutorial_directory/sampleData
[00:03:24]             │ debg TestSubjects.find(kibanaChrome)
[00:03:24]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:03:27]             │ debg TestSubjects.exists(addSampleDataSetflights)
[00:03:27]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=2500
[00:03:27]             │ debg browser[INFO] http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-04-16T05:31:50Z
[00:03:27]             │        Adding connection to http://localhost:61131/elasticsearch
[00:03:27]             │
[00:03:27]             │      "
[00:03:28]             │ debg TestSubjects.click(addSampleDataSetflights)
[00:03:28]             │ debg Find.clickByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=10000
[00:03:28]             │ debg Find.findByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=10000
[00:03:28]             │ debg TestSubjects.find(sampleDataSetCardflights)
[00:03:28]             │ debg Find.findByCssSelector('[data-test-subj="sampleDataSetCardflights"]') with timeout=10000
[00:03:28]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] applying create index request using v1 templates []
[00:03:29]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] [kibana_sample_data_flights] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:29]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] updating number_of_replicas to [0] for indices [kibana_sample_data_flights]
[00:03:29]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[kibana_sample_data_flights][0]]])." previous.health="YELLOW" reason="shards started [[kibana_sample_data_flights][0]]"
[00:03:33]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] [.kibana_2/6zcx86fBS_KtxLjIhQZSWg] update_mapping [_doc]
[00:03:34]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] [.kibana_2/6zcx86fBS_KtxLjIhQZSWg] update_mapping [_doc]
[00:03:35]             │ debg TestSubjects.exists(addSampleDataSetflights)
[00:03:35]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=2500
[00:03:37]             │ debg --- retry.tryForTime error: [data-test-subj="addSampleDataSetflights"] is not displayed
[00:03:38]           └-> dashboard
[00:03:38]             └-> "before each" hook: global before each
[00:03:38]             │ debg navigating to dashboard url: http://localhost:61131/app/kibana#/dashboards
[00:03:38]             │ debg navigate to: http://localhost:61131/app/kibana#/dashboards
[00:03:38]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587015121505#/dashboards 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:03:38]             │
[00:03:38]             │ 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:03:38]             │ debg ... sleep(700) start
[00:03:39]             │ debg ... sleep(700) end
[00:03:39]             │ debg returned from get, calling refresh
[00:03:39]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587015121505#/dashboards 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:03:39]             │
[00:03:39]             │ 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:03:39]             │ debg currentUrl = http://localhost:61131/app/kibana#/dashboards
[00:03:39]             │          appUrl = http://localhost:61131/app/kibana#/dashboards
[00:03:39]             │ debg TestSubjects.find(kibanaChrome)
[00:03:39]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:03:41]             │ debg TestSubjects.find(kibanaChrome)
[00:03:41]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:03:41]             │ debg browser[INFO] http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-04-16T05:32:03Z
[00:03:41]             │        Adding connection to http://localhost:61131/elasticsearch
[00:03:41]             │
[00:03:41]             │      "
[00:03:41]             │ debg ... sleep(501) start
[00:03:41]             │ debg ... sleep(501) end
[00:03:41]             │ debg in navigateTo url = http://localhost:61131/app/kibana#/dashboards?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:03:41]             │ debg TestSubjects.exists(statusPageContainer)
[00:03:41]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:03:44]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:03:45]             └- ✓ pass  (7.0s) "Dashboard dashboard"
[00:03:45]           └-> create dashboard button
[00:03:45]             └-> "before each" hook: global before each
[00:03:45]             │ debg TestSubjects.exists(newItemButton)
[00:03:45]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="newItemButton"]') with timeout=2500
[00:03:45]             │ debg TestSubjects.click(newItemButton)
[00:03:45]             │ debg Find.clickByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:03:45]             │ debg Find.findByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:03:46]             │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/Dashboard create dashboard button.png"
[00:03:46]             │ info Current URL is: http://localhost:61131/app/kibana#/dashboard?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:%27%27,filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!(),query:(language:kuery,query:%27%27),timeRestore:!f,title:%27%27,viewMode:edit)
[00:03:46]             │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/Dashboard create dashboard button.html
[00:03:46]             └- ✖ fail: "Dashboard create dashboard button"
[00:03:46]             │
[00:03:46]           └-> "after all" hook
[00:03:46]             │ debg navigating to dashboard url: http://localhost:61131/app/kibana#/dashboards
[00:03:46]             │ debg navigate to: http://localhost:61131/app/kibana#/dashboards
[00:03:46]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587015129491#/dashboards 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:03:46]             │
[00:03:46]             │ 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:03:46]             │ debg ... sleep(700) start
[00:03:47]             │ debg ... sleep(700) end
[00:03:47]             │ debg returned from get, calling refresh
[00:03:47]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587015129491#/dashboards 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:03:47]             │
[00:03:47]             │ 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:03:47]             │ debg currentUrl = http://localhost:61131/app/kibana#/dashboards
[00:03:47]             │          appUrl = http://localhost:61131/app/kibana#/dashboards
[00:03:47]             │ debg TestSubjects.find(kibanaChrome)
[00:03:47]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:03:49]             │ debg TestSubjects.find(kibanaChrome)
[00:03:49]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:03:49]             │ debg browser[INFO] http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-04-16T05:32:11Z
[00:03:49]             │        Adding connection to http://localhost:61131/elasticsearch
[00:03:49]             │
[00:03:49]             │      "
[00:03:49]             │ debg ... sleep(501) start
[00:03:49]             │ debg ... sleep(501) end
[00:03:49]             │ debg in navigateTo url = http://localhost:61131/app/kibana#/dashboards?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:03:49]             │ debg TestSubjects.exists(statusPageContainer)
[00:03:49]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:03:52]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:03:52]             │ debg searchForItemWithName: Dashboard Listing A11y
[00:03:52]             │ debg Find.allByCssSelector('.euiFieldSearch') with timeout=10000
[00:03:53]             │ debg isGlobalLoadingIndicatorVisible
[00:03:53]             │ debg TestSubjects.exists(globalLoadingIndicator)
[00:03:53]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="globalLoadingIndicator"]') with timeout=1500
[00:03:53]             │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:03:53]             │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:03:53]             │ debg TestSubjects.find(checkboxSelectAll)
[00:03:53]             │ debg Find.findByCssSelector('[data-test-subj="checkboxSelectAll"]') with timeout=10000
[00:03:53]             │ debg checking checkbox "checkboxSelectAll"
[00:03:53]             │ debg TestSubjects.click(checkboxSelectAll)
[00:03:53]             │ debg Find.clickByCssSelector('[data-test-subj="checkboxSelectAll"]') with timeout=10000
[00:03:53]             │ debg Find.findByCssSelector('[data-test-subj="checkboxSelectAll"]') with timeout=10000
[00:03:53]             │ debg TestSubjects.click(deleteSelectedItems)
[00:03:53]             │ debg Find.clickByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:03:53]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:04:03]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:04:03]             │      Wait timed out after 10051ms
[00:04:04]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:04:14]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:04:14]             │      Wait timed out after 10039ms
[00:04:14]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:04:24]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:04:24]             │      Wait timed out after 10047ms
[00:04:25]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:04:35]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:04:35]             │      Wait timed out after 10054ms
[00:04:36]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:04:46]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:04:46]             │      Wait timed out after 10042ms
[00:04:46]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:04:56]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:04:56]             │      Wait timed out after 10011ms
[00:04:57]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:05:07]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:05:07]             │      Wait timed out after 10051ms
[00:05:07]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:05:17]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:05:17]             │      Wait timed out after 10039ms
[00:05:18]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:05:28]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:05:28]             │      Wait timed out after 10042ms
[00:05:28]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:05:38]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:05:38]             │      Wait timed out after 10060ms
[00:05:39]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:05:49]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:05:49]             │      Wait timed out after 10035ms
[00:05:49]             │ debg Find.findByCssSelector('[data-test-subj="deleteSelectedItems"]') with timeout=10000
[00:05:59]             │ debg --- retry.try error: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
[00:05:59]             │      Wait timed out after 10033ms
[00:06:00]             │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/Dashboard _after all_ hook.png"
[00:06:00]             │ info Current URL is: http://localhost:61131/app/kibana#/dashboards?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:06:00]             │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/Dashboard _after all_ hook.html
[00:06:00]             └- ✖ fail: "Dashboard "after all" hook for "Open flight dashboard""
[00:06:00]             │

Stack Trace

Error: retry.try timeout: TimeoutError: Waiting for element to be located By(css selector, [data-test-subj="deleteSelectedItems"])
Wait timed out after 10033ms
    at /dev/shm/workspace/kibana/node_modules/selenium-webdriver/lib/webdriver.js:841:17
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at onFailure (test/common/services/retry/retry_for_success.ts:28:9)
    at retryForSuccess (test/common/services/retry/retry_for_success.ts:68:13)

Kibana Pipeline / kibana-oss-agent / Accessibility Tests.test/accessibility/apps/dashboard·ts.Dashboard create dashboard button

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:03:29]         └-: Dashboard
[00:03:29]           └-> "before all" hook
[00:03:29]           └-> "before all" hook
[00:03:29]             │ debg navigateToUrl http://localhost:61131/app/kibana#/home/tutorial_directory/sampleData
[00:03:29]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587014641747#/home/tutorial_directory/sampleData 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:03:29]             │
[00:03:29]             │ 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:03:29]             │ debg currentUrl = http://localhost:61131/app/kibana#/home/tutorial_directory/sampleData
[00:03:29]             │          appUrl = http://localhost:61131/app/kibana#/home/tutorial_directory/sampleData
[00:03:29]             │ debg TestSubjects.find(kibanaChrome)
[00:03:29]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:03:32]             │ debg TestSubjects.exists(addSampleDataSetflights)
[00:03:32]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=2500
[00:03:33]             │ debg browser[INFO] http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-04-16T05:24:04Z
[00:03:33]             │        Adding connection to http://localhost:61131/elasticsearch
[00:03:33]             │
[00:03:33]             │      "
[00:03:33]             │ debg TestSubjects.click(addSampleDataSetflights)
[00:03:33]             │ debg Find.clickByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=10000
[00:03:33]             │ debg Find.findByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=10000
[00:03:34]             │ debg TestSubjects.find(sampleDataSetCardflights)
[00:03:34]             │ debg Find.findByCssSelector('[data-test-subj="sampleDataSetCardflights"]') with timeout=10000
[00:03:34]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] applying create index request using v1 templates []
[00:03:34]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] [kibana_sample_data_flights] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:34]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] updating number_of_replicas to [0] for indices [kibana_sample_data_flights]
[00:03:34]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[kibana_sample_data_flights][0]]])." previous.health="YELLOW" reason="shards started [[kibana_sample_data_flights][0]]"
[00:03:39]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] [.kibana_2/VjMEdkX9QGq0gF-E7XW7lw] update_mapping [_doc]
[00:03:39]             │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1587013124402535436] [.kibana_2/VjMEdkX9QGq0gF-E7XW7lw] update_mapping [_doc]
[00:03:41]             │ debg TestSubjects.exists(addSampleDataSetflights)
[00:03:41]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="addSampleDataSetflights"]') with timeout=2500
[00:03:43]             │ debg --- retry.tryForTime error: [data-test-subj="addSampleDataSetflights"] is not displayed
[00:03:44]           └-> dashboard
[00:03:44]             └-> "before each" hook: global before each
[00:03:44]             │ debg navigating to dashboard url: http://localhost:61131/app/kibana#/dashboards
[00:03:44]             │ debg navigate to: http://localhost:61131/app/kibana#/dashboards
[00:03:44]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587014656241#/dashboards 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:03:44]             │
[00:03:44]             │ 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:03:44]             │ debg ... sleep(700) start
[00:03:44]             │ debg ... sleep(700) end
[00:03:44]             │ debg returned from get, calling refresh
[00:03:45]             │ debg browser[INFO] http://localhost:61131/app/kibana?_t=1587014656241#/dashboards 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:03:45]             │
[00:03:45]             │ 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:03:45]             │ debg currentUrl = http://localhost:61131/app/kibana#/dashboards
[00:03:45]             │          appUrl = http://localhost:61131/app/kibana#/dashboards
[00:03:45]             │ debg TestSubjects.find(kibanaChrome)
[00:03:45]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:03:47]             │ debg TestSubjects.find(kibanaChrome)
[00:03:47]             │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=10000
[00:03:47]             │ debg browser[INFO] http://localhost:61131/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-04-16T05:24:18Z
[00:03:47]             │        Adding connection to http://localhost:61131/elasticsearch
[00:03:47]             │
[00:03:47]             │      "
[00:03:47]             │ debg ... sleep(501) start
[00:03:47]             │ debg ... sleep(501) end
[00:03:47]             │ debg in navigateTo url = http://localhost:61131/app/kibana#/dashboards?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))
[00:03:47]             │ debg TestSubjects.exists(statusPageContainer)
[00:03:47]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:03:50]             │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:03:51]             └- ✓ pass  (7.1s) "Dashboard dashboard"
[00:03:51]           └-> create dashboard button
[00:03:51]             └-> "before each" hook: global before each
[00:03:51]             │ debg TestSubjects.exists(newItemButton)
[00:03:51]             │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="newItemButton"]') with timeout=2500
[00:03:51]             │ debg TestSubjects.click(newItemButton)
[00:03:51]             │ debg Find.clickByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:03:51]             │ debg Find.findByCssSelector('[data-test-subj="newItemButton"]') with timeout=10000
[00:03:51]             │ info Taking screenshot "/dev/shm/workspace/kibana/test/functional/screenshots/failure/Dashboard create dashboard button.png"
[00:03:52]             │ info Current URL is: http://localhost:61131/app/kibana#/dashboard?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:%27%27,filters:!(),fullScreenMode:!f,options:(hidePanelTitles:!f,useMargins:!t),panels:!(),query:(language:kuery,query:%27%27),timeRestore:!f,title:%27%27,viewMode:edit)
[00:03:52]             │ info Saving page source to: /dev/shm/workspace/kibana/test/functional/failure_debug/html/Dashboard create dashboard button.html
[00:03:52]             └- ✖ fail: "Dashboard create dashboard button"
[00:03:52]             │

Stack Trace

Error: a11y report:

VIOLATION
  [bypass]: Ensures each page has at least one mechanism for a user to bypass navigation and jump straight to the content
    Help: https://dequeuniversity.com/rules/axe/3.5/bypass?application=axeAPI
    Elements:
      - html
    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)

and 1 more failures, only showing the first 3.

History

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

@flash1293
Copy link
Contributor

@kertal It seems like this PR overlaps with #63329

The test failure is happening because there is an additional delay introduced when switching to a new dashboard because the index pattern check now requires a network roundtrip. In my PR I moved this check to the app mounting to limit the number of times this has to happen.

@kertal
Copy link
Member Author

kertal commented Apr 16, 2020

@flash1293 thanks a lot! this saves me a lot of time, was just wondering why this was failing.

@kertal
Copy link
Member Author

kertal commented Apr 17, 2020

After syncing with @flash1293, closing it in favor of #63329
This will be a 4 flies (issues) with one stone PR 🥳

@kertal kertal closed this Apr 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Data Views Data Views code and UI - index patterns before 8.0 Feature:Discover Discover Application release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.7.0 v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deleted index pattern still shows up in discover under index patterns and navigation to discover has a problem
4 participants