dakshin-k commented on code in PR #26949:
URL: https://github.com/apache/airflow/pull/26949#discussion_r996398584


##########
airflow/providers/amazon/aws/hooks/emr.py:
##########
@@ -118,13 +128,13 @@ def create_job_flow(self, job_flow_overrides: dict[str, 
Any]) -> dict[str, Any]:
                         stacklevel=2,
                     )
                 config = emr_conn.extra_dejson.copy()
-        config.update(job_flow_overrides)
+        config.update(**job_flow_overrides)

Review Comment:
   @Taragolis:
   
   >I thought IDE warn because it decide that `RunJobFlowInputRequestTypeDef` 
not suitable for dict.update
   
   Yep, the warning was similar to that. The exact warning was `Expected type 
'Mapping[_KT, _VT]', got 'RunJobFlowInputRequestTypeDef'` instead
   
    
   
   >`job_flow_overrides` might not be `RunJobFlowInputRequestTypeDef`
   
   According to the docs in that PR (and confirmed by the 
[usage](https://github.com/apache/airflow/blob/fb741fd87254e235f99d7d67e558dafad601f253/airflow/providers/amazon/aws/hooks/emr.py#L121-L123)
 of job_flow_overrides), the result after overriding will be used in the boto3 
emr client `run_job_flow` method. So, any values used in `job_flow_overrides` 
needs to be a subset of the possible values from 
`RunJobFlowInputRequestTypeDef`.
   
   Please let me know if I'm missing something.



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

Reply via email to