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.x] Fix edit datasource not working following changes in #67234 (#68583) #68721

Merged
merged 1 commit into from
Jun 10, 2020

Conversation

jen-huang
Copy link
Contributor

Backports the following commits to 7.x:

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/canvas/custom_elements·ts.Canvas app custom elements adds the custom element to the workpad when prompted

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:01:26]         └-: Canvas app
[00:01:26]           └-> "before all" hook
[00:02:18]           └-: custom elements
[00:02:18]             └-> "before all" hook
[00:02:18]             └-> "before all" hook
[00:02:18]               │ info [logstash_functional] Loading "mappings.json"
[00:02:18]               │ info [logstash_functional] Loading "data.json.gz"
[00:02:18]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:02:18]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:02:18]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:02:19]               │ info [canvas/default] Loading "mappings.json"
[00:02:19]               │ info [canvas/default] Loading "data.json.gz"
[00:02:19]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591740438078992340] [.kibana_1/pQzFKczITouYtnxra4T0Wg] deleting index
[00:02:19]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591740438078992340] [.kibana_2/UiStFL9rQu-jGJUADsmyjw] deleting index
[00:02:19]               │ info [canvas/default] Deleted existing index [".kibana_2",".kibana_1"]
[00:02:19]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591740438078992340] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:02:19]               │ info [canvas/default] Created index ".kibana_1"
[00:02:19]               │ debg [canvas/default] ".kibana_1" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:02:19]               │ info [canvas/default] Indexed 3 docs into ".kibana_1"
[00:02:19]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591740438078992340] [.kibana_1/Yn4z4IUfRUeVcq20Fow6LA] update_mapping [_doc]
[00:02:19]               │ debg Migrating saved objects
[00:02:20]               │ proc [kibana]   log   [22:44:35.118] [info][savedobjects-service] Creating index .kibana_2.
[00:02:21]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591740438078992340] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:02:21]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591740438078992340] updating number_of_replicas to [0] for indices [.kibana_2]
[00:02:21]               │ proc [kibana]   log   [22:44:35.249] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:02:21]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591740438078992340] [.kibana_2/Xw_AJfG2TKW8qD3H-woltA] update_mapping [_doc]
[00:02:21]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xl-1591740438078992340] [.kibana_2/Xw_AJfG2TKW8qD3H-woltA] update_mapping [_doc]
[00:02:21]               │ proc [kibana]   log   [22:44:35.451] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:02:21]               │ proc [kibana]   log   [22:44:35.535] [info][savedobjects-service] Finished in 422ms.
[00:02:21]               │ debg navigating to canvas url: http://localhost:6131/app/canvas#/
[00:02:21]               │ debg navigate to: http://localhost:6131/app/canvas#/
[00:02:23]               │ debg browser[INFO] http://localhost:6131/app/canvas?_t=1591742675558#/ 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:02:23]               │
[00:02:23]               │ debg browser[INFO] http://localhost:6131/bundles/app/core/bootstrap.js 11:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:23]               │ debg ... sleep(700) start
[00:02:23]               │ debg browser[INFO] http://localhost:6131/32303/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-06-09T22:44:37Z
[00:02:23]               │        Adding connection to http://localhost:6131/elasticsearch
[00:02:23]               │
[00:02:23]               │      "
[00:02:23]               │ debg ... sleep(700) end
[00:02:23]               │ debg returned from get, calling refresh
[00:02:24]               │ debg browser[INFO] http://localhost:6131/app/canvas?_t=1591742675558#/ 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:02:24]               │
[00:02:24]               │ debg browser[INFO] http://localhost:6131/bundles/app/core/bootstrap.js 11:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:24]               │ debg currentUrl = http://localhost:6131/app/canvas#/
[00:02:24]               │          appUrl = http://localhost:6131/app/canvas#/
[00:02:24]               │ debg TestSubjects.find(kibanaChrome)
[00:02:24]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:27]               │ debg browser[INFO] http://localhost:6131/32303/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-06-09T22:44:41Z
[00:02:27]               │        Adding connection to http://localhost:6131/elasticsearch
[00:02:27]               │
[00:02:27]               │      "
[00:02:27]               │ debg ... sleep(501) start
[00:02:28]               │ debg ... sleep(501) end
[00:02:28]               │ debg in navigateTo url = http://localhost:6131/app/canvas#/
[00:02:28]               │ debg TestSubjects.exists(statusPageContainer)
[00:02:28]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:02:30]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:02:31]               │ debg navigating to canvas url: http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:31]               │ debg navigate to: http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:31]               │ debg browser[INFO] http://localhost:6131/app/canvas?_t=1591742685555#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1 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:02:31]               │
[00:02:31]               │ debg browser[INFO] http://localhost:6131/bundles/app/core/bootstrap.js 11:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:31]               │ debg ... sleep(700) start
[00:02:32]               │ debg ... sleep(700) end
[00:02:32]               │ debg returned from get, calling refresh
[00:02:33]               │ debg browser[INFO] http://localhost:6131/app/canvas?_t=1591742685555#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1 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:02:33]               │
[00:02:33]               │ debg browser[INFO] http://localhost:6131/bundles/app/core/bootstrap.js 11:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:02:33]               │ debg currentUrl = http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:33]               │          appUrl = http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:33]               │ debg TestSubjects.find(kibanaChrome)
[00:02:33]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:35]               │ debg browser[INFO] http://localhost:6131/32303/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-06-09T22:44:49Z
[00:02:35]               │        Adding connection to http://localhost:6131/elasticsearch
[00:02:35]               │
[00:02:35]               │      "
[00:02:35]               │ debg ... sleep(501) start
[00:02:36]               │ debg ... sleep(501) end
[00:02:36]               │ debg in navigateTo url = http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:36]               │ debg TestSubjects.exists(statusPageContainer)
[00:02:36]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:02:38]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:02:39]             └-> creates a custom element from an element when prompted
[00:02:39]               └-> "before each" hook: global before each
[00:02:39]               │ debg TestSubjects.click(canvasWorkpadPage > canvasWorkpadPageElementContent)
[00:02:39]               │ debg Find.clickByCssSelector('[data-test-subj="canvasWorkpadPage"] [data-test-subj="canvasWorkpadPageElementContent"]') with timeout=20000
[00:02:39]               │ debg Find.findByCssSelector('[data-test-subj="canvasWorkpadPage"] [data-test-subj="canvasWorkpadPageElementContent"]') with timeout=20000
[00:02:39]               │ debg TestSubjects.click(canvasWorkpadEditMenuButton)
[00:02:39]               │ debg Find.clickByCssSelector('[data-test-subj="canvasWorkpadEditMenuButton"]') with timeout=20000
[00:02:39]               │ debg Find.findByCssSelector('[data-test-subj="canvasWorkpadEditMenuButton"]') with timeout=20000
[00:02:40]               │ debg TestSubjects.click(canvasWorkpadEditMenu__saveElementButton)
[00:02:40]               │ debg Find.clickByCssSelector('[data-test-subj="canvasWorkpadEditMenu__saveElementButton"]') with timeout=20000
[00:02:40]               │ debg Find.findByCssSelector('[data-test-subj="canvasWorkpadEditMenu__saveElementButton"]') with timeout=20000
[00:02:40]               │ debg TestSubjects.setValue(canvasCustomElementForm-name, My New Element)
[00:02:40]               │ debg TestSubjects.click(canvasCustomElementForm-name)
[00:02:40]               │ debg Find.clickByCssSelector('[data-test-subj="canvasCustomElementForm-name"]') with timeout=10000
[00:02:40]               │ debg Find.findByCssSelector('[data-test-subj="canvasCustomElementForm-name"]') with timeout=10000
[00:02:40]               │ debg TestSubjects.setValue(canvasCustomElementForm-description, An excellent new element)
[00:02:40]               │ debg TestSubjects.click(canvasCustomElementForm-description)
[00:02:40]               │ debg Find.clickByCssSelector('[data-test-subj="canvasCustomElementForm-description"]') with timeout=10000
[00:02:40]               │ debg Find.findByCssSelector('[data-test-subj="canvasCustomElementForm-description"]') with timeout=10000
[00:02:41]               │ debg TestSubjects.click(canvasCustomElementForm-submit)
[00:02:41]               │ debg Find.clickByCssSelector('[data-test-subj="canvasCustomElementForm-submit"]') with timeout=10000
[00:02:41]               │ debg Find.findByCssSelector('[data-test-subj="canvasCustomElementForm-submit"]') with timeout=10000
[00:02:41]               │ debg TestSubjects.exists(canvasCustomElementCreate-success)
[00:02:41]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="canvasCustomElementCreate-success"]') with timeout=30000
[00:02:42]               │ debg --- retry.tryForTime error: [data-test-subj="canvasCustomElementCreate-success"] is not displayed
[00:02:42]               └- ✓ pass  (3.2s) "Canvas app custom elements creates a custom element from an element when prompted"
[00:02:42]             └-> adds the custom element to the workpad when prompted
[00:02:42]               └-> "before each" hook: global before each
[00:02:42]               │ debg TestSubjects.click(add-element-button)
[00:02:42]               │ debg Find.clickByCssSelector('[data-test-subj="add-element-button"]') with timeout=10000
[00:02:42]               │ debg Find.findByCssSelector('[data-test-subj="add-element-button"]') with timeout=10000
[00:02:42]               │ debg TestSubjects.click(saved-elements-menu-option)
[00:02:42]               │ debg Find.clickByCssSelector('[data-test-subj="saved-elements-menu-option"]') with timeout=10000
[00:02:42]               │ debg Find.findByCssSelector('[data-test-subj="saved-elements-menu-option"]') with timeout=10000
[00:02:42]               │ debg Find.findByCssSelector('.canvasElementCard__wrapper') with timeout=10000
[00:02:43]               │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional/screenshots/failure/Canvas app custom elements adds the custom element to the workpad when prompted.png"
[00:02:43]               │ info Current URL is: http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:43]               │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional/failure_debug/html/Canvas app custom elements adds the custom element to the workpad when prompted.html
[00:02:43]               └- ✖ fail: "Canvas app custom elements adds the custom element to the workpad when prompted"
[00:02:43]               │

Stack Trace

Error: expected '' to contain 'My New Element'
    at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.contain (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:442:10)
    at Context.it (test/functional/apps/canvas/custom_elements.ts:68:53)
    at process._tickCallback (internal/process/next_tick.js:68:7)

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

@jen-huang jen-huang merged commit fa5585f into elastic:7.x Jun 10, 2020
@jen-huang jen-huang deleted the backport/7.x/pr-68583 branch June 10, 2020 01:10
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