You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "liferoad (via GitHub)" <gi...@apache.org> on 2023/03/22 19:42:04 UTC

[GitHub] [beam] liferoad commented on a diff in pull request #25920: [Python] Ignore unknown args with single dash

liferoad commented on code in PR #25920:
URL: https://github.com/apache/beam/pull/25920#discussion_r1145323776


##########
sdks/python/apache_beam/options/pipeline_options.py:
##########
@@ -347,9 +347,16 @@ def get_all_options(
           else:
             parser.add_argument(split[0], type=str)
           i += 1
-        else:
+        elif unknown_args[i].startswith('--'):
           parser.add_argument(unknown_args[i], type=str)
           i += 2
+        else:
+          # skip all binary flags used with '-' and not '--'.
+          # ex: using -f instead of --f (or --flexrs_goal) will prevent
+          # argument validation before job submission and can be incorrectly

Review Comment:
   shall we log these as warning? @tvalentyn 



-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org