ashb opened a new issue, #53971:
URL: https://github.com/apache/airflow/issues/53971

   ### Description
   
   With dynamic DAGs (either "old school" of `for dag_id in some_list` or using 
something like Dag Factory) it would be nice to be able to report an error to 
show up in the Airflow UI without loosing all the other dags in the file.
   
   Right now this is not possible as the only way of reporting an DAG error is 
to raise an exception, but if the exception is raise Airflow doesn't look for 
any DAGs in the loaded dag file/module anymore.
   
   We should add _some_ mechanism that lets these tools or dynamic dags report 
a list of exceptions so that they can still parse/load the valid dags but have 
a more natural experience for reporting errors.
   
   I don't have any concrete ideas on this, but it will likely have to be done 
by setting some "magic"/special variable at the module level that contains a 
list of exceptions. (The Dag Parsing process already iterates over all the 
attributes on the module looking for dags, so looking for this special var, say 
`__airflow_dag_parsing_errors`, wouldn't be a big lift.
   
   ### Use case/motivation
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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