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] [SIEM] NP Plugin dependency cleanup (#64842) #64955

Merged
merged 2 commits into from
May 4, 2020

Conversation

rylnd
Copy link
Contributor

@rylnd rylnd commented Apr 30, 2020

Backports the following commits to 7.x:

* Remove static src dependencies from kibana.json

We are only importing static code from these plugins, and not consuming
their plugin contracts. For this reason, we can safely remove them from
kibana.json as that imported code will always be included in our own
bundle.

* Make usageCollection an optional dependency

If it's not enabled, we simply use a noop for our tracker call.

* Remove unused plugin contracts

These are only needed when we're actually using them in our codebase.
For request handler contexts, we only need our kibana.json declaration.

* Remove unnecessary try/catch

With the addition of the null coalescing, the only chance for an error
is in usageCollection. However, if the usageCollection contract changes,
we should get a type error long before we see a runtime error.

* Improve typings of our Plugin classes

* passes missing generic arguments to public plugin interface
* passes missing generic arguments to both plugins' CoreSetup types

* Don't re-export core types

Instead, import them from core as needed.
@rylnd rylnd added the backport label Apr 30, 2020
@rylnd
Copy link
Contributor Author

rylnd commented Apr 30, 2020

@elasticmachine merge upstream

1 similar comment
@rylnd
Copy link
Contributor Author

rylnd commented May 4, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@rylnd rylnd merged commit c8e1efa into elastic:7.x May 4, 2020
@rylnd rylnd deleted the backport/7.x/pr-64842 branch May 4, 2020 20:04
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.

3 participants