uranusjr commented on code in PR #23628:
URL: https://github.com/apache/airflow/pull/23628#discussion_r870399139
##########
airflow/providers/amazon/aws/operators/sagemaker.py:
##########
@@ -188,7 +193,7 @@ def execute(self, context: 'Context') -> dict:
)
if response['ResponseMetadata']['HTTPStatusCode'] != 200:
raise AirflowException(f'Sagemaker Processing Job creation failed:
{response}')
- return {'Processing':
self.hook.describe_processing_job(self.config['ProcessingJobName'])}
+ return {'Processing':
serialize(self.hook.describe_processing_job(self.config['ProcessingJobName']))}
Review Comment:
Previously the value here would be a dict (that possibly contains datetime),
but with `serialize` it becomes a JSON _string_, which does not seem right to
me.
We should either encode the entire return value here, or (I think this was
mentioned somewhere else as well) use `AirflowJsonEncoder` directly in XCom’s
`serialize` function instead. Another possibility is to do an in-place replace
here to convert datetimes to strs, but that’s probably more of a hack than a
proper solution.
--
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]