bipinprasad commented on a change in pull request #3243: [STORM-3616] add
optional flag to fail upload-credentials cmd if no creds were uploaded
URL: https://github.com/apache/storm/pull/3243#discussion_r403305841
##########
File path: bin/storm.py
##########
@@ -541,6 +541,13 @@ def initialize_upload_credentials_subcommand(subparsers):
help="""name of the owner of the topology (security precaution)"""
)
+ # If set, this flag will become true meaning that user expects non-empty
creds to be uploaded.
+ # Command exits with non-zero code if uploaded creds collection is empty.
+ sub_parser.add_argument(
+ "-e", "--exception", action='store_true',
Review comment:
Seems there is a slight problem. In python code, when exec_java_class() is
called, the arguments to the java class is constructed partly from
main_class_args. main_class_args is constructed by simply eliminating some
arguments passed to the python code (and keeping the rest intact). So if python
code got passed "-e" ii will get passed thru to java class as "-e". However, if
"--exception was passed to python, then --exception will get passed to java.
This wont match what java class is expecting. So in order to do a passthru, the
option names should be the same, otherwise main_class_args should be suitably
modified based on the args. Looks like passthru might be preferred solution.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services