kaxil commented on code in PR #59711:
URL: https://github.com/apache/airflow/pull/59711#discussion_r2644488405


##########
task-sdk/src/airflow/sdk/api/datamodels/_generated.py:
##########
@@ -181,10 +181,10 @@ class TIDeferredStatePayload(BaseModel):
     )
     state: Annotated[Literal["deferred"] | None, Field(title="State")] = 
"deferred"
     classpath: Annotated[str, Field(title="Classpath")]
-    trigger_kwargs: Annotated[dict[str, Any] | str | None, 
Field(title="Trigger Kwargs")] = None
+    trigger_kwargs: Annotated[JsonValue | str | None, Field(title="Trigger 
Kwargs")] = None
     trigger_timeout: Annotated[timedelta | None, Field(title="Trigger 
Timeout")] = None
     next_method: Annotated[str, Field(title="Next Method")]
-    next_kwargs: Annotated[dict[str, Any] | None, Field(title="Next Kwargs")] 
= None
+    next_kwargs: JsonValue | None = None

Review Comment:
   `JsonValue` is `dict | list | str | int | float | bool | None` in Pydantic. 
But `next_kwargs` is semantically always a dict - it represents keyword 
arguments that get unpacked as `**next_kwargs` in `execute_callable(context, 
**next_kwargs)`. Changing the type to `JsonValue` is incorrect because:
   
   serde output is still a dict: `serde.serialize({"foo": datetime})` returns 
`{"foo": {"__classname__": ...}}` - the outer container is still a dict



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