-
Notifications
You must be signed in to change notification settings - Fork 906
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
Proposal: Allow custom plugin path when installing #322
Comments
I think we should do four things here, in order of priority:
|
I can take this. |
This is what we are shipping in Beta 1.
to match OpenSearch plugin naming convention these should become
|
@dblock typical notation in dashboards has directories be in snake case, including the preinstalled plugins. Is it more important to be consistent with the OpenSearch plugins or existing Dashboards plugins / ecosystem? |
This is what I'm thinking:
WDYT @ohltyler ? |
@dblock Definitely agree about not using camel case. I guess my question was more about should we try to be consistent with the OpenSearch plugins (using |
Thanks for reminding me it's called |
I think |
Let's relocate the preinstalled plugins too then? cc: @VachaShah |
@dblock to limit the blast radius, should we limit the changes to only default the new plugins installed via cli to be |
Those paths aren't APIs, so I would say we can make that change, better now than later, but I also don't feel strongly about it. |
I discussed with @nknize on this, he mentioned that if there is no directory name convention enforcement code, then we would be fine to rename the pre-installed ones and not break anything. A little side track to that I also found that the folder name for the same plugin is different when installed through cli vs copied to
Now the cli install has a check for existing install, so the second time I try to install the same plugin through cli, it recognizes it and does not allow the installation to go through. So there are a few things here:
@dblock Please let me know if you have any preferences here. |
Also, for the pre-installed plugins, it looks like its not just the folder names but also sub-folders and files all in snake_case. For example for plugin Do we want to change all of this to kebab-case? |
It's clearly not a logical or desired behavior, I would open bugs (and fix them). I'd expect that installing a plugin via whatever way produces the same result.
Agreed.
Agreed.
I think you now have identified a whole bunch of problems and I am looking forward to fixes! |
I think that the answer is yes because it will make it all consistent. We should also document this in the docs, and in https://github.com/opensearch-project/opensearch-plugins/blob/main/CONVENTIONS.md once we're done. |
@dblock I think we should just make changes for external plugin for now and not change any internal ones. We should do that gradually as part of 2.0 as it doesn't have user facing requirement after understanding their code bas and reasons for it. |
@mihirsoni Don't feel strongly about it, your call! |
If we can do it gradually with smaller PRs, to ensure no git history is lost as well functional tests passes on each one should be good, my only point s we can keep making progress, I remember kibana had earlier using Overall my point was, not to add any scope for GA, we can do it as part of 1.1 and keep making progress. Just my thoughts if we have extra bandwidth to take care we'll take in. |
opensearch-project#357)" This reverts commit 747ef8e. Reverting for now because the full impact is not known and requires subsequent commits to mitigate confusion related to CLI output. Also, it seems like in the code there exists verification on the code that plugins should explicitly be camelCase. So this merits more discussion. Issues related: opensearch-project#322 opensearch-project#465 opensearch-project#366 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
#357)" (#578) This reverts commit 747ef8e. Reverting for now because the full impact is not known and requires subsequent commits to mitigate confusion related to CLI output. Also, it seems like in the code there exists verification on the code that plugins should explicitly be camelCase. So this merits more discussion. Issues related: #322 #465 #366 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
opensearch-project#357)" (opensearch-project#578) This reverts commit 747ef8e. Reverting for now because the full impact is not known and requires subsequent commits to mitigate confusion related to CLI output. Also, it seems like in the code there exists verification on the code that plugins should explicitly be camelCase. So this merits more discussion. Issues related: opensearch-project#322 opensearch-project#465 opensearch-project#366 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
opensearch-project#357)" (opensearch-project#578) This reverts commit 747ef8e. Reverting for now because the full impact is not known and requires subsequent commits to mitigate confusion related to CLI output. Also, it seems like in the code there exists verification on the code that plugins should explicitly be camelCase. So this merits more discussion. Issues related: opensearch-project#322 opensearch-project#465 opensearch-project#366 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
#357)" (#583) This reverts commit 747ef8e. Reverting for now because the full impact is not known and requires subsequent commits to mitigate confusion related to CLI output. Also, it seems like in the code there exists verification on the code that plugins should explicitly be camelCase. So this merits more discussion. Issues related: #322 #465 #366 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
#357)" (#584) This reverts commit 747ef8e. Reverting for now because the full impact is not known and requires subsequent commits to mitigate confusion related to CLI output. Also, it seems like in the code there exists verification on the code that plugins should explicitly be camelCase. So this merits more discussion. Issues related: #322 #465 #366 Signed-off-by: Kawika Avilla <kavilla414@gmail.com>
@tmarkley What's the plan with this? Do we have next steps? |
To provide further insight. When generating plugins, the plugin does come out as the format as snake case.
produces: During the build process
Will produce a zip based on the ID of the plugin because at this point the folder name of the plugin can be anything it can be camelCase. So the build process relies on producing a camelCase zip of the plugin. When installing, the build process doesn't care about the name of the file just as long as it can find it. It unzips it and then targets a folder that uses the ID. If we would like we can modify the following line to convert the camelCase to snake_case: So that when it produces the plugin it can follow the format as core plugins. That or build in the functionality that lets the plugin folder name be specified as dB mentioned. My opinion is to not prioritize the specifying the zip name when running yarn plugin-helpers build. The output can be easily renamed with one command as opposed to adding a new argument. We can create a good first issue for that. As far as the kebab vs snake_case, I don't think it's worth the amount of risk anymore. |
@kavilla This is over a year old - can we close? |
Signed-off-by: Hailong Cui <ihailong@amazon.com>
Signed-off-by: Hailong Cui <ihailong@amazon.com>
) * Add workspace filter into saved objects page (#211) * Add workspace column/filter into saved objects page Signed-off-by: Hailong Cui <ihailong@amazon.com> fix failed test case Signed-off-by: Hailong Cui <ihailong@amazon.com> move workspace column to its own folder Signed-off-by: Hailong Cui <ihailong@amazon.com> * default workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> fix test case Signed-off-by: Hailong Cui <ihailong@amazon.com> add test case Signed-off-by: Hailong Cui <ihailong@amazon.com> remove hide import Signed-off-by: Hailong Cui <ihailong@amazon.com> * address review comments Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> * replace default workspace with public workspace (#322) Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add workspace filter Signed-off-by: Hailong Cui <ihailong@amazon.com> * revert query params change Signed-off-by: Hailong Cui <ihailong@amazon.com> * udpate test case name to more clear Signed-off-by: Hailong Cui <ihailong@amazon.com> * support public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add changelog Signed-off-by: Hailong Cui <ihailong@amazon.com> * update fetchExportByTypeAndSearch parameter Co-authored-by: SuZhou-Joe <suzhou@amazon.com> Signed-off-by: Hailong Cui <ihailong@amazon.com> * remove virtrual public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * update comments Signed-off-by: Hailong Cui <ihailong@amazon.com> * fix public workspace query when permission is not enabled Signed-off-by: Hailong Cui <ihailong@amazon.com> * home dashboards/listing page only show public workspace data Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add more test case Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
…ensearch-project#6458) * Add workspace filter into saved objects page (opensearch-project#211) * Add workspace column/filter into saved objects page Signed-off-by: Hailong Cui <ihailong@amazon.com> fix failed test case Signed-off-by: Hailong Cui <ihailong@amazon.com> move workspace column to its own folder Signed-off-by: Hailong Cui <ihailong@amazon.com> * default workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> fix test case Signed-off-by: Hailong Cui <ihailong@amazon.com> add test case Signed-off-by: Hailong Cui <ihailong@amazon.com> remove hide import Signed-off-by: Hailong Cui <ihailong@amazon.com> * address review comments Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> * replace default workspace with public workspace (opensearch-project#322) Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add workspace filter Signed-off-by: Hailong Cui <ihailong@amazon.com> * revert query params change Signed-off-by: Hailong Cui <ihailong@amazon.com> * udpate test case name to more clear Signed-off-by: Hailong Cui <ihailong@amazon.com> * support public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add changelog Signed-off-by: Hailong Cui <ihailong@amazon.com> * update fetchExportByTypeAndSearch parameter Co-authored-by: SuZhou-Joe <suzhou@amazon.com> Signed-off-by: Hailong Cui <ihailong@amazon.com> * remove virtrual public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * update comments Signed-off-by: Hailong Cui <ihailong@amazon.com> * fix public workspace query when permission is not enabled Signed-off-by: Hailong Cui <ihailong@amazon.com> * home dashboards/listing page only show public workspace data Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add more test case Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
…ensearch-project#6458) * Add workspace filter into saved objects page (opensearch-project#211) * Add workspace column/filter into saved objects page Signed-off-by: Hailong Cui <ihailong@amazon.com> fix failed test case Signed-off-by: Hailong Cui <ihailong@amazon.com> move workspace column to its own folder Signed-off-by: Hailong Cui <ihailong@amazon.com> * default workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> fix test case Signed-off-by: Hailong Cui <ihailong@amazon.com> add test case Signed-off-by: Hailong Cui <ihailong@amazon.com> remove hide import Signed-off-by: Hailong Cui <ihailong@amazon.com> * address review comments Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> * replace default workspace with public workspace (opensearch-project#322) Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add workspace filter Signed-off-by: Hailong Cui <ihailong@amazon.com> * revert query params change Signed-off-by: Hailong Cui <ihailong@amazon.com> * udpate test case name to more clear Signed-off-by: Hailong Cui <ihailong@amazon.com> * support public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add changelog Signed-off-by: Hailong Cui <ihailong@amazon.com> * update fetchExportByTypeAndSearch parameter Co-authored-by: SuZhou-Joe <suzhou@amazon.com> Signed-off-by: Hailong Cui <ihailong@amazon.com> * remove virtrual public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * update comments Signed-off-by: Hailong Cui <ihailong@amazon.com> * fix public workspace query when permission is not enabled Signed-off-by: Hailong Cui <ihailong@amazon.com> * home dashboards/listing page only show public workspace data Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add more test case Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: SuZhou-Joe <suzhou@amazon.com>
) * Add workspace filter into saved objects page (#211) * Add workspace column/filter into saved objects page Signed-off-by: Hailong Cui <ihailong@amazon.com> fix failed test case Signed-off-by: Hailong Cui <ihailong@amazon.com> move workspace column to its own folder Signed-off-by: Hailong Cui <ihailong@amazon.com> * default workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> fix test case Signed-off-by: Hailong Cui <ihailong@amazon.com> add test case Signed-off-by: Hailong Cui <ihailong@amazon.com> remove hide import Signed-off-by: Hailong Cui <ihailong@amazon.com> * address review comments Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> * replace default workspace with public workspace (#322) Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add workspace filter Signed-off-by: Hailong Cui <ihailong@amazon.com> * revert query params change Signed-off-by: Hailong Cui <ihailong@amazon.com> * udpate test case name to more clear Signed-off-by: Hailong Cui <ihailong@amazon.com> * support public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add changelog Signed-off-by: Hailong Cui <ihailong@amazon.com> * update fetchExportByTypeAndSearch parameter Co-authored-by: SuZhou-Joe <suzhou@amazon.com> Signed-off-by: Hailong Cui <ihailong@amazon.com> * remove virtrual public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * update comments Signed-off-by: Hailong Cui <ihailong@amazon.com> * fix public workspace query when permission is not enabled Signed-off-by: Hailong Cui <ihailong@amazon.com> * home dashboards/listing page only show public workspace data Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add more test case Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: SuZhou-Joe <suzhou@amazon.com> (cherry picked from commit 9408e49) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md
) (#6580) * Add workspace filter into saved objects page (#211) * Add workspace column/filter into saved objects page Signed-off-by: Hailong Cui <ihailong@amazon.com> fix failed test case Signed-off-by: Hailong Cui <ihailong@amazon.com> move workspace column to its own folder Signed-off-by: Hailong Cui <ihailong@amazon.com> * default workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> fix test case Signed-off-by: Hailong Cui <ihailong@amazon.com> add test case Signed-off-by: Hailong Cui <ihailong@amazon.com> remove hide import Signed-off-by: Hailong Cui <ihailong@amazon.com> * address review comments Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> * replace default workspace with public workspace (#322) Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add workspace filter Signed-off-by: Hailong Cui <ihailong@amazon.com> * revert query params change Signed-off-by: Hailong Cui <ihailong@amazon.com> * udpate test case name to more clear Signed-off-by: Hailong Cui <ihailong@amazon.com> * support public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add changelog Signed-off-by: Hailong Cui <ihailong@amazon.com> * update fetchExportByTypeAndSearch parameter Co-authored-by: SuZhou-Joe <suzhou@amazon.com> Signed-off-by: Hailong Cui <ihailong@amazon.com> * remove virtrual public workspace Signed-off-by: Hailong Cui <ihailong@amazon.com> * update comments Signed-off-by: Hailong Cui <ihailong@amazon.com> * fix public workspace query when permission is not enabled Signed-off-by: Hailong Cui <ihailong@amazon.com> * home dashboards/listing page only show public workspace data Signed-off-by: Hailong Cui <ihailong@amazon.com> * Add more test case Signed-off-by: Hailong Cui <ihailong@amazon.com> --------- Signed-off-by: Hailong Cui <ihailong@amazon.com> Signed-off-by: SuZhou-Joe <suzhou@amazon.com> Co-authored-by: SuZhou-Joe <suzhou@amazon.com> (cherry picked from commit 9408e49) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Describe the solution you'd like
Currently, when installing a plugin to dashboards via
./opensearch-dashboards-plugin-install file://<zip>
, the plugin folder name is automatically created using the plugin id here, which is currently required to be camel case. This will create plugin folders looking likeOpenSearch-Dashboards/plugins/<camelCasePluginId>
. A camel case folder name doesn't follow standard naming conventions within Dashboards. For example, preinstalled plugins are in snake case (see here).I propose to either change the default created directory for installed plugins to follow the conventions of snake case, or add a field in
opensearch_dashboards.json
config files for plugins to allow setting a custom plugin path.The text was updated successfully, but these errors were encountered: