zachliu opened a new issue, #23512:
URL: https://github.com/apache/airflow/issues/23512
### Apache Airflow version
2.3.0 (latest released)
### What happened
while testing airflow 2.3.0 locally (using postgresql 12.4), the webserver
container shows random errors:
```postgres_1 | 2022-05-04 18:58:46.013 UTC [41] ERROR: duplicate key
value violates unique constraint
"ab_permission_view_role_permission_view_id_role_id_key"
postgres_1 | 2022-05-04 18:58:46.013 UTC [41] DETAIL: Key
(permission_view_id, role_id)=(204, 1) already exists.
postgres_1 | 2022-05-04 18:58:46.013 UTC [41] STATEMENT: INSERT INTO
ab_permission_view_role (id, permission_view_id, role_id) VALUES
(nextval('ab_permission_view_role_id_seq'), 204, 1) RETURNING
ab_permission_view_role.id
webserver_1 | [2022-05-04 18:58:46,015] {{manager.py:570}} ERROR - Add
Permission to Role Error: (psycopg2.errors.UniqueViolation) duplicate key value
violates unique constraint
"ab_permission_view_role_permission_view_id_role_id_key"
webserver_1 | DETAIL: Key (permission_view_id, role_id)=(204, 1) already
exists.
webserver_1 |
webserver_1 | [SQL: INSERT INTO ab_permission_view_role (id,
permission_view_id, role_id) VALUES (nextval('ab_permission_view_role_id_seq'),
%(permission_view_id)s, %(role_id)s) RETURNING ab_permission_view_role.id]
webserver_1 | [parameters: {'permission_view_id': 204, 'role_id': 1}]```
notes:
1. when the db is first initialized, i have ~40 errors like this (with ~40
different `permission_view_id` but always the same `'role_id': 1`)
2. when it's not the first time initializing db, i always have 1 error like
this but it shows different `permission_view_id` each time
3. all these errors don't seem to have any real negative effects, :airflow:
is still running and scheduling tasks
### What you think should happen instead
prior to 2.3.0 there were no such errors
### How to reproduce
_No response_
### Operating System
Linux Mint 20.3
### Versions of Apache Airflow Providers
_No response_
### Deployment
Docker-Compose
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [X] 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]