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] Copy dateAsStringRt to observability plugin (#82839) #82918

Merged
merged 1 commit into from
Nov 8, 2020

Conversation

smith
Copy link
Contributor

@smith smith commented Nov 8, 2020

Backports the following commits to 7.x:

Observability was importing `dateAsStringRt` from APM, which creates an implicit circular dependency between the two plugins.

Copy that function into where it was being used in observability to remove the dependency.

Related to elastic#80508.
@smith smith added the backport label Nov 8, 2020
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Chrome UI Functional Tests.test/functional/apps/discover/_discover·js.discover app discover app refresh interval should refetch when autofresh is enabled

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:00:00]         └-: discover app
[00:00:00]           └-> "before all" hook
[00:00:00]           └-> "before all" hook
[00:04:03]           └-: discover app
[00:04:03]             └-> "before all" hook
[00:04:03]             └-> "before all" hook
[00:04:03]               │ debg replacing kibana config doc: {"defaultIndex":"logstash-*"}
[00:04:04]               │ debg load kibana index with default index pattern
[00:04:04]               │ info [discover] Loading "mappings.json"
[00:04:04]               │ info [discover] Loading "data.json.gz"
[00:04:04]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana_1/6LbJEMubTIy0n5GAIMwm3g] deleting index
[00:04:04]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana_2/4A8eHQDkThKjIZa2764dig] deleting index
[00:04:04]               │ info [discover] Deleted existing index [".kibana_2",".kibana_1"]
[00:04:04]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana] creating index, cause [api], templates [], shards [1]/[1]
[00:04:04]               │ info [discover] Created index ".kibana"
[00:04:04]               │ debg [discover] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:04:04]               │ info [discover] Indexed 2 docs into ".kibana"
[00:04:04]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana/zq1FP-m5QGiRPX0w4oBghg] update_mapping [_doc]
[00:04:04]               │ debg Migrating saved objects
[00:04:04]               │ proc [kibana]   log   [01:39:59.488] [info][savedobjects-service] Creating index .kibana_2.
[00:04:04]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1]
[00:04:04]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] updating number_of_replicas to [0] for indices [.kibana_2]
[00:04:04]               │ proc [kibana]   log   [01:39:59.542] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:04:04]               │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1]
[00:04:04]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] updating number_of_replicas to [0] for indices [.kibana_1]
[00:04:04]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] 1846 finished with response BulkByScrollResponse[took=16.5ms,timed_out=false,sliceId=null,updated=0,created=2,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:05]               │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana/zq1FP-m5QGiRPX0w4oBghg] deleting index
[00:04:05]               │ proc [kibana]   log   [01:39:59.875] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:04:05]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana_2/APNP6WagT5-r_l5HVan1Xw] update_mapping [_doc]
[00:04:05]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana_2/APNP6WagT5-r_l5HVan1Xw] update_mapping [_doc]
[00:04:05]               │ proc [kibana]   log   [01:39:59.949] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:04:05]               │ proc [kibana]   log   [01:39:59.976] [info][savedobjects-service] Finished in 490ms.
[00:04:05]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:04:05]               │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1604798169897902288] [.kibana_2/APNP6WagT5-r_l5HVan1Xw] update_mapping [_doc]
[00:04:06]               │ info [logstash_functional] Loading "mappings.json"
[00:04:06]               │ info [logstash_functional] Loading "data.json.gz"
[00:04:06]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.22"
[00:04:06]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.20"
[00:04:06]               │ info [logstash_functional] Skipped restore for existing index "logstash-2015.09.21"
[00:04:07]               │ debg discover
[00:04:07]               │ debg navigating to discover url: http://localhost:61241/app/discover#/
[00:04:07]               │ debg navigate to: http://localhost:61241/app/discover#/
[00:04:07]               │ debg browser[INFO] http://localhost:61241/app/discover?_t=1604799602597#/ 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:04:07]               │
[00:04:07]               │ debg browser[INFO] http://localhost:61241/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:04:07]               │ debg ... sleep(700) start
[00:04:08]               │ debg ... sleep(700) end
[00:04:08]               │ debg returned from get, calling refresh
[00:04:09]               │ debg browser[INFO] http://localhost:61241/app/discover?_t=1604799602597#/ 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:04:09]               │
[00:04:09]               │ debg browser[INFO] http://localhost:61241/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:04:09]               │ debg currentUrl = http://localhost:61241/app/discover#/
[00:04:09]               │          appUrl = http://localhost:61241/app/discover#/
[00:04:09]               │ debg TestSubjects.find(kibanaChrome)
[00:04:09]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:04:09]               │ debg ... sleep(501) start
[00:04:09]               │ debg ... sleep(501) end
[00:04:09]               │ debg in navigateTo url = http://localhost:61241/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:04:09]               │ debg --- retry.try error: URL changed, waiting for it to settle
[00:04:10]               │ debg ... sleep(501) start
[00:04:10]               │ debg ... sleep(501) end
[00:04:10]               │ debg in navigateTo url = http://localhost:61241/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!())
[00:04:10]               │ debg TestSubjects.exists(statusPageContainer)
[00:04:10]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:04:13]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:04:13]               │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:04:13]               │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:04:13]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:04:13]               │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:04:13]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:04:13]               │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:04:13]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:04:13]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:04:13]               │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:04:13]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:04:13]               │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:04:13]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:04:13]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:04:14]               │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:04:14]               │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:04:14]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:04:14]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:04:14]               │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:04:14]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:04:14]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:04:14]               │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 23, 2015 @ 18:31:44.000)
[00:04:14]               │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:04:14]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:04:14]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:04:14]               │ debg TestSubjects.click(superDatePickerstartDatePopoverButton)
[00:04:14]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:04:14]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=10000
[00:04:14]               │ debg Find.waitForElementStale with timeout=10000
[00:04:14]               │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:04:14]               │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:04:14]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:04:14]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:04:15]               │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:04:15]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:04:15]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:04:15]               │ debg TestSubjects.setValue(superDatePickerAbsoluteDateInput, Sep 19, 2015 @ 06:31:44.000)
[00:04:15]               │ debg TestSubjects.click(superDatePickerAbsoluteDateInput)
[00:04:15]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:04:15]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteDateInput"]') with timeout=10000
[00:04:15]               │ debg TestSubjects.exists(superDatePickerApplyTimeButton)
[00:04:15]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerApplyTimeButton"]') with timeout=2500
[00:04:17]               │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerApplyTimeButton"] is not displayed
[00:04:18]               │ debg TestSubjects.click(querySubmitButton)
[00:04:18]               │ debg Find.clickByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:04:18]               │ debg Find.findByCssSelector('[data-test-subj="querySubmitButton"]') with timeout=10000
[00:04:18]               │ debg Find.waitForElementStale with timeout=10000
[00:04:18]               │ debg TestSubjects.exists(globalLoadingIndicator-hidden)
[00:04:18]               │ debg Find.existsByCssSelector('[data-test-subj="globalLoadingIndicator-hidden"]') with timeout=100000
[00:07:01]             └-: refresh interval
[00:07:01]               └-> "before all" hook
[00:07:01]               └-> should refetch when autofresh is enabled
[00:07:01]                 └-> "before each" hook: global before each
[00:07:01]                 │ debg setting menu open state [name=QuickSelectTime Menu] [state=open]
[00:07:01]                 │ debg TestSubjects.exists(superDatePickerQuickMenu)
[00:07:01]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerQuickMenu"]') with timeout=1000
[00:07:02]                 │ debg --- retry.tryForTime error: [data-test-subj="superDatePickerQuickMenu"] is not displayed
[00:07:03]                 │ debg TestSubjects.click(superDatePickerToggleQuickMenuButton)
[00:07:03]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:07:03]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:07:03]                 │ debg TestSubjects.exists(superDatePickerQuickMenu)
[00:07:03]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerQuickMenu"]') with timeout=10000
[00:07:03]                 │ debg TestSubjects.setValue(superDatePickerRefreshIntervalInput, 5)
[00:07:03]                 │ debg TestSubjects.click(superDatePickerRefreshIntervalInput)
[00:07:03]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerRefreshIntervalInput"]') with timeout=10000
[00:07:03]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerRefreshIntervalInput"]') with timeout=10000
[00:07:03]                 │ debg setting menu open state [name=QuickSelectTime Menu] [state=open]
[00:07:03]                 │ debg TestSubjects.exists(superDatePickerQuickMenu)
[00:07:03]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerQuickMenu"]') with timeout=1000
[00:07:03]                 │ debg TestSubjects.getAttribute(superDatePickerRefreshIntervalInput, value, tryTimeout=120000, findTimeout=10000)
[00:07:03]                 │ debg TestSubjects.find(superDatePickerRefreshIntervalInput)
[00:07:03]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerRefreshIntervalInput"]') with timeout=10000
[00:07:03]                 │ debg TestSubjects.find(superDatePickerRefreshIntervalUnitsSelect)
[00:07:03]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerRefreshIntervalUnitsSelect"]') with timeout=10000
[00:07:03]                 │ debg Find.allDescendantDisplayedByCssSelector('option')
[00:07:03]                 │ debg TestSubjects.getVisibleText(superDatePickerToggleRefreshButton)
[00:07:03]                 │ debg TestSubjects.find(superDatePickerToggleRefreshButton)
[00:07:03]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerToggleRefreshButton"]') with timeout=10000
[00:07:04]                 │ debg start auto refresh
[00:07:04]                 │ debg TestSubjects.click(superDatePickerToggleRefreshButton)
[00:07:04]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerToggleRefreshButton"]') with timeout=10000
[00:07:04]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerToggleRefreshButton"]') with timeout=10000
[00:07:04]                 │ debg setting menu open state [name=QuickSelectTime Menu] [state=closed]
[00:07:04]                 │ debg TestSubjects.exists(superDatePickerQuickMenu)
[00:07:04]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerQuickMenu"]') with timeout=1000
[00:07:04]                 │ debg TestSubjects.click(superDatePickerToggleQuickMenuButton)
[00:07:04]                 │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:07:04]                 │ debg Find.findByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=10000
[00:07:04]                 │ debg Find.waitForDeletedByCssSelector('[data-test-subj="superDatePickerQuickMenu"]') with timeout=10000
[00:07:05]                 │ debg Inspector.open
[00:07:05]                 │ debg TestSubjects.exists(inspectorPanel)
[00:07:05]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="inspectorPanel"]') with timeout=2500
[00:07:08]                 │ debg --- retry.tryForTime error: [data-test-subj="inspectorPanel"] is not displayed
[00:07:08]                 │ debg TestSubjects.click(openInspectorButton)
[00:07:08]                 │ debg Find.clickByCssSelector('[data-test-subj="openInspectorButton"]') with timeout=10000
[00:07:08]                 │ debg Find.findByCssSelector('[data-test-subj="openInspectorButton"]') with timeout=10000
[00:07:09]                 │ debg TestSubjects.exists(inspectorPanel)
[00:07:09]                 │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="inspectorPanel"]') with timeout=2500
[00:07:09]                 │ debg TestSubjects.find(inspectorPanel)
[00:07:09]                 │ debg Find.findByCssSelector('[data-test-subj="inspectorPanel"]') with timeout=10000
[00:07:09]                 │ warn WebElementWrapper.getAttribute: stale element reference: element is not attached to the page document
[00:07:09]                 │        (Session info: headless chrome=86.0.4240.111)
[00:07:09]                 │ debg finding element 'By(css selector, tbody)' again, 2 attempts left
[00:07:10]                 │ warn WebElementWrapper.getAttribute: stale element reference: element is not attached to the page document
[00:07:10]                 │        (Session info: headless chrome=86.0.4240.111)
[00:07:10]                 │ debg finding element 'By(css selector, tbody)' again, 1 attempts left
[00:07:11]                 │ info Taking screenshot "/dev/shm/workspace/parallel/24/kibana/test/functional/screenshots/failure/discover app discover app refresh interval should refetch when autofresh is enabled.png"
[00:07:11]                 │ info Current URL is: http://localhost:61241/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!f,value:5000),time:(from:%272015-09-18T06:31:44.000Z%27,to:%272015-09-23T18:31:44.000Z%27))&_a=(columns:!(_source),filters:!(),index:%27logstash-*%27,interval:auto,query:(language:kuery,query:%27%27),sort:!(!(%27@timestamp%27,desc)))
[00:07:11]                 │ info Saving page source to: /dev/shm/workspace/parallel/24/kibana/test/functional/failure_debug/html/discover app discover app refresh interval should refetch when autofresh is enabled.html
[00:07:11]                 └- ✖ fail: discover app discover app refresh interval should refetch when autofresh is enabled
[00:07:11]                 │      TypeError: Cannot read property 'includes' of undefined
[00:07:11]                 │       at filter (test/functional/apps/discover/_discover.js:333:18)
[00:07:11]                 │       at Array.filter (<anonymous>)
[00:07:11]                 │       at getRequestTimestamp (test/functional/apps/discover/_discover.js:332:49)
[00:07:11]                 │       at process._tickCallback (internal/process/next_tick.js:68:7)
[00:07:11]                 │ 
[00:07:11]                 │ 

Stack Trace

TypeError: Cannot read property 'includes' of undefined
    at filter (test/functional/apps/discover/_discover.js:333:18)
    at Array.filter (<anonymous>)
    at getRequestTimestamp (test/functional/apps/discover/_discover.js:332:49)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Metrics [docs]

✅ unchanged

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

@smith smith merged commit 0fcd2dd into elastic:7.x Nov 8, 2020
@smith smith deleted the backport/7.x/pr-82839 branch November 8, 2020 04:32
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