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

CLI tool: MultiCommand must override close method and close subcommands to close resources properly #28953

Closed
bizybot opened this issue Mar 9, 2018 · 1 comment
Assignees
Labels
>bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team

Comments

@bizybot
Copy link
Contributor

bizybot commented Mar 9, 2018

Elasticsearch version (bin/elasticsearch --version): All versions

Plugins installed: NA

JVM version (java -version): 9.0.1

OS version (uname -a if on a Unix-like system): Darwin MBP 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64

Description of the problem including expected versus actual behavior:
MultiCommand must override close method calling close method on subcommands to close resources
properly

Steps to reproduce:
Look at the source code of MultiCommand, close method is not overridden.

Provide logs (if relevant): NA

@bizybot bizybot added help wanted adoptme Awaiting CLA :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache labels Mar 9, 2018
bizybot pushed a commit to bizybot/elasticsearch that referenced this issue Mar 9, 2018
… properly

Changes done to override close method and call close on subcommands.

Closes elastic#28953
@bizybot bizybot self-assigned this Mar 9, 2018
@hub-cap hub-cap added :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache and removed :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache labels Mar 9, 2018
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@jasontedor jasontedor added :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts and removed :Core/Infra/Scripting Scripting abstractions, Painless, and Mustache labels Mar 9, 2018
bizybot pushed a commit to bizybot/elasticsearch that referenced this issue Mar 12, 2018
Handling sub command close exceptions, so others can be closed
and then rethrow exception.
Adding unit tests.

Closes elastic#28953
bizybot pushed a commit to bizybot/elasticsearch that referenced this issue Mar 13, 2018
CLI now depends on elasticsearch-core, for IOUtils.

Closes elastic#28953
bizybot pushed a commit to bizybot/elasticsearch that referenced this issue Mar 14, 2018
bizybot pushed a commit to bizybot/elasticsearch that referenced this issue Mar 15, 2018
bizybot pushed a commit to bizybot/elasticsearch that referenced this issue Mar 15, 2018
bizybot pushed a commit to bizybot/elasticsearch that referenced this issue Mar 15, 2018
bizybot pushed a commit to bizybot/elasticsearch that referenced this issue Mar 15, 2018
bizybot added a commit that referenced this issue Mar 20, 2018
* CLI Command: MultiCommand must close subcommands to release resources properly

- Changes are done to override the close method and call close on subcommands using IOUtils#close
- Unit Test

Closes #28953
@mark-vieira mark-vieira added the Team:Delivery Meta label for Delivery team label Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Delivery/Packaging RPM and deb packaging, tar and zip archives, shell and batch scripts Team:Delivery Meta label for Delivery team
Projects
None yet
Development

No branches or pull requests

5 participants