Lee-W commented on code in PR #51295:
URL: https://github.com/apache/airflow/pull/51295#discussion_r2122807816
##########
airflow-core/src/airflow/api_fastapi/execution_api/routes/task_instances.py:
##########
@@ -389,7 +389,12 @@ def ti_update_state(
updated_state=updated_state,
dag_id=dag_id,
)
- except Exception:
+ except Exception as err:
+ if isinstance(err, HTTPException) and err.status_code ==
status.HTTP_422_UNPROCESSABLE_ENTITY:
+ # We need to rebuild the query and remove "reschedule_date"which
causes DB error
+ data = ti_patch_payload.model_dump(exclude={"reschedule_date"},
exclude_unset=True)
+ query = update(TI).where(TI.id == ti_id_str).values(data)
Review Comment:
Should be doable, I think. work on it now
--
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]