uranusjr commented on code in PR #58242:
URL: https://github.com/apache/airflow/pull/58242#discussion_r2521908795
##########
airflow-core/src/airflow/dag_processing/dagbag.py:
##########
@@ -698,6 +698,16 @@ def sync_bag_to_db(
from airflow.dag_processing.collection import
update_dag_parsing_results_in_db
import_errors = {(bundle_name, rel_path): error for rel_path, error in
dagbag.import_errors.items()}
+
+ # Build the set of all files that were parsed and include files with
import errors
+ # in case they are not in file_last_changed
+ files_parsed: set[tuple[str, str]] = set()
+ if dagbag.bundle_path:
+ for abs_filepath in dagbag.file_last_changed:
+ rel_fileloc = dagbag._get_relative_fileloc(abs_filepath)
+ files_parsed.add((bundle_name, rel_fileloc))
+ files_parsed.update(import_errors.keys())
Review Comment:
```suggestion
files_parsed = set(import_errors)
if dagbag.bundle_path:
files_parsed.update(
(bundle_name, dagbag._get_relative_fileloc(abs_filepath))
for abs_filepath in dagbag.file_last_changed
)
```
--
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]