fenglu-g commented on a change in pull request #5602: [AIRFLOW-4983]
Feature/dataflow operator python3
URL: https://github.com/apache/airflow/pull/5602#discussion_r306527023
##########
File path: airflow/contrib/hooks/gcp_dataflow_hook.py
##########
@@ -381,17 +392,24 @@ def start_python_dataflow(self, job_name, variables,
dataflow, py_options,
:type dataflow: str
:param py_options: Additional options.
:type py_options: list
+ :param py_interpreter: Python version of the beam pipeline.
+ This defaults to the python version that airflow is running.
+ :type py_interpreter: str
:param append_job_name: True if unique suffix has to be appended to
job name.
:type append_job_name: bool
"""
+ if not py_interpreter:
+ py_interpreter = 'python' + '.'.join(map(str,
sys.version_info[0:2]))
+ if py_interpreter not in DATAFLOW_SUPPORTED_PY_INTERPRETERS:
Review comment:
This check seems a bit restrictive to me and introduces the burden of
backfilling latest supported python versions (e.g., 3.8). How about we go with
py2/3 and let self._start_dataflow() fail by itself?
----------------------------------------------------------------
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