hussein-awala opened a new pull request, #54957:
URL: https://github.com/apache/airflow/pull/54957

   Today, the `on_asset_changed` listener receives a copy of the asset loaded 
from the database. However, the extra metadata may be added or updated at 
runtime.
   
   This PR updates the asset instance sent to the listener to ensure it 
includes the correct extra metadata.
   
   ## Summary of tests without the fix:
   ```
   
============================================================================= 
short test summary info 
=============================================================================
   FAILED 
airflow-core/tests/unit/listeners/test_asset_listener.py::test_asset_listener_on_asset_changed_with_dynamic_extra
 - AssertionError: assert equals failed
     {}                 {'key': 'value'}
   FAILED 
airflow-core/tests/unit/listeners/test_asset_listener.py::test_asset_listener_on_asset_changed_with_template_extra
 - AssertionError: assert equals failed
     {'task_id': '{{ ti.task_id }}'}   {'task_id': 'test_task'}
   ===================================================================== 2 
failed, 1 passed, 1 warning in 6.51s 
======================================================================
   ```


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