kjh0623 commented on PR #69845:
URL: https://github.com/apache/airflow/pull/69845#issuecomment-5000215975

   Thanks @Vamsi-klu for the thorough recheck — all points addressed in 364a7d0:
   
   sync_bag_to_db() now forwards the path: it passes 
bundle_path=dagbag.bundle_path to update_dag_parsing_results_in_db(), so the 
CLI / dag.test() path no longer falls back to full_file_path() inside the 
transaction.
   End-to-end regression test: added 
test_sync_bag_to_db_does_not_call_full_file_path, which builds a real DagBag 
over a broken DAG file and goes through sync_bag_to_db() (not the private 
helper). full_file_path is patched with side_effect=AssertionError, so the test 
fails immediately if any production caller stops forwarding bundle_path.
   Existing-error branch coverage: added 
test_existing_import_error_listener_uses_bundle_path_without_full_file_path, 
which pre-creates a ParseImportError row and asserts 
on_existing_dag_import_error receives the bundle_path-based filename without 
hitting full_file_path() or the extra select.
   Belt and braces: while revisiting this I also restored a cheap has_listeners 
early exit in _update_import_errors. Threading bundle_path covers the known 
callers, but any caller that doesn't thread it down would still have hit the 
bundle-instantiating fallback in the no-listener case — the original bug. With 
the gate, the listener arguments aren't computed at all when no listener plugin 
is registered (covered by 
test_import_error_persisted_without_listener_or_bundle_path).
   Title / body / AI disclosure: refreshed to describe the current bundle_path 
implementation, and the disclosure now names the tool.
   Ready for CI whenever a maintainer can approve the workflows.


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