Skip to content

Comments

[7.x] Don't start pollEsNodesVersion unless someone subscribes (#56923)#58946

Merged
rudolf merged 1 commit intoelastic:7.xfrom
rudolf:backport/7.x/pr-56923
Mar 2, 2020
Merged

[7.x] Don't start pollEsNodesVersion unless someone subscribes (#56923)#58946
rudolf merged 1 commit intoelastic:7.xfrom
rudolf:backport/7.x/pr-56923

Conversation

@rudolf
Copy link
Contributor

@rudolf rudolf commented Feb 28, 2020

Backports the following commits to 7.x:

* Don't start pollEsNodesVersion unless someone subscribes

By not polling until subscribed to, we prevent verbose error logs when
the optimizer is run (which automatically skips migrations).

* Test pollEsNodeVersions behaviour

* Cleanup unused code

* PR Feedback

* Make test more stable

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@rudolf rudolf added the backport This PR is a backport of another PR label Feb 28, 2020
@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-oss-agent / Chrome UI Functional Tests.test/functional/apps/timelion/_expression_typeahead·js.timelion app expression typeahead "before all" hook

Link to Jenkins

Standard Out

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

[00:00:00]       │
[00:02:58]         └-: timelion app
[00:02:58]           └-> "before all" hook
[00:02:58]           └-> "before all" hook
[00:02:58]             │ debg Starting timelion before method
[00:02:58]             │ info [logstash_functional] Loading "mappings.json"
[00:02:59]             │ info [logstash_functional] Loading "data.json.gz"
[00:02:59]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [logstash-2015.09.22] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:02:59]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.22][0]]]).
[00:02:59]             │ info [logstash_functional] Created index "logstash-2015.09.22"
[00:02:59]             │ debg [logstash_functional] "logstash-2015.09.22" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:02:59]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [logstash-2015.09.20] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:02:59]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.20][0]]]).
[00:02:59]             │ info [logstash_functional] Created index "logstash-2015.09.20"
[00:02:59]             │ debg [logstash_functional] "logstash-2015.09.20" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:02:59]             │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [logstash-2015.09.21] creating index, cause [api], templates [], shards [1]/[0], mappings [_doc]
[00:02:59]             │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:02:59]             │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:02:59]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[logstash-2015.09.21][0]]]).
[00:02:59]             │ info [logstash_functional] Created index "logstash-2015.09.21"
[00:02:59]             │ debg [logstash_functional] "logstash-2015.09.21" settings {"index":{"analysis":{"analyzer":{"url":{"max_token_length":"1000","tokenizer":"uax_url_email","type":"standard"}}},"number_of_replicas":"0","number_of_shards":"1"}}
[00:03:01]             │ debg --- retry.try failed again with the same message...
[00:03:02]             │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:02]             │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:04]             │ debg --- retry.try failed again with the same message...
[00:03:05]             │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:05]             │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:07]             │ debg --- retry.try failed again with the same message...
[00:03:08]             │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:08]             │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:08]             │ info progress: 12643
[00:03:09]             │ info [logstash_functional] Indexed 4633 docs into "logstash-2015.09.22"
[00:03:09]             │ info [logstash_functional] Indexed 4757 docs into "logstash-2015.09.20"
[00:03:09]             │ info [logstash_functional] Indexed 4614 docs into "logstash-2015.09.21"
[00:03:10]             │ debg replacing kibana config doc: {"defaultIndex":"logstash-*"}
[00:03:10]           └-: expression typeahead
[00:03:10]             └-> "before all" hook
[00:03:10]               │ debg --- retry.try failed again with the same message...
[00:03:10]             └-> "before all" hook
[00:03:10]               │ debg replacing kibana config doc: {"defaultIndex":"logstash-*"}
[00:03:11]               │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:11]               │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:11]               │ debg load kibana index
[00:03:11]               │ info [timelion] Loading "mappings.json"
[00:03:11]               │ info [timelion] Loading "data.json.gz"
[00:03:11]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana_2/v1xDQ8KcQEyaCffoaBK3Ng] deleting index
[00:03:11]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana_3/l5_m4-C1TvOJ0lRrkAODjA] deleting index
[00:03:11]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana_1/ORKRkrMZRbSM2vdrQbghlg] deleting index
[00:03:12]               │ info [timelion] Deleted existing index [".kibana_2",".kibana_1",".kibana_3"]
[00:03:12]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:12]               │ info [timelion] Created index ".kibana"
[00:03:12]               │ debg [timelion] ".kibana" settings {"index":{"number_of_replicas":"1","number_of_shards":"1"}}
[00:03:12]               │ info [timelion] Indexed 1 docs into ".kibana"
[00:03:12]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana/0CCsRQHwRqezphLe8dMnew] update_mapping [_doc]
[00:03:12]               │ debg Migrating saved objects
[00:03:12]               │ proc [kibana]   log   [21:57:44.655] [info][savedobjects-service] Creating index .kibana_2.
[00:03:12]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana_2] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:12]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] updating number_of_replicas to [0] for indices [.kibana_2]
[00:03:12]               │ proc [kibana]   log   [21:57:44.739] [info][savedobjects-service] Reindexing .kibana to .kibana_1
[00:03:12]               │ info [o.e.c.m.MetaDataCreateIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana_1] creating index, cause [api], templates [], shards [1]/[1], mappings [_doc]
[00:03:12]               │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] updating number_of_replicas to [0] for indices [.kibana_1]
[00:03:12]               │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] 2640 finished with response BulkByScrollResponse[took=52.5ms,timed_out=false,sliceId=null,updated=0,created=1,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:03:12]               │ info [o.e.c.m.MetaDataDeleteIndexService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana/0CCsRQHwRqezphLe8dMnew] deleting index
[00:03:12]               │ proc [kibana]   log   [21:57:45.131] [info][savedobjects-service] Migrating .kibana_1 saved objects to .kibana_2
[00:03:12]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana_2/YqhM8-FXSZ-WoXKfpckipw] update_mapping [_doc]
[00:03:12]               │ proc [kibana]   log   [21:57:45.190] [info][savedobjects-service] Pointing alias .kibana to .kibana_2.
[00:03:12]               │ proc [kibana]   log   [21:57:45.266] [info][savedobjects-service] Finished in 613ms.
[00:03:12]               │ debg applying update to kibana config: {"accessibility:disableAnimations":true,"dateFormat:tz":"UTC"}
[00:03:13]               │ info [o.e.c.m.MetaDataMappingService] [kibana-ci-immutable-ubuntu-16-tests-xl-1582925734083118565] [.kibana_2/YqhM8-FXSZ-WoXKfpckipw] update_mapping [_doc]
[00:03:13]               │ debg --- retry.try failed again with the same message...
[00:03:14]               │ debg navigating to timelion url: http://localhost:6111/app/timelion
[00:03:14]               │ debg Navigate to: http://localhost:6111/app/timelion
[00:03:14]               │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:14]               │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:14]               │ debg ... sleep(700) start
[00:03:14]               │ debg browser[INFO] http://localhost:6111/app/timelion?_t=1582927066790 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:03:14]               │
[00:03:14]               │ debg browser[INFO] http://localhost:6111/bundles/app/timelion/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:03:15]               │ debg ... sleep(700) end
[00:03:15]               │ debg returned from get, calling refresh
[00:03:18]               │ debg browser[INFO] http://localhost:6111/bundles/plugin/data/data.plugin.js 62:139970 "INFO: 2020-02-28T21:57:49Z
[00:03:18]               │        Adding connection to http://localhost:6111/elasticsearch
[00:03:18]               │
[00:03:18]               │      "
[00:03:18]               │ debg browser[INFO] http://localhost:6111/app/timelion?_t=1582927066790#/?_g=() 350 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:03:18]               │
[00:03:18]               │ debg browser[INFO] http://localhost:6111/bundles/app/timelion/bootstrap.js 9:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:03:18]               │ debg --- retry.try failed again with the same message...
[00:03:18]               │ debg currentUrl = http://localhost:6111/app/timelion#/?_g=()
[00:03:18]               │          appUrl = http://localhost:6111/app/timelion
[00:03:18]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:03:19]               │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:19]               │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:21]               │ debg browser[INFO] http://localhost:6111/bundles/plugin/data/data.plugin.js 62:139970 "INFO: 2020-02-28T21:57:52Z
[00:03:21]               │        Adding connection to http://localhost:6111/elasticsearch
[00:03:21]               │
[00:03:21]               │      "
[00:03:21]               │ debg ... sleep(501) start
[00:03:21]               │ debg ... sleep(501) end
[00:03:23]               │ debg in navigateTo url = http://localhost:6111/app/timelion#/?_g=()&_a=(columns:2,interval:auto,rows:2,selected:0,sheet:!(%27.es(*)%27))
[00:03:23]               │ debg TestSubjects.exists(statusPageContainer)
[00:03:23]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:03:23]               │ debg --- retry.try failed again with the same message...
[00:03:24]               │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:24]               │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:28]               │ debg --- retry.try failed again with the same message...
[00:03:28]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:03:29]               │ debg TestSubjects.exists(filter filter-disabled filter-key-geo.src filter-value-IN)
[00:03:29]               │ debg Find.existsByCssSelector('[data-test-subj="filter filter-disabled filter-key-geo.src filter-value-IN"]') with timeout=2500
[00:03:31]               │ debg --- retry.try failed again with the same message...
[00:03:31]               │ debg Setting absolute range to Sep 19, 2015 @ 06:31:44.000 to Sep 23, 2015 @ 18:31:44.000
[00:03:31]               │ debg TestSubjects.exists(superDatePickerToggleQuickMenuButton)
[00:03:31]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerToggleQuickMenuButton"]') with timeout=20000
[00:03:31]               │ debg TestSubjects.exists(superDatePickerShowDatesButton)
[00:03:31]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=2500
[00:03:32]               │ debg TestSubjects.click(superDatePickerShowDatesButton)
[00:03:32]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:03:32]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerShowDatesButton"]') with timeout=10000
[00:03:32]               │ debg TestSubjects.exists(superDatePickerstartDatePopoverButton)
[00:03:32]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="superDatePickerstartDatePopoverButton"]') with timeout=2500
[00:03:32]               │ debg TestSubjects.click(superDatePickerendDatePopoverButton)
[00:03:32]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:03:32]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerendDatePopoverButton"]') with timeout=10000
[00:03:32]               │ debg Find.findByCssSelector('div.euiPopover__panel-isOpen') with timeout=10000
[00:03:32]               │ debg TestSubjects.click(superDatePickerAbsoluteTab)
[00:03:32]               │ debg Find.clickByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:03:32]               │ debg Find.findByCssSelector('[data-test-subj="superDatePickerAbsoluteTab"]') with timeout=10000
[00:03:32]               └- ✖ fail: "timelion app expression typeahead "before all" hook"
[00:03:32]               │

Stack Trace

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

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

@rudolf rudolf merged commit 5b84760 into elastic:7.x Mar 2, 2020
@rudolf rudolf deleted the backport/7.x/pr-56923 branch March 2, 2020 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants