TobKed commented on a change in pull request #8553:
URL: https://github.com/apache/airflow/pull/8553#discussion_r508222533



##########
File path: airflow/providers/google/cloud/hooks/dataflow.py
##########
@@ -694,29 +710,23 @@ def _build_dataflow_job_name(job_name: str, 
append_job_name: bool = True) -> str
         return safe_job_name
 
     @staticmethod
-    def _build_cmd(variables: Dict, label_formatter: Callable, project_id: 
str) -> List[str]:
-        command = [
-            "--runner=DataflowRunner",
-            "--project={}".format(project_id),
-        ]
-        if variables is None:
-            return command
-
+    def _options_to_args(variables: Dict):
+        if not variables:
+            return []
         # The logic of this method should be compatible with Apache Beam:
         # 
https://github.com/apache/beam/blob/b56740f0e8cd80c2873412847d0b336837429fb9/sdks/python/
         # apache_beam/options/pipeline_options.py#L230-L251
+        args: List[str] = []
         for attr, value in variables.items():
-            if attr == 'labels':
-                command += label_formatter(value)
-            elif value is None:
-                command.append(f"--{attr}")
+            if value is None:

Review comment:
       Done :)




----------------------------------------------------------------
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


Reply via email to