You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/10/02 17:02:56 UTC
[GitHub] [airflow] mik-laj commented on a change in pull request #11167: Fix example_gcp_dataflow_template
mik-laj commented on a change in pull request #11167:
URL: https://github.com/apache/airflow/pull/11167#discussion_r498941945
##########
File path: airflow/providers/google/cloud/hooks/dataflow.py
##########
@@ -556,9 +558,42 @@ def start_template_dataflow(
:type on_new_job_id_callback: callable
:param location: Job location.
:type location: str
+ :type environment: Optional, Map of job runtime environment options.
+
+ .. seealso::
+ For more information on possible configurations, look at the API documentation
+ `https://cloud.google.com/dataflow/pipelines/specifying-exec-params
+ <https://cloud.google.com/dataflow/docs/reference/rest/v1b3/RuntimeEnvironment>`__
+
+ :type environment: Optional[dict]
"""
name = self._build_dataflow_job_name(job_name, append_job_name)
+ environment = environment or {}
+ environment_keys = [
+ 'numWorkers',
+ 'maxWorkers',
+ 'zone',
+ 'serviceAccountEmail',
+ 'tempLocation',
+ 'bypassTempDirValidation',
+ 'machineType',
+ 'additionalExperiments',
+ 'network',
+ 'subnetwork',
+ 'additionalUserLabels',
+ ]
+
+ for key in variables:
+ if key in environment_keys:
+ if key in environment:
+ self.log.warning(
+ "'%s' parameter in 'variables' will update value of "
Review comment:
```suggestion
"'%s' parameter in 'variables' will override of "
```
----------------------------------------------------------------
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:
users@infra.apache.org