-
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
Fix paths for kibana packages used by plugins #57097
Fix paths for kibana packages used by plugins #57097
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Pinging @elastic/kibana-operations (Team:Operations) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@shaileshcheke could you please run |
cee5c9e
to
e38e500
Compare
@mistic When I executed |
@shaileshcheke try to run |
@mistic I executed |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@shaileshcheke let's try to do one last thing please, if that fails, I'll try to reproduce the PR. 1 - |
7c41982
to
889a5cc
Compare
@mistic Please check. |
This comment has been minimized.
This comment has been minimized.
@shaileshcheke you are doing everything well. Probably there is some probably when generating that file from windows that we need to look at. Meanwhile, could you please cherry pick the commit Thank you very much for your help! |
@mistic Committed changes after cherry-pick. Please check. Thanks |
@elasticmachine merge upstream |
Jenkins test this |
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.
LGTM
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
@joshdover I want to check with you before moving forward with this, since I know we have gone back and forth with where 3rd party plugins should live while in development. This PR looks to solve plugins being generated with |
Pinging @elastic/kibana-platform (Team:Platform) |
* Fix paths for kibana packages in prepare_project_dependencies(elastic#40858). * Dist/index.js after yarn build. * chore(NA): correctly include kbm pm new dist file * Commit after cherry-pick 985c85c from recreation branch. Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Fix paths for kibana packages in prepare_project_dependencies(elastic#40858). * Dist/index.js after yarn build. * chore(NA): correctly include kbm pm new dist file * Commit after cherry-pick 985c85c from recreation branch. Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Fix paths for kibana packages in prepare_project_dependencies(#40858). * Dist/index.js after yarn build. * chore(NA): correctly include kbm pm new dist file * Commit after cherry-pick 985c85c from recreation branch. Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Shailesh cheke <shailesh.cheke@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
* Fix paths for kibana packages in prepare_project_dependencies(#40858). * Dist/index.js after yarn build. * chore(NA): correctly include kbm pm new dist file * Commit after cherry-pick 985c85c from recreation branch. Co-authored-by: Tiago Costa <tiagoffcc@hotmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Shailesh cheke <shailesh.cheke@gmail.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Kibana Platform plugins are only supported in const isKibanaDep = (depVersion: string) =>
// For ../kibana-extra/ directory (legacy only)
depVersion.includes('../../kibana/packages/') ||
// For plugins/ directory
depVersion.includes('../../packages/'); |
Thanks for the feedback @joshdover, I'll make that change and add you as a reviewer 😃 |
@joshdover Thanks for feedback. Thanks @mistic. |
Summary
When we try to install kibana plugin,
This plugin is using
link:dependencies for non-Kibana packages
is thrown by prepare_project_dependencies.ts.The reason is kibana plugins uses link dependencies in package.json for kibana packages ex: "@kbn/i18n": "link:../../packages/kbn-i18n".
When we try to install such plugins, function prepareExternalProjectDependencies from prepare_project_dependencies.ts(@kbn-pm) is executed which check for dependencies that are listed in package.json.
and it throws error mentioned above if we use link dependencies for non kibana package. It checks if dependency is kibana package in function isKibanaDep which checks if ../../kibana is there in dependency version string.
When issue #33728 was resolved, paths in package_template.json in plugin generator("@kbn/i18n": "link:../../kibana/packages/kbn-i18n") was replaced by @kbn/i18n": "link:../../packages/kbn-i18n".
It seems from #33728 and respective pull request that kibana packages path is ../../packages(since v7.2.0). Hence path in prepare_project_dependencies.ts needs to be fixed. #