Add script to identify plugin dependencies for TS project references migration#80463
Merged
mshustov merged 19 commits intoelastic:masterfrom Oct 16, 2020
Merged
Conversation
based on kibana.json declaration, so it doesn't provide all the cases
mshustov
commented
Oct 14, 2020
mshustov
commented
Oct 14, 2020
spalger
reviewed
Oct 14, 2020
Contributor
|
Pinging @elastic/kibana-platform (Team:Platform) |
spalger
reviewed
Oct 15, 2020
Comment on lines
+64
to
+69
| version: manifest.version!, | ||
| kibanaVersion: manifest.kibanaVersion || manifest.version!, | ||
| requiredPlugins: Array.isArray(manifest.requiredPlugins) ? manifest.requiredPlugins : [], | ||
| optionalPlugins: Array.isArray(manifest.optionalPlugins) ? manifest.optionalPlugins : [], | ||
| requiredBundles: Array.isArray(manifest.requiredBundles) ? manifest.requiredBundles : [], | ||
| extraPublicDirs: Array.isArray(manifest.extraPublicDirs) ? manifest.extraPublicDirs : [], |
Contributor
There was a problem hiding this comment.
Rather than assume these properties are set and their types are correct please validate their existence above.
Contributor
Author
There was a problem hiding this comment.
I added validations in plain js. What if we switch to @kbn/config-schema here?
only run plugin discovery once to speed up circular dep detection
spalger
approved these changes
Oct 15, 2020
Contributor
spalger
left a comment
There was a problem hiding this comment.
Couple nits if you don't mind, but LGTM otherwise
Contributor
💚 Build SucceededMetrics [docs]distributable file count
History
To update your PR or re-run it, just comment with: |
mshustov
added a commit
to mshustov/kibana
that referenced
this pull request
Oct 16, 2020
…migration (elastic#80463) * move kbn-dev-utils plugin helpers under a dedicated folder * use getPluginSearchPaths in kbn-config & kbn-optimizer * add a script to find plugin dependencies not migrated to TS project refs * update docs * add a script reporting all circular deps between plugins based on kibana.json declaration, so it doesn't provide all the cases * fix optimizer scan logic. removed by mistake * revert changes. fails on CI * remove prod depenedency on kbn/dev-utils * remove last export * only run plugin discovery once to speed up circular dep detection * address comments * address comments * update fixtures Co-authored-by: spalger <spalger@users.noreply.github.com>
mshustov
added a commit
that referenced
this pull request
Oct 16, 2020
…migration (#80463) (#80811) * move kbn-dev-utils plugin helpers under a dedicated folder * use getPluginSearchPaths in kbn-config & kbn-optimizer * add a script to find plugin dependencies not migrated to TS project refs * update docs * add a script reporting all circular deps between plugins based on kibana.json declaration, so it doesn't provide all the cases * fix optimizer scan logic. removed by mistake * revert changes. fails on CI * remove prod depenedency on kbn/dev-utils * remove last export * only run plugin discovery once to speed up circular dep detection * address comments * address comments * update fixtures Co-authored-by: spalger <spalger@users.noreply.github.com> Co-authored-by: spalger <spalger@users.noreply.github.com>
gmmorris
added a commit
to gmmorris/kibana
that referenced
this pull request
Oct 19, 2020
* master: (51 commits) [Discover] Unskip flaky test (elastic#80670) Fix security solution template label (elastic#80754) [Ingest]: ignore 404, check if there are transforms in results. (elastic#80721) Moving loader to logo in header, add a slight 250ms pause (elastic#78879) [Security Solution][Cases] Fix bug with case connectors (elastic#80642) Update known-plugins.asciidoc (elastic#75388) [Lens] Add median operation (elastic#79453) Fix navigateToApp logic when navigating to the current app. (elastic#80809) [Visualizations] Fix bad color mapping with multiple split series (elastic#80801) [ILM] Add esErrorHandler for the new es js client (elastic#80302) Fix codeowners (elastic#80826) skip flaky suite (elastic#79463) [Timelion] Remove kui usage (elastic#80287) [Ingest Manager] add skipIfNoDockerRegistry to package_install_complete test (elastic#80779) [Alerting UI] Disable "Save" button for Alerts with broken Connectors (elastic#80579) Allow the default space to be accessed via `/s/default` (elastic#77109) Add script to identify plugin dependencies for TS project references migration (elastic#80463) [Search] Client side session service (elastic#76889) feat: 🎸 add separator for different context menu groups (elastic#80498) Lazy load reporting (elastic#80492) ...
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.
Summary
Closes #79343
Adds a script
node scripts/find_plugins_without_ts_refs.js --id your_plugin_idto report what plugin deps haven't been migrated to TS project refs yet and what circular deps have been detected.output for
node scripts/find_plugins_without_ts_refs.js --id dataAdds a script
node scripts/find_plugin_circular_deps.jsto report circular deps between all the plugins in the repo. It analyzes deps declared inkibana.jsononly. Thus, it doesn't detect circular type imports, imports betweencommonandserverfolders - these problems should be solved by #78162 I'm going to remove this script as soon as #78162 lands.output: