rotemseekingalpha opened a new issue, #27163:
URL: https://github.com/apache/airflow/issues/27163
### Apache Airflow version
Other Airflow 2 version (please specify below)
### What happened
When introducing new DAGs to our Airflow 2.4.0 environment, the web server
failed to update Flask permissions and the UI could not show the DAGs, although
they were accessible through airflow CLI (`airflow dags list`, `airflow tasks
list <dag>`, `airflow tasks render <dag> <task> <date>`).
I tried to fix the problem with several restarts and even an `airflow db
upgrade`, but it did not work.
Interestingly, I did not encounter this problem in our staging environment
(which is identical to our production).
I got these errors:
```
DETAIL: Failing row contains (null, DAG:glue_catalog_restore).
[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING
ab_view_menu.id]
[parameters: {'name': 'DAG:glue_catalog_restore'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View
Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates
not-null constraint
DETAIL: Failing row contains (null, 2, null).
[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES
(%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 2, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error:
(psycopg2.errors.NotNullViolation) null value in column "id" violates not-null
constraint
DETAIL: Failing row contains (null, DAG:glue_catalog_restore).
[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING
ab_view_menu.id]
[parameters: {'name': 'DAG:glue_catalog_restore'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View
Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates
not-null constraint
DETAIL: Failing row contains (null, 3, null).
[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES
(%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 3, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error:
(psycopg2.errors.NotNullViolation) null value in column "id" violates not-null
constraint
DETAIL: Failing row contains (null, DAG:glue_catalog_restore).
[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING
ab_view_menu.id]
[parameters: {'name': 'DAG:glue_catalog_restore'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View
Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates
not-null constraint
DETAIL: Failing row contains (null, 1, null).
[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES
(%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 1, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error:
(psycopg2.errors.NotNullViolation) null value in column "id" violates not-null
constraint
DETAIL: Failing row contains (null, DAG:mariadb_dump_11).
[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING
ab_view_menu.id]
[parameters: {'name': 'DAG:mariadb_dump_11'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View
Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates
not-null constraint
DETAIL: Failing row contains (null, 2, null).
[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES
(%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 2, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error:
(psycopg2.errors.NotNullViolation) null value in column "id" violates not-null
constraint
DETAIL: Failing row contains (null, DAG:mariadb_dump_11).
[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING
ab_view_menu.id]
[parameters: {'name': 'DAG:mariadb_dump_11'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View
Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates
not-null constraint
DETAIL: Failing row contains (null, 3, null).
[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES
(%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 3, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Add View Menu Error:
(psycopg2.errors.NotNullViolation) null value in column "id" violates not-null
constraint
DETAIL: Failing row contains (null, DAG:mariadb_dump_11).
[SQL: INSERT INTO ab_view_menu (name) VALUES (%(name)s) RETURNING
ab_view_menu.id]
[parameters: {'name': 'DAG:mariadb_dump_11'}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
ERROR [airflow.www.fab_security.sqla.manager] Creation of Permission View
Error: (psycopg2.errors.NotNullViolation) null value in column "id" violates
not-null constraint
DETAIL: Failing row contains (null, 1, null).
[SQL: INSERT INTO ab_permission_view (permission_id, view_menu_id) VALUES
(%(permission_id)s, %(view_menu_id)s) RETURNING ab_permission_view.id]
[parameters: {'permission_id': 1, 'view_menu_id': None}]
(Background on this error at: https://sqlalche.me/e/14/gkpj)
```
### What you think should happen instead
Airflow UI should have worked,
### How to reproduce
???
### Operating System
Ubuntu 20.04.3 LTS
### Versions of Apache Airflow Providers
```
apache-airflow @
file:///home/airflow/wheelfreeze/wheels/apache_airflow-2.4.0-py3-none-any.whl
apache-airflow-providers-amazon @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_amazon-6.0.0-py3-none-any.whl
apache-airflow-providers-common-sql @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_common_sql-1.2.0-py3-none-any.whl
apache-airflow-providers-ftp @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_ftp-3.1.0-py3-none-any.whl
apache-airflow-providers-http @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_http-4.0.0-py3-none-any.whl
apache-airflow-providers-imap @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_imap-3.0.0-py3-none-any.whl
apache-airflow-providers-mongo @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_mongo-3.0.0-py3-none-any.whl
apache-airflow-providers-mysql @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_mysql-3.2.1-py3-none-any.whl
apache-airflow-providers-pagerduty @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_pagerduty-3.0.0-py3-none-any.whl
apache-airflow-providers-postgres @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_postgres-5.2.2-py3-none-any.whl
apache-airflow-providers-redis @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_redis-3.0.0-py3-none-any.whl
apache-airflow-providers-sendgrid @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_sendgrid-3.0.0-py3-none-any.whl
apache-airflow-providers-slack @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_slack-6.0.0-py3-none-any.whl
apache-airflow-providers-sqlite @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_sqlite-3.2.1-py3-none-any.whl
apache-airflow-providers-ssh @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_ssh-3.2.0-py3-none-any.whl
apache-airflow-providers-vertica @
file:///home/airflow/wheelfreeze/wheels/apache_airflow_providers_vertica-3.2.1-py3-none-any.whl
### Deployment
Virtualenv installation
### Deployment details
Python 3.8.10
pip 22.3
setuptools 65.5.0
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]