Abacn commented on code in PR #29474:
URL: https://github.com/apache/beam/pull/29474#discussion_r1397900192


##########
sdks/python/apache_beam/options/pipeline_options.py:
##########
@@ -343,14 +349,16 @@ def get_all_options(
           continue
         if i + 1 >= len(unknown_args) or unknown_args[i + 1].startswith('-'):
           split = unknown_args[i].split('=', 1)
+          _warning_unknown_arg_found(split[0])

Review Comment:
   there might be multiple warnings may causing excessive logging. Shall we 
emit only single warning that listing all unknown options after the while block?



##########
sdks/python/apache_beam/options/pipeline_options.py:
##########
@@ -343,14 +349,16 @@ def get_all_options(
           continue
         if i + 1 >= len(unknown_args) or unknown_args[i + 1].startswith('-'):
           split = unknown_args[i].split('=', 1)
+          _warning_unknown_arg_found(split[0])
           if len(split) == 1:
             parser.add_argument(unknown_args[i], action='store_true')
           else:
             parser.add_argument(split[0], type=str)
           i += 1
         elif unknown_args[i].startswith('--'):
+          _warning_unknown_arg_found(unknown_args[i])
           parser.add_argument(unknown_args[i], type=str)
-          i += 2
+          i += 1

Review Comment:
   was this a bug?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to