Skip to content

[6.x] Separate bulk upload behavior from CollectorSet (#19691)#20129

Merged
tsullivan merged 1 commit intoelastic:6.xfrom
tsullivan:backport/6.x/pr-19691
Jun 21, 2018
Merged

[6.x] Separate bulk upload behavior from CollectorSet (#19691)#20129
tsullivan merged 1 commit intoelastic:6.xfrom
tsullivan:backport/6.x/pr-19691

Conversation

@tsullivan
Copy link
Copy Markdown
Member

Backports the following commits to 6.x:

* Separate bulk upload behavior from CollectorSet

 - takes out a lot of behavior from CollectorSet and moves it to a class called BulkUploader
 - simplifies kibana monitoring init by taking out the indirection that startCollectorSet / createCollectorSet had
 - removes start() method from CollectorSet and calls the collector objects' init() functions from CollectorSet.register()
 - removes cleanup method from collectorSet since that was doing work for bulk uploading

* remove cleanup and fetchAfterInit methods

* test for bulk_uploader class

* improve test for collector_set

* fix reporting

* expose collectorSet if there actually is a collectorSet

* comment for enclosed function

* make collectorSet creation/expose unconditional, bulkUploader more conditional

* fix collector_set tests

* lifecycle events

* stab at collectorSet error logging from the API call

* clean up comments

* clean up comments

* fix BulkUploader mocha test

* check kibanaCollectionEnabled config before registering bulk upload and the plugin status listeners

* no singleton timer object

* just log a warning if bulk uploader start called twice

* normal quotes

* check if bulk is enabled inside of the _fetchAndUpload method

* log for stopping bulk stats

* call bulkUploader.start with the collectorSet object

* call bulkUploader.start with the collectorSet object

* roll back change for module scoped variable

* oops I broke init

* init and logging: if / elseif / elseif

* remove unnecessary check/log

* help log

* remove redundant, use data.filter.map

* use xpackInfo.onLicenseInfoChange not xpackMainPlugin.status.on('green')

* help logging

* fix unit test

* remove handler that stops upload when connection is lost
@tsullivan tsullivan added backport This PR is a backport of another PR v6.4.0 Team:Monitoring Stack Monitoring team labels Jun 21, 2018
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

@tsullivan tsullivan merged commit ab4f76b into elastic:6.x Jun 21, 2018
@tsullivan tsullivan deleted the backport/6.x/pr-19691 branch June 21, 2018 22:03
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 Team:Monitoring Stack Monitoring team v6.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants