amoghrajesh commented on code in PR #59711:
URL: https://github.com/apache/airflow/pull/59711#discussion_r2645181926
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -512,19 +512,12 @@ def _create_ti_state_update_query_and_update_state(
query = update(TI).where(TI.id == ti_id_str)
- # This is slightly inefficient as we deserialize it to then right
again serialize it in the sqla
- # TypeAdapter.
- next_kwargs = None
- if ti_patch_payload.next_kwargs:
- from airflow.serialization.serialized_objects import
BaseSerialization
-
- next_kwargs =
BaseSerialization.deserialize(ti_patch_payload.next_kwargs)
-
+ # Store next_kwargs directly (already serialized by worker)
query = query.values(
state=TaskInstanceState.DEFERRED,
trigger_id=trigger_row.id,
next_method=ti_patch_payload.next_method,
- next_kwargs=next_kwargs,
+ next_kwargs=ti_patch_payload.next_kwargs,
Review Comment:
Now that I think of it, technically its better if we go as dict[str,
JsonValue]?
No point of widening to `JsonValue`?
--
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]