[7.x] [Task Manager] Cleans up legacy plugin structure (#80381)#81139
Merged
gmmorris merged 1 commit intoelastic:7.xfrom Oct 20, 2020
Merged
[7.x] [Task Manager] Cleans up legacy plugin structure (#80381)#81139gmmorris merged 1 commit intoelastic:7.xfrom
gmmorris merged 1 commit intoelastic:7.xfrom
Conversation
This PR addresses a list of legacy code debt the plugin has incurred over the past year due to extensive changes in its internals and the adoption of the Kibana Platform. It includes: 1. The `TaskManager` class has been split into several independent components: `TaskTypeDictionary`, `TaskPollingLifecycle`, `TaskScheduling`, `Middleware`. This has made it easier to understand the roles of the different parts and makes it easier to plug them into the observability work. 2. The exposed `mocks` have been corrected to correctly express the Kibana Platform api 3. The lifecycle has been corrected to remove the need for intermediary streames/promises which we're needed when we first introduced the `setup`/`start` lifecycle to support legacy. 4. The Logger mocks have been replaced with the platform's `coreMocks` implementation 5. The integration tests now test the plugin's actual public api (instead of the internals). 6. The Legacy Elasticsearch client has been replaced with the typed client in response to the deprecation notice. 7. Typing has been narrowed to prevent the `type` field from conflicting with the key in the `TaskDictionary`. This could have caused the displayed `type` on a task to differ from the `type` used in the Dictionary itself (this broke a test during refactoring and could have caused a bug in production code if left).
Contributor
💚 Build SucceededMetrics [docs]
To update your PR or re-run it, just comment with: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports the following commits to 7.x: