okayhooni opened a new pull request, #30105:
URL: https://github.com/apache/airflow/pull/30105

   related: #29056
   related: 
https://github.com/apache/airflow/issues/30028#issuecomment-1468437023
   ---
   
   Tested #29056 (minor fix for handling error on cluster policy itself) and 
looks good.
   
![image](https://user-images.githubusercontent.com/81631424/225090602-914cd52c-fa6c-4762-98c4-89169fae4c73.png)
   
   But i think it's better to use repr(e) than str(e) for showing error class 
name on web UI message.
   
   `self.import_errors[dag.fileloc] = str(e)` -> 
`self.import_errors[dag.fileloc] = repr(e)`
   
   In other exception cases(=error on DAG module itself), there are `traceback` 
related configurations to show error traceback on the web UI.
   ```python
       self.dagbag_import_error_tracebacks = conf.getboolean('core', 
'dagbag_import_error_tracebacks')
       self.dagbag_import_error_traceback_depth = conf.getint('core', 
'dagbag_import_error_traceback_depth')
   ```
   
   But, I think, use of error traceback on this case is a bit too much, but 
it's enough to show exception class name on the Import Error Web UI
   - AirflowTimetableInvalid
   - AirflowClusterPolicyViolation
   - AirflowDagCycleException
   - AirflowDagDuplicatedIdException
   - AirflowDagInconsistent
   - ParamValidationError


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