amoghrajesh commented on code in PR #45030:
URL: https://github.com/apache/airflow/pull/45030#discussion_r1890357668
##########
airflow/api_fastapi/execution_api/datamodels/taskinstance.py:
##########
@@ -83,6 +83,16 @@ class TIDeferredStatePayload(BaseModel):
next_method: str
trigger_timeout: timedelta | None = None
+ @field_validator("trigger_kwargs")
+ def validate_moment(cls, v):
+ if "moment" in v and isinstance(v["moment"], str):
+ moment_adapter = TypeAdapter(AwareDatetime)
+ try:
+ v["moment"] =
moment_adapter.validate_strings(v["moment"].replace("Z", "+00:00"))
Review Comment:
Yeah good idea, handling these
##########
airflow/api_fastapi/execution_api/datamodels/taskinstance.py:
##########
@@ -83,6 +83,16 @@ class TIDeferredStatePayload(BaseModel):
next_method: str
trigger_timeout: timedelta | None = None
+ @field_validator("trigger_kwargs")
+ def validate_moment(cls, v):
+ if "moment" in v and isinstance(v["moment"], str):
Review Comment:
Cool, handled
--
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]