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 2022/05/29 06:52:46 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #23961: Support impersonation service account parameter for Dataflow runner

uranusjr commented on code in PR #23961:
URL: https://github.com/apache/airflow/pull/23961#discussion_r884220849


##########
airflow/providers/apache/beam/operators/beam.py:
##########
@@ -91,6 +92,13 @@ def __get_dataflow_pipeline_options(
             pipeline_options[job_name_key] = job_name
         if self.dataflow_config.service_account:
             pipeline_options["serviceAccount"] = self.dataflow_config.service_account
+        if self.dataflow_support_impersonation and self.dataflow_config.impersonation_chain:
+            if isinstance(self.dataflow_config.impersonation_chain, list):
+                pipeline_options["impersonateServiceAccount"] = ",".join(
+                    self.dataflow_config.impersonation_chain
+                )
+            else:
+                pipeline_options["impersonateServiceAccount"] = self.dataflow_config.impersonation_chain

Review Comment:
   Instead of needing an extra flag, is it possible to always add the `impersonateServiceAccount` value? Or would it error if it’s present when not applicable?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org