yizha opened a new issue #13503:
URL: https://github.com/apache/airflow/issues/13503


   **Apache Airflow version**: 2.0.0
   
   **Kubernetes version (if you are using kubernetes)** (use kubectl version): 
not relevant
   
   **Environment**: 
   
       Cloud provider or hardware configuration: 
       OS (e.g. from /etc/os-release):
       Kernel (e.g. uname -a):
       Install tools: 
       Others: 
   
   **What happened**:
   `/usr/bin/airflow sync-perm` not loading any DAG from database.
   
   
   **What you expected to happen**:
   `/usr/bin/airflow sync-perm` should load all DAGs from database and sync DAG 
level permission for them.
   
   **How to reproduce it**:
   Set up airflow and deploy at least one DAG with DAG level permission in DAG 
code (access_control={...}), then run `/usr/bin/airflow sync-perm`
   
   **Anything else we need to know**:
   I think in dagbag.py/collect_dags(), when read_dags_from_db is True, it 
should call `self.collect_dags_from_db()` before returning but it just returns 
directly and no DAG is loaded from database.
   
https://github.com/apache/airflow/blob/ab5f770bfcd8c690cbe4d0825896325aca0beeca/airflow/models/dagbag.py#L437-L438
   


----------------------------------------------------------------
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.

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


Reply via email to