tirkarthi commented on PR #58574:
URL: https://github.com/apache/airflow/pull/58574#issuecomment-3591044168

   I took some from help from AI and looked at `test_dagrun_set_state_end_date` 
which was testing end_date with same flow. It seems I need to add 
`session.add(dag_run)` so that the updates to the attribute are tracked. I 
removed the `session.merge` in core and adding `session.add(dag_run)` in tests 
seems to fix it. `print(vars(inspect(dag_run1)), vars(session.identity_map))` 
before and after `session.add` was helpful.
   
   
https://docs.sqlalchemy.org/en/20/orm/session_state_management.html#session-object-states


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