Shlomit-B commented on issue #53971: URL: https://github.com/apache/airflow/issues/53971#issuecomment-3189469447
@ashb After digging more into the code: Regarding the decorator - I realized it would really only make sense for DAG generator functions. For regular DAGs it doesn’t fit well. The context manager will work in way more cases, so I think it’s better to just stick with that for now. For the __airflow_dag_parsing_errors part, currently `ParseImportError` stores one error per file. If multiple DAGs fail in a file, only the last error is saved. With per-DAG error handling, this won’t work. Possible approaches: 1. **Single blob of errors per file** - store all DAG errors in one row, tracktrace; simple, but harder to query/filter by `dag_id`. 2. **New `DagParsingError` table** - separate table for file vs DAG errors 3. **Add `dag_id` to `ParseImportError`** - add `dag_id` (nullable) where File-level errors: `dag_id` is `NULL` I think option 3 is the best approach. What’s your thoughts? Would it make sense to open an AIP for this change? -- 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]
