-
Notifications
You must be signed in to change notification settings - Fork 916
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
Default to converting folder name for cli plugin to kebab-case #357
Default to converting folder name for cli plugin to kebab-case #357
Conversation
❌ DCO Check Failed 41460d3 |
41460d3
to
12a803d
Compare
✅ DCO Check Passed 12a803d |
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, thanks for the change!
We should have a test for this, too. But don't let that hold the merge. |
Signed-off-by: Vacha Shah <[email protected]>
12a803d
to
917c078
Compare
✅ DCO Check Passed 917c078 |
Sure. I have also made a change when checking the existing installation for a plugin which is a pre-check to installing the plugin. I think the |
@@ -62,7 +63,7 @@ export async function install(settings, logger) { | |||
|
|||
assertVersion(settings); | |||
|
|||
const targetDir = path.join(settings.pluginDir, settings.plugins[0].id); | |||
const targetDir = path.join(settings.pluginDir, kebabCase(settings.plugins[0].id)); |
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.
@VachaShah does this have any co-relation with removing plugin as well ? https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/cli_plugin/remove/remove.js
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.
@VachaShah does this have any co-relation with removing plugin as well ? https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/cli_plugin/remove/remove.js
This would not affect the removing plugin logic as it does not take into consideration the plugin id.
This can be done later, but now that we are duplicating logic I would introduce |
Sure, I can do this as part of the second item on the checklist. |
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 ! Thanks @VachaShah for the fix.
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!
Signed-off-by: Vacha Shah <[email protected]>
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 <[email protected]>
#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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
#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 <[email protected]>
#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 <[email protected]>
…ebab-case (opensearch-project#357)" (opensearch-project#578)" This reverts commit 45df886.
Description
This change intends to default the folder name for plugins being installed through cli to kebab-case.
To test the change, I ran
./bin/opensearch-dashboards-plugin install file:///anomalyDetectionDashboards-1.0.0.0-beta1.zip
to verify the folder name generated which is now in kebab-case:anomaly-detection-dashboards
.Issues Resolved
Part 1 of #322
Check List