Closed VachaShah closed 2 years ago
:white_check_mark: Gradle Wrapper Validation success 838229ded3c80bc2764a66935638cf71e7cfbf1b
:white_check_mark: DCO Check Passed 838229ded3c80bc2764a66935638cf71e7cfbf1b
:white_check_mark: Gradle Precommit success 838229ded3c80bc2764a66935638cf71e7cfbf1b
:white_check_mark: DCO Check Passed fc944e6d78281cd183c91826abd8467f00c728aa
:white_check_mark: Gradle Wrapper Validation success fc944e6d78281cd183c91826abd8467f00c728aa
:white_check_mark: Gradle Precommit success fc944e6d78281cd183c91826abd8467f00c728aa
We'll need a corresponding doc change I believe for 1.1, cc: @aetter, maybe point @VachaShah where to make it?
:white_check_mark: Gradle Wrapper Validation success 3f256cbc83359f6f46866102859ecfc775f33b27
:white_check_mark: DCO Check Passed 3f256cbc83359f6f46866102859ecfc775f33b27
:white_check_mark: Gradle Precommit success 3f256cbc83359f6f46866102859ecfc775f33b27
start gradle check
:x: Gradle Check failure 3f256cbc83359f6f46866102859ecfc775f33b27 Log 242
@VachaShah not sure what's up with CI failures ^
@VachaShah not sure what's up with CI failures ^
I will look into these.
I don't think changing the behavior of how opensearch-plugin
command works is a good idea. The list
subcommand should list the name of the plugins and not the folder name. Similarly to remove a plugin, the remove
subcommand should take the name of the plugin and not a folder name.
I don't think changing the behavior of how
opensearch-plugin
command works is a good idea. Thelist
subcommand should list the name of the plugins and not the folder name. Similarly to remove a plugin, theremove
subcommand should take the name of the plugin and not a folder name.
We are not changing the behavior of the list or remove commands. They still work the same way as before, I added the behavior in the description just to show the behavior. This is just to provide the user a way to customize the folder name during installation.
I don't think changing the behavior of how
opensearch-plugin
command works is a good idea. Thelist
subcommand should list the name of the plugins and not the folder name. Similarly to remove a plugin, theremove
subcommand should take the name of the plugin and not a folder name.We are not changing the behavior of the list or remove commands. They still work the same way as before, I added the behavior in the description just to show the behavior. This is just to provide the user a way to customize the folder name during installation.
Got it - Just to confirm, if I install a plugin with a custom folder name, I can still remove it using the plugin name? And when I run 'opensearch-pugin list` it still lists the original plugin name?
I don't think changing the behavior of how
opensearch-plugin
command works is a good idea. Thelist
subcommand should list the name of the plugins and not the folder name. Similarly to remove a plugin, theremove
subcommand should take the name of the plugin and not a folder name.We are not changing the behavior of the list or remove commands. They still work the same way as before, I added the behavior in the description just to show the behavior. This is just to provide the user a way to customize the folder name during installation.
Got it - Just to confirm, if I install a plugin with a custom folder name, I can still remove it using the plugin name? And when I run 'opensearch-pugin list` it still lists the original plugin name?
No the list command lists the folder name and the remove command uses the folder name to remove the plugin.
No the list command lists the folder name and the remove command uses the folder name to remove the plugin.
Okay, that's what I was referring to as a change in behavior. I think, we need to make this change in a way that keeps the old behavior as it is and doesn't break it.
No the list command lists the folder name and the remove command uses the folder name to remove the plugin.
Okay, that's what I was referring to as a change in behavior. I think, we need to make this change in a way that keeps the old behavior as it is and doesn't break it.
So we think users today think of adding/removing as using the ID not the folder. They just happen to be the same and the code uses folder. Sounds like you should be able to specify either. Rabi is right.
Currently for this feature, the things that have been done are:
Other cases that would be required to maintain the backwards compatibility as mentioned by @adnapibar:
@adnapibar @dblock Any thoughts?
Other cases that would be required to maintain the backwards compatibility as mentioned by @adnapibar:
Generally I think we need to fix everything that is broken by the change, so the entire list below.
- The list command should be backwards compatible i.e. it should still list the name of the plugin even if the plugin is installed using custom folder name.
Maybe we can add showing the plugin ID, name and folder to avoid confusion? I am not personally familiar with how this command works.
- The remove command should be backwards compatible i.e. it should still take the name of the plugin as the input even though the plugin to be removed is installed in a custom folder. For this, we might have to scan each plugin folder in order to match the plugin name with the one being passed in the command to determine which plugin needs to be removed since we do not have the custom folder name information in the command.
Agreed.
- There can be a case where the same plugin is installed with different folder names which will break OpenSearch, to prevent this, we would have to scan each plugin folder to match the name of the plugin being installed to prevent it from being installed multiple times.
I think when removing a plugin scanning the list of all known folder names is a good idea.
:white_check_mark: Gradle Wrapper Validation success 82f560f74a660e017ea19ada4e65ade83402bbc0
:white_check_mark: DCO Check Passed 82f560f74a660e017ea19ada4e65ade83402bbc0
:white_check_mark: Gradle Precommit success 82f560f74a660e017ea19ada4e65ade83402bbc0
start gradle check
:x: Gradle Check failure 82f560f74a660e017ea19ada4e65ade83402bbc0 Log 263
:white_check_mark: Gradle Wrapper Validation success 82f560f74a660e017ea19ada4e65ade83402bbc0
:white_check_mark: DCO Check Passed 82f560f74a660e017ea19ada4e65ade83402bbc0
:white_check_mark: Gradle Precommit success 82f560f74a660e017ea19ada4e65ade83402bbc0
@VachaShah looks like there are test failures?
@VachaShah looks like there are test failures?
Yeah I fixed the original ones, these are from a recent merge from main for the version change, I will fix all of them together once I have the List and Remove command features updated as well.
:white_check_mark: Gradle Wrapper Validation success cf5c0c55c95660785c9aa70fc8016fb0355e458b
:x: DCO Check Failed cf5c0c55c95660785c9aa70fc8016fb0355e458b
Run ./dev-tools/signoff-check.sh remotes/origin/main cf5c0c55c95660785c9aa70fc8016fb0355e458b
to check locally
Use git commit with -s
to add 'Signed-of-by: {EMAIL}' on impacted commits
:white_check_mark: Gradle Precommit success cf5c0c55c95660785c9aa70fc8016fb0355e458b
:white_check_mark: Gradle Wrapper Validation success 0d93b7faab4eb3a53ac64df1651cfa285ac3817f
:x: DCO Check Failed 0d93b7faab4eb3a53ac64df1651cfa285ac3817f
Run ./dev-tools/signoff-check.sh remotes/origin/main 0d93b7faab4eb3a53ac64df1651cfa285ac3817f
to check locally
Use git commit with -s
to add 'Signed-of-by: {EMAIL}' on impacted commits
:white_check_mark: Gradle Precommit success 0d93b7faab4eb3a53ac64df1651cfa285ac3817f
:x: Gradle Wrapper Validation failure d4b67eab7ee4cffb7ffea42bb59654c46f610667
:alert: Gradle Wrapper integrity has been altered
:x: DCO Check Failed d4b67eab7ee4cffb7ffea42bb59654c46f610667
Run ./dev-tools/signoff-check.sh remotes/origin/main d4b67eab7ee4cffb7ffea42bb59654c46f610667
to check locally
Use git commit with -s
to add 'Signed-of-by: {EMAIL}' on impacted commits
:white_check_mark: DCO Check Passed 7ae84050b32e1c8df1f61e29a844874a661cd1fb
:x: Gradle Precommit failure d4b67eab7ee4cffb7ffea42bb59654c46f610667 Log 792
:white_check_mark: Gradle Wrapper Validation success 7ae84050b32e1c8df1f61e29a844874a661cd1fb
:white_check_mark: Gradle Precommit success 7ae84050b32e1c8df1f61e29a844874a661cd1fb
:white_check_mark: Gradle Wrapper Validation success 45f9a5f8eb758f05d7d68d3fb0e949058800bf55
:white_check_mark: DCO Check Passed 45f9a5f8eb758f05d7d68d3fb0e949058800bf55
:white_check_mark: Gradle Precommit success 45f9a5f8eb758f05d7d68d3fb0e949058800bf55
:white_check_mark: Gradle Wrapper Validation success c77a550d57b5a2187d784839b8b7fc701ff16599
:white_check_mark: DCO Check Passed c77a550d57b5a2187d784839b8b7fc701ff16599
:white_check_mark: Gradle Precommit success c77a550d57b5a2187d784839b8b7fc701ff16599
Signed-off-by: Vacha Shah vachshah@amazon.com
Description
This PR allows the user to add a custom folder name for plugin cli installation. This custom folder name can be specified in the plugin properties file for the plugin, when this property is specified, the plugin would be installed with the custom folder name otherwise it will be installed with the name of the plugin. This feature would be available for versions after 1.0.0.
The feature includes:
install
plugin command will display the folder name where the plugin is being installed.list
plugin command will continue to display the plugin name to maintain backwards compatibility.remove
plugin command will continue to take in the plugin name to remove it even though the plugin is installed in a custom folder to maintain backwards compatibility.Testing
customFolderName
property inbuild.gradle
forjob-scheduler
plugin as follows:./opensearch-plugin install <path to build file>
, this resulted in the plugin being installed in folder:custom-folder
with an output message as follows:./opensearch-plugin list
, this resulted in the output:opensearch-job-scheduler
../opensearch-plugin remove opensearch-job-scheduler
.Issues Resolved
686
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.