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

[kbn-plugin-generator] using dashes as plugin name breaks kibana plugin recognition #20524

Closed
markov00 opened this issue Jul 6, 2018 · 2 comments
Labels
bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@markov00
Copy link
Member

markov00 commented Jul 6, 2018

If you run the plugin generator with a plugin name with dash in it, like new-vis-plugin it will create a plugin folder in snake_case new_vis_plugin and but the package.json name parameter still in kebabC-case new-vis-plugin.
This will cause an error in the optimizer that can't find the plugin because folder name and package.json name are different.

Solutions are:

  1. keep the same for folder and package.json
  2. force the folder naming and package.json to the same snake_case format
@markov00 markov00 added the Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc label Jul 6, 2018
@markov00 markov00 changed the title [kbn-plugin-generator] using dash in plugin name results in mixed plugin [kbn-plugin-generator] using dashes as plugin name breaks kibana plugin recognition Jul 9, 2018
@markov00 markov00 added the bug Fixes for quality problems that affect the customer experience label Jul 9, 2018
@aaronoah
Copy link
Contributor

I recently came across the same issue in designing a new vis plugin. It sounds reasonable to keep them the same. Will pick it up

@aaronoah
Copy link
Contributor

aaronoah commented Jul 14, 2018

I also saw some config fields in kibana.Plugin that should be given snakeCase naming instead of kebabCase.

Provide a fix: #20808

spalger pushed a commit that referenced this issue Jul 17, 2018
<!--
Thank you for your interest in and contributing to Kibana! There
are a few simple things to check before submitting your pull request
that can help with the review process. You should delete these items
from your submission, but they are here to help bring them to your
attention.

- Have you signed the [contributor license agreement](https://www.elastic.co/contributor-agreement)?
- Have you followed the [contributor guidelines](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md)?
- If submitting code, have you included unit tests that cover the changes?
- If submitting code, have you tested and built your code locally prior to submission with `yarn test && yarn build`?
- If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
-->
Make relevant generated files use snakeCase instead of kebabCase
Closes #20524
spalger pushed a commit to spalger/kibana that referenced this issue Jul 17, 2018
<!--
Thank you for your interest in and contributing to Kibana! There
are a few simple things to check before submitting your pull request
that can help with the review process. You should delete these items
from your submission, but they are here to help bring them to your
attention.

- Have you signed the [contributor license agreement](https://www.elastic.co/contributor-agreement)?
- Have you followed the [contributor guidelines](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md)?
- If submitting code, have you included unit tests that cover the changes?
- If submitting code, have you tested and built your code locally prior to submission with `yarn test && yarn build`?
- If submitting code, is your pull request against master? Unless there is a good reason otherwise, we prefer pull requests against master and will backport as needed.
-->
Make relevant generated files use snakeCase instead of kebabCase
Closes elastic#20524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

No branches or pull requests

2 participants