-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Implement recursive plugin discovery #68811
Merged
pgayvallet
merged 18 commits into
elastic:master
from
pgayvallet:kbn-59189-recursive-plugin-discovery
Jun 30, 2020
Merged
Changes from 11 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
debfb67
implements recursive scanning in plugin discovery system
pgayvallet 8228bcd
update optimizer to find plugins in sub-directories
pgayvallet 0cf4f90
update renovate
pgayvallet 5645711
update optimizer IT snapshot
pgayvallet 1a398ca
Merge remote-tracking branch 'upstream/master' into kbn-59189-recursi…
pgayvallet 7f68ba1
Merge remote-tracking branch 'upstream/master' into kbn-59189-recursi…
pgayvallet c709bed
Merge remote-tracking branch 'upstream/master' into kbn-59189-recursi…
pgayvallet f011c93
Merge remote-tracking branch 'upstream/master' into kbn-59189-recursi…
pgayvallet 5c00548
refactor processPluginSearchPaths$ and add test for inaccessible mani…
pgayvallet 3cea30e
Merge remote-tracking branch 'upstream/master' into kbn-59189-recursi…
pgayvallet fa308bf
add symlink test
pgayvallet 245cc4f
add maxDepth to the optimizer
pgayvallet 6bc7cc8
adapt mockFs definitions
pgayvallet f25b051
Merge remote-tracking branch 'upstream/master' into kbn-59189-recursi…
pgayvallet c05880a
Merge remote-tracking branch 'upstream/master' into kbn-59189-recursi…
pgayvallet 9dfbf16
remove `flat` usage
pgayvallet 9b67058
Merge remote-tracking branch 'upstream/master' into kbn-59189-recursi…
pgayvallet 39f2765
Merge remote-tracking branch 'upstream/master' into kbn-59189-recursi…
pgayvallet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 6 additions & 6 deletions
12
packages/kbn-optimizer/src/integration_tests/__snapshots__/basic_optimization.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparing this diff with the changes in
plugins_discovery.ts
made me cry a little.Note that the optimizer does not exactly reproduce the logic used in the discovery system:
maxDepth
However, I think this is acceptable. Worse case some plugins will be build that are not going to be discovered by core's discovery system. But that would be detected during the development phase anyway. (and implementing the exact same logic would cause
findKibanaPlatformPlugins
to become way more complex than its currently is)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if we could have some sort of maxDepth by using a (very unreadable) glob like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either that or
Which is a little longer (even if it can be extracted to a function), but probably more explicit.
Not 100% sure this is really needed (as it doesn't address the second point), but I have no problem implementing that if we think it's a little better can current implem.
wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's err on the side of caution here and go ahead and do that. Optimizer is already slow as it is, let's be defensive.