lukaszkoziara opened a new issue #21661:
URL: https://github.com/apache/airflow/issues/21661


   ### Apache Airflow Provider(s)
   
   snowflake
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-snowflake==2.5.0
   
   ### Apache Airflow version
   
   2.2.2
   
   ### Operating System
   
   Amazon Linux AMI
   
   ### Deployment
   
   MWAA
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   When I tried remove DAG Airflow UI presented static page with error message 
"Error! Please contact server admin.". 
   Below is stacktrace from web server logs:
   
   ```
   2022-02-16T13:09:02.879+01:00        89.174.15.228 - - [16/Feb/2022:12:09:02 
+0000] "GET 
/dag_details?dag_id=copy_insights_to_snowflake.kaplanprofessional_e55a93 
HTTP/1.1" 200 41476 
"[https://7f334b50-9fc7-4eeb-baba-45eec46864c6.c9.ap-southeast-2.airflow.amazonaws.com/tree?dag_id=copy_insights_to_snowflake.kaplanprofessional_e55a93
 
](https://7f334b50-9fc7-4eeb-baba-45eec46864c6.c9.ap-southeast-2.airflow.amazonaws.com/tree?dag_id=copy_insights_to_snowflake.kaplanprofessional_e55a93)"
 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/98.0.4758.80 Safari/537.36"
   2022-02-16T13:09:10.162+01:00        [2022-02-16 12:09:10,162] 
{{delete_dag.py:43}} INFO - Deleting DAG: 
copy_insights_to_snowflake.kaplanprofessional_e55a93
   2022-02-16T13:09:10.228+01:00        [2022-02-16 12:09:10,171] 
{{app.py:1892}} ERROR - Exception on /delete [POST]
   2022-02-16T13:09:10.252+01:00        Traceback (most recent call last):
   2022-02-16T13:09:10.277+01:00        File 
"/usr/local/lib/python3.7/site-packages/flask/app.py", line 2447, in wsgi_app
   2022-02-16T13:09:10.302+01:00        response = self.full_dispatch_request()
   2022-02-16T13:09:10.346+01:00        File 
"/usr/local/lib/python3.7/site-packages/flask/app.py", line 1952, in 
full_dispatch_request
   2022-02-16T13:09:10.374+01:00        rv = self.handle_user_exception(e)
   2022-02-16T13:09:10.401+01:00        File 
"/usr/local/lib/python3.7/site-packages/flask/app.py", line 1821, in 
handle_user_exception
   2022-02-16T13:09:10.429+01:00        reraise(exc_type, exc_value, tb)
   2022-02-16T13:09:10.459+01:00        File 
"/usr/local/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise
   2022-02-16T13:09:10.486+01:00        raise value
   2022-02-16T13:09:11.121+01:00        File 
"/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in 
full_dispatch_request
   2022-02-16T13:09:11.144+01:00        rv = self.dispatch_request()
   2022-02-16T13:09:11.168+01:00        File 
"/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in 
dispatch_request
   2022-02-16T13:09:11.195+01:00        return 
self.view_functions[rule.endpoint](**req.view_args)
   2022-02-16T13:09:11.225+01:00        File 
"/usr/local/lib/python3.7/site-packages/airflow/www/auth.py", line 51, in 
decorated
   2022-02-16T13:09:11.250+01:00        return func(*args, **kwargs)
   2022-02-16T13:09:11.276+01:00        File 
"/usr/local/lib/python3.7/site-packages/airflow/www/decorators.py", line 72, in 
wrapper
   2022-02-16T13:09:11.300+01:00        return f(*args, **kwargs)
   2022-02-16T13:09:11.326+01:00        File 
"/usr/local/lib/python3.7/site-packages/airflow/www/views.py", line 1608, in 
delete
   2022-02-16T13:09:11.351+01:00        delete_dag.delete_dag(dag_id)
   2022-02-16T13:09:11.380+01:00        File 
"/usr/local/lib/python3.7/site-packages/airflow/utils/session.py", line 70, in 
wrapper
   2022-02-16T13:09:11.829+01:00        return func(*args, session=session, 
**kwargs)
   2022-02-16T13:09:11.855+01:00        File 
"/usr/local/lib/python3.7/site-packages/airflow/api/common/experimental/delete_dag.py",
 line 63, in delete_dag
   2022-02-16T13:09:11.879+01:00        for model in 
models.base.Base._decl_class_registry.values():
   2022-02-16T13:09:11.901+01:00        AttributeError: type object 'Base' has 
no attribute '_decl_class_registry'
   2022-02-16T13:09:11.923+01:00        89.174.15.228 - - [16/Feb/2022:12:09:10 
+0000] "POST 
/delete?dag_id=copy_insights_to_snowflake.kaplanprofessional_e55a93 HTTP/1.1" 
500 1538 
"[https://7f334b50-9fc7-4eeb-baba-45eec46864c6.c9.ap-southeast-2.airflow.amazonaws.com/dag_details?dag_id=copy_insights_to_snowflake.kaplanprofessional_e55a93
 
](https://7f334b50-9fc7-4eeb-baba-45eec46864c6.c9.ap-southeast-2.airflow.amazonaws.com/dag_details?dag_id=copy_insights_to_snowflake.kaplanprofessional_e55a93)"
 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, 
like Gecko) Chrome/98.0.4758.80 Safari/537.36"
   ```
   
   ### What you expected to happen
   
   I think that there is a problem with some weak dependencies rules, because 
when I set below constraints problem disappeared:
   ```
   apache-airflow-providers-snowflake==1.2.0
   snowflake-sqlalchemy==1.2.4
   sqlalchemy==1.3.24
   ```
   
   ### How to reproduce
   
   Click on trash button on any DAG (no matter if this is standard static or 
dynamically generated DAG)
   
   ### Anything else
   
   I know that such issues was reported before 
https://github.com/apache/airflow/issues?q=is%3Aissue+_decl_class_registry+is%3Aclosed
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to