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

   ### Apache Airflow version
   
   2.5.1
   
   ### What happened
   
   When making an while declaring a DAG Param, any resulting 
`jsonschema.exceptions.SchemaErrors` are not shown in the GUI as a DAG import 
error, nor visible via `airflow dags list-import-errors` because the exception 
is not caught in the `models/dagbag.py` ` _process_modules`-function (only 
`ParamValidationError` is)
   
   
   
   ### What you think should happen instead
   
   The function should not only capture `ParamValidationError`s, but also 
`jsonschema.exceptions.SchemaError`. and let you know why the DAG is not being 
imported.
   
   ### How to reproduce
   
   Add a `Param` to your dag, but use a wrong configuration. In  our case the 
developer mistakingly used `schema` instead of `type`. 
   
   ```
   "release": Param(
     default=None,
     description="Competent release to run the update for",
     schema="string"
    )
   ```
   
   The `schema` line should've been `type=["string", "null"]`.
   
   
   ### Operating System
   
   Debian
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Deployment
   
   Docker-Compose
   
   ### Deployment details
   
   Original airflow docker container (2.5.1 - python 3.10)
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit 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: commits-unsubscr...@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to