Taragolis commented on PR #24306: URL: https://github.com/apache/airflow/pull/24306#issuecomment-1149984579
I'm just worry that docstring told that this argument for EMR Connection, but we assume that it could be AWS Connection https://github.com/apache/airflow/blob/01a52ccb53bc805308bd085dc51ae4674dd5eb4a/airflow/providers/amazon/aws/operators/emr.py#L288-L289 I think if we want keep it simpler, allow user to skip set `emr_conn_id` and do not allow use other connection type by mistake we could simply do this ```python config = {} if self.emr_conn_id: emr_conn = self.get_connection(self.emr_conn_id) if emr_conn.conn_type != 'emr': raise AirflowError( f"Expected 'emr' connection type for `emr_conn_id`={self.emr_conn_id} but got {emr_conn.conn_type!r}" ) config = emr_conn.extra_dejson.copy() ``` WDYT @potiuk @eladkal @pankajastro -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
