amoghrajesh commented on code in PR #67418:
URL: https://github.com/apache/airflow/pull/67418#discussion_r3294945349
##########
airflow-core/src/airflow/api_fastapi/execution_api/datamodels/task_state.py:
##########
@@ -19,17 +19,26 @@
from datetime import datetime
+from pydantic import JsonValue, field_validator
+
from airflow.api_fastapi.core_api.base import StrictBaseModel
class TaskStateResponse(StrictBaseModel):
"""Task state value returned to a worker."""
- value: str
+ value: JsonValue
Review Comment:
Using `math.isfinite` for it:
```python
>>> import math
>>> math.isfinite(float("nan"))
False
>>> math.isfinite(1.2344)
True
```
--
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]