SameerMesiah97 commented on code in PR #63035:
URL: https://github.com/apache/airflow/pull/63035#discussion_r2927967220


##########
providers/amazon/src/airflow/providers/amazon/aws/executors/aws_lambda/lambda_executor.py:
##########
@@ -473,13 +531,12 @@ def try_adopt_task_instances(self, tis: 
Sequence[TaskInstance]) -> Sequence[Task
             ]:
                 for ti, ser_task_key in serialized_task_keys:
                     try:
-                        task_key = 
TaskInstanceKey.from_dict(json.loads(ser_task_key))
+                        data = json.loads(ser_task_key)
+                        task_key = TaskInstanceKey.from_dict(data)
                     except Exception:
-                        # If that task fails to deserialize, we should just 
skip it.
-                        self.log.exception(
-                            "Task failed to be adopted because the key could 
not be deserialized"
-                        )
-                        continue
+                        # Callback workloads use string keys.
+                        task_key = ser_task_key
+

Review Comment:
   I have kept the functional aspects of `try_adopt_task_instances` the same as 
in my first attempt for now. Once @ferruzzi  confirms whether or not this needs 
to handle callbacks (even if it is just logging exceptions), I will adjust this 
accordingly.



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