jaketf commented on a change in pull request #5602: [AIRFLOW-4983]
Feature/dataflow operator python3
URL: https://github.com/apache/airflow/pull/5602#discussion_r306556878
##########
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:
Ok. I want to allow user to specify a minor version of interpreter if they
want. But we can let `self._start_dataflow()` fail if it's unsupported version
or if user specifies minor version that is not available on their system.
1. Removed this check
1. I default to `python2` or `python3` based on major version of the
`sys.version_info` of this airflow process.
----------------------------------------------------------------
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