amoghrajesh commented on code in PR #67547:
URL: https://github.com/apache/airflow/pull/67547#discussion_r3309080205
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state.py:
##########
@@ -85,7 +86,9 @@ def list_asset_states(
session=session,
)
rows = session.execute(paginated).all()
- entries = [AssetStateResponse(key=r.key, value=r.value,
updated_at=r.updated_at) for r in rows]
+ entries = [
+ AssetStateResponse(key=r.key, value=json.loads(r.value),
updated_at=r.updated_at) for r in rows
Review Comment:
Same as task state — both write paths always store json.dumps(...), so no
non-JSON rows can exist. The long-lived watermark concern doesn't apply since
3.3 hasn't shipped yet.
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/public/asset_state.py:
##########
@@ -115,7 +118,7 @@ def get_asset_state(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Asset state key {key!r} not found",
)
- return AssetStateResponse(key=row.key, value=row.value,
updated_at=row.updated_at)
+ return AssetStateResponse(key=row.key, value=json.loads(row.value),
updated_at=row.updated_at)
Review Comment:
Same as above — no non-JSON rows can exist since both write paths always do
json.dumps(...) before storing.
--
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]