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] Using re2 for Timelion regular expressions (#67416) #68792

Merged
merged 1 commit into from
Jun 11, 2020

Conversation

kobelb
Copy link
Contributor

@kobelb kobelb commented Jun 10, 2020

Backports the following commits to 7.x:

* Revert "Revert "Using re2 for Timelion regular expressions (elastic#55208)""

This reverts commit c90293d.

* Updating re2 to 1.14.0. Still need to update build patching

* Extract the gzip to the destination, supporting multiple extract methods

* Adding 'node' to jest's moduleFileExtensions

'node' is in the defaults, not sure why we aren't using the defaults...
https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring

Co-authored-by: Elastic Machine <[email protected]>
@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 6 times on tracked branches: https://github.com/elastic/kibana/issues/63339

[00:00:00]       │
[00:01:28]         └-: Canvas app
[00:01:28]           └-> "before all" hook
[00:02:19]           └-: custom elements
[00:02:19]             └-> "before all" hook
[00:02:19]             └-> "before all" hook
[00:02:19]               │ info [logstash_functional] Loading "mappings.json"
[00:02:19]               │ info [logstash_functional] Loading "data.json.gz"
[00:02:19]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:02:19]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:02:19]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:02:20]               │ info [canvas/default] Loading "mappings.json"
[00:02:20]               │ info [canvas/default] Loading "data.json.gz"
[00:02:20]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1591808427719187388] [.kibana_2/h96rs04rRoCaR3-oUZEVnA] deleting index
[00:02:20]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1591808427719187388] [.kibana_1/GFkYJA-5QFqalCv9ja4dPg] deleting index
[00:02:20]               │ info [canvas/default] Deleted existing index [".kibana_2",".kibana_1"]
[00:02:20]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1591808427719187388] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:02:20]               │ info [canvas/default] Created index ".kibana_1"
[00:02:20]               │ debg [canvas/default] ".kibana_1" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:02:20]               │ info [canvas/default] Indexed 3 docs into ".kibana_1"
[00:02:20]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1591808427719187388] [.kibana_1/sZGxwsScTne9Q0DwZDih7A] update_mapping [_doc]
[00:02:20]               │ debg Migrating saved objects
[00:02:21]               │ proc [kibana]   log   [17:43:22.206] [info][savedobjects-service] Creating index .kibana_2.
[00:02:21]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1591808427719187388] [.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-16-tests-xl-1591808427719187388] updating number_of_replicas to [0] for indices [.kibana_2]
[00:02:22]               │ proc [kibana]   log   [17:43:22.313] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:02:22]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1591808427719187388] [.kibana_2/u7l0K5q3QW22adJA4QvYng] update_mapping [_doc]
[00:02:22]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1591808427719187388] [.kibana_2/u7l0K5q3QW22adJA4QvYng] update_mapping [_doc]
[00:02:22]               │ proc [kibana]   log   [17:43:22.445] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:02:22]               │ proc [kibana]   log   [17:43:22.499] [info][savedobjects-service] Finished in 295ms.
[00:02:22]               │ debg navigating to canvas url: http://localhost:6131/app/canvas#/
[00:02:22]               │ debg navigate to: http://localhost:6131/app/canvas#/
[00:02:22]               │ debg browser[INFO] http://localhost:6131/app/canvas?_t=1591811002511#/ 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:22]               │
[00:02:22]               │ 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:22]               │ debg ... sleep(700) start
[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/32330/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-06-10T17:43:24Z
[00:02:24]               │        Adding connection to http://localhost:6131/elasticsearch
[00:02:24]               │
[00:02:24]               │      "
[00:02:24]               │ERROR browser[SEVERE] http://localhost:6131/32330/bundles/core/core.entry.js 75:173126 TypeError: Failed to fetch
[00:02:24]               │          at Fetch._callee3$ (http://localhost:6131/32330/bundles/core/core.entry.js:26:69024)
[00:02:24]               │          at l (http://localhost:6131/32330/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:974718)
[00:02:24]               │          at Generator._invoke (http://localhost:6131/32330/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:974471)
[00:02:24]               │          at Generator.forEach.e.<computed> [as throw] (http://localhost:6131/32330/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:288:975075)
[00:02:24]               │          at fetch_asyncGeneratorStep (http://localhost:6131/32330/bundles/core/core.entry.js:26:63428)
[00:02:24]               │          at _throw (http://localhost:6131/32330/bundles/core/core.entry.js:26:63836)
[00:02:24]               │ debg browser[INFO] http://localhost:6131/app/canvas?_t=1591811002511#/ 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:25]               │ debg browser[INFO] http://localhost:6131/32330/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-06-10T17:43:25Z
[00:02:25]               │        Adding connection to http://localhost:6131/elasticsearch
[00:02:25]               │
[00:02:25]               │      "
[00:02:25]               │ debg currentUrl = http://localhost:6131/app/canvas#/
[00:02:25]               │          appUrl = http://localhost:6131/app/canvas#/
[00:02:25]               │ debg TestSubjects.find(kibanaChrome)
[00:02:25]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:25]               │ debg ... sleep(501) start
[00:02:25]               │ debg ... sleep(501) end
[00:02:25]               │ debg in navigateTo url = http://localhost:6131/app/canvas#/
[00:02:25]               │ debg TestSubjects.exists(statusPageContainer)
[00:02:25]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:02:28]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:02:28]               │ debg navigating to canvas url: http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:28]               │ debg navigate to: http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:29]               │ debg browser[INFO] http://localhost:6131/app/canvas?_t=1591811009259#/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:29]               │
[00:02:29]               │ 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:29]               │ debg ... sleep(700) start
[00:02:29]               │ debg ... sleep(700) end
[00:02:29]               │ debg returned from get, calling refresh
[00:02:31]               │ debg browser[INFO] http://localhost:6131/app/canvas?_t=1591811009259#/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 currentUrl = http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:31]               │          appUrl = http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:31]               │ debg TestSubjects.find(kibanaChrome)
[00:02:31]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:02:31]               │ debg browser[INFO] http://localhost:6131/32330/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 380:106115 "INFO: 2020-06-10T17:43:31Z
[00:02:31]               │        Adding connection to http://localhost:6131/elasticsearch
[00:02:31]               │
[00:02:31]               │      "
[00:02:31]               │ debg ... sleep(501) start
[00:02:32]               │ debg ... sleep(501) end
[00:02:32]               │ debg in navigateTo url = http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:32]               │ debg TestSubjects.exists(statusPageContainer)
[00:02:32]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:02:34]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:02:35]             └-> creates a custom element from an element when prompted
[00:02:35]               └-> "before each" hook: global before each
[00:02:35]               │ debg TestSubjects.click(canvasWorkpadPage > canvasWorkpadPageElementContent)
[00:02:35]               │ debg Find.clickByCssSelector('[data-test-subj="canvasWorkpadPage"] [data-test-subj="canvasWorkpadPageElementContent"]') with timeout=20000
[00:02:35]               │ debg Find.findByCssSelector('[data-test-subj="canvasWorkpadPage"] [data-test-subj="canvasWorkpadPageElementContent"]') with timeout=20000
[00:02:35]               │ debg TestSubjects.click(canvasWorkpadEditMenuButton)
[00:02:35]               │ debg Find.clickByCssSelector('[data-test-subj="canvasWorkpadEditMenuButton"]') with timeout=20000
[00:02:35]               │ debg Find.findByCssSelector('[data-test-subj="canvasWorkpadEditMenuButton"]') with timeout=20000
[00:02:35]               │ debg TestSubjects.click(canvasWorkpadEditMenu__saveElementButton)
[00:02:35]               │ debg Find.clickByCssSelector('[data-test-subj="canvasWorkpadEditMenu__saveElementButton"]') with timeout=20000
[00:02:35]               │ debg Find.findByCssSelector('[data-test-subj="canvasWorkpadEditMenu__saveElementButton"]') with timeout=20000
[00:02:36]               │ debg TestSubjects.setValue(canvasCustomElementForm-name, My New Element)
[00:02:36]               │ debg TestSubjects.click(canvasCustomElementForm-name)
[00:02:36]               │ debg Find.clickByCssSelector('[data-test-subj="canvasCustomElementForm-name"]') with timeout=10000
[00:02:36]               │ debg Find.findByCssSelector('[data-test-subj="canvasCustomElementForm-name"]') with timeout=10000
[00:02:36]               │ debg TestSubjects.setValue(canvasCustomElementForm-description, An excellent new element)
[00:02:36]               │ debg TestSubjects.click(canvasCustomElementForm-description)
[00:02:36]               │ debg Find.clickByCssSelector('[data-test-subj="canvasCustomElementForm-description"]') with timeout=10000
[00:02:36]               │ debg Find.findByCssSelector('[data-test-subj="canvasCustomElementForm-description"]') with timeout=10000
[00:02:37]               │ debg TestSubjects.click(canvasCustomElementForm-submit)
[00:02:37]               │ debg Find.clickByCssSelector('[data-test-subj="canvasCustomElementForm-submit"]') with timeout=10000
[00:02:37]               │ debg Find.findByCssSelector('[data-test-subj="canvasCustomElementForm-submit"]') with timeout=10000
[00:02:37]               │ debg TestSubjects.exists(canvasCustomElementCreate-success)
[00:02:37]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="canvasCustomElementCreate-success"]') with timeout=30000
[00:02:38]               └- ✓ pass  (2.7s) "Canvas app custom elements creates a custom element from an element when prompted"
[00:02:38]             └-> adds the custom element to the workpad when prompted
[00:02:38]               └-> "before each" hook: global before each
[00:02:38]               │ debg TestSubjects.click(add-element-button)
[00:02:38]               │ debg Find.clickByCssSelector('[data-test-subj="add-element-button"]') with timeout=10000
[00:02:38]               │ debg Find.findByCssSelector('[data-test-subj="add-element-button"]') with timeout=10000
[00:02:38]               │ debg TestSubjects.click(saved-elements-menu-option)
[00:02:38]               │ debg Find.clickByCssSelector('[data-test-subj="saved-elements-menu-option"]') with timeout=10000
[00:02:38]               │ debg Find.findByCssSelector('[data-test-subj="saved-elements-menu-option"]') with timeout=10000
[00:02:38]               │ debg Find.findByCssSelector('.canvasElementCard__wrapper') with timeout=10000
[00:02:38]               │ 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:38]               │ info Current URL is: http://localhost:6131/app/canvas#/workpad/workpad-1705f884-6224-47de-ba49-ca224fe6ec31/page/1
[00:02:38]               │ 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:38]               └- ✖ fail: "Canvas app custom elements adds the custom element to the workpad when prompted"
[00:02:38]               │

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

@kobelb kobelb merged commit 388af03 into elastic:7.x Jun 11, 2020
@kobelb kobelb deleted the backport/7.x/pr-67416 branch June 11, 2020 21:20
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