[ https://issues.apache.org/jira/browse/BEAM-9446?focusedWorklogId=411589&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-411589 ]
ASF GitHub Bot logged work on BEAM-9446: ---------------------------------------- Author: ASF GitHub Bot Created on: 28/Mar/20 01:54 Start Date: 28/Mar/20 01:54 Worklog Time Spent: 10m Work Description: ibzib commented on pull request #11189: [BEAM-9446] Retain unknown arguments when using uber jar job server. URL: https://github.com/apache/beam/pull/11189#discussion_r399604848 ########## File path: sdks/python/apache_beam/options/pipeline_options.py ########## @@ -285,10 +289,29 @@ def get_all_options( cls._add_argparse_args(parser) # pylint: disable=protected-access if add_extra_args_fn: add_extra_args_fn(parser) + known_args, unknown_args = parser.parse_known_args(self._flags) - if unknown_args: - _LOGGER.warning("Discarding unparseable args: %s", unknown_args) - result = vars(known_args) + if retain_unknown_options: + i = 0 + while i < len(unknown_args): + # Treat all unary flags as booleans, and all binary argument values as + # strings. + if i + 1 >= len(unknown_args) or unknown_args[i + 1].startswith('-'): + split = unknown_args[i].rsplit('=') Review comment: Oh, I see what you mean now. I will commit your suggestion to avoid confusion. However, I don't think we should support unrecognized `append` arguments. I don't want to have to infer complex argument types. As for the specific case of `experiments`, that will not be a problem because `experiments` is already recognized by the parser. ---------------------------------------------------------------- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 411589) Time Spent: 5h 10m (was: 5h) > FlinkRunner discards parallelism and execution_mode_for_batch pipeline options > ------------------------------------------------------------------------------ > > Key: BEAM-9446 > URL: https://issues.apache.org/jira/browse/BEAM-9446 > Project: Beam > Issue Type: Bug > Components: runner-flink > Reporter: Kyle Weaver > Assignee: Kyle Weaver > Priority: Major > Labels: portability-flink > Fix For: 2.21.0 > > Time Spent: 5h 10m > Remaining Estimate: 0h > > I need these options for TFX, but they're being discarded (I believe they are > normally supplied by the job server). -- This message was sent by Atlassian Jira (v8.3.4#803005)