Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Airflow connection UI not visible

Tags:

airflow

Airflow version: 1.10.2
Ubuntu: 18.04 (bionic)
Python: 3.6.5

Issue: I am not sure how but the connections are not visible when I click Admin in the menu. Has someone ever faced this thing?

enter image description here

When I edit the URL and go to localhost:8080/admin/connections I see the below response. This was working fine since

enter image description here

But when I list the connections from airflow cli, it works. I am not sure why it is not visible on UI but rather accessible from cli? Or how should I give the UI user access to 'Connections'?

like image 290
Gagan Avatar asked Mar 20 '19 06:03

Gagan


2 Answers

This is due to a change in 10.0.2. Prior to 10.0.2, there was a hardcoded superuser flag for users.

To give an existing user superuser permissions, so that they can manage connections, variables, etc, you need to toggle the superuser flag in the users table in Airflow's metadata database.

They document how to make a user a superuser using code in the UPDATING.md file, see https://github.com/apache/airflow/blob/master/UPDATING.md#user-model-changes

like image 176
brki Avatar answered Oct 12 '22 22:10

brki


Worked! I put RBAC=True in airflow.cfg and then did airflow initdb.

I am not sure why or how this issue occured but the above solution will make the Connection Ui visible again.

like image 43
Gagan Avatar answered Oct 12 '22 22:10

Gagan