shoemoney opened a new pull request, #39888:
URL: https://github.com/apache/beam/pull/39888
Fixes Yaml jinja variable exact-name collision stealing pipeline option at
sdks/python/apache_beam/yaml/main.py:64.
Bug: _preparse_jinja_flags adds every jinja_variable_flags entry as an
argparse flag without checking against known pipeline options. A jinja variable
named runner, project, temp_location, etc. captures the pipeline flag and
converts it into jinja_variables, removing it from pipeline_args.
Fix: Guard the loop by checking flag_name against
PipelineOptions.get_all_options(). If the name collides (dash normalized to
underscore), skip adding it to the jinja parser and require the variable via
--jinja_variables JSON instead.
Evidence: RED->GREEN verified with mocked PipelineOptions. Before fix,
--jinja_variable_flags=runner --runner=DirectRunner produces
--jinja_variables={"runner": "DirectRunner"} and loses the pipeline flag. After
fix, runner stays in pipeline_args and only non-colliding vars are promoted.
Dash variant temp-location also guarded. Existing behavior for non-colliding
vars unchanged.
--
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]