Apache Airflow version: 2.0.0
What happened:
Running sync_perm CLI command does not synchronize the permission granted through the DAG via access_control.
This is because of dag serialization. When dag serialization is enabled, the dagbag will exhibit a lazy loading behaviour.
How to reproduce it:
- Add access_control to a DAG where the new role has permission to see the DAG.
access_control={
"test": {'can_dag_read'}
},
- Run
airflow sync-perm.
- Log in as the new user and you will still not see any DAG.
- If you refresh the DAG, the new user will be able to DAG after they refresh their page
Expected behavior
When I run airflow sync-perm, I expect the role who has been granted read permission for the DAG to be able to see that DAG.
This is also an issue with 1.10.x with DAG Serialization enabled, so would be good to backport it too.
Apache Airflow version: 2.0.0
What happened:
Running sync_perm CLI command does not synchronize the permission granted through the DAG via access_control.
This is because of dag serialization. When dag serialization is enabled, the dagbag will exhibit a lazy loading behaviour.
How to reproduce it:
airflow sync-perm.Expected behavior
When I run
airflow sync-perm, I expect the role who has been granted read permission for the DAG to be able to see that DAG.This is also an issue with 1.10.x with DAG Serialization enabled, so would be good to backport it too.