joaopamaral commented on PR #41549:
URL: https://github.com/apache/airflow/pull/41549#issuecomment-2297291567

   There is another breaking change Remove deprecated SubDags that is causing a 
failure during the sync permissions in old FAB versions: 
https://github.com/apache/airflow/blame/587015ddc84dfd306e4c2487c3aeb65ae280eab5/airflow/providers/fab/auth_manager/security_manager/override.py#L1076
   
   When I try to run the `airflow sync-perm --include-dags ` with airflow 2.10 
and an old FAB I get the error which is not related to the access control 
changes:
   ```
   # airflow sync-perm --include-dags                                           
                                                                                
                 │  ____________       _____________
   /usr/local/lib/python3.8/site-packages/flask_limiter/extension.py:333 
UserWarning: Using the in-memory storage for tracking rate limits as no storage 
was explicitly specified. This is not recommended for │ ____    |__( )_________ 
 __/__  /________      __
   production use. See: 
https://flask-limiter.readthedocs.io#configuring-a-storage-backend for 
documentation about configuring the storage backend.                            
                                │____  /| |_  /__  ___/_  /_ __  /_  __ \_ | /| 
/ /
   Updating actions and resources for all existing roles                        
                                                                                
                                               │___  ___ |  / _  /   _  __/ _  
/ / /_/ /_ |/ |/ /
   Updating permission on all DAG views                                         
                                                                                
                                               │ _/_/  |_/_/  /_/    /_/    /_/ 
 \____/____/|__/
   [2024-08-19T19:26:23.125+0000] {dagbag.py:567} INFO - Filling up the DagBag 
from database                                                                   
                                                │[2024-08-19 19:24:20 +0000] 
[140] [INFO] Starting gunicorn 23.0.0
   Traceback (most recent call last):                                           
                                                                                
                                               │[2024-08-19 19:24:20 +0000] 
[140] [INFO] Listening at: http://[::]:8794 (140)
     File "/usr/local/bin/airflow", line 8, in <module>                         
                                                                                
                                               │[2024-08-19 19:24:20 +0000] 
[140] [INFO] Using worker: sync
       sys.exit(main())                                                         
                                                                                
                                               │[2024-08-19 19:24:20 +0000] 
[141] [INFO] Booting worker with pid: 141
     File "/opt/airflow/airflow/__main__.py", line 62, in main                  
                                                                                
                                               │[2024-08-19 19:24:20 +0000] 
[142] [INFO] Booting worker with pid: 142
       args.func(args)                                                          
                                                                                
                                               │[2024-08-19T19:24:20.894+0000] 
{triggerer_job_runner.py:181} INFO - Setting up TriggererHandlerWrapper with 
handler <FileTaskHandler (NOTSET)>
     File "/opt/airflow/airflow/cli/cli_config.py", line 49, in command         
                                                                                
                                               │[2024-08-19T19:24:20.894+0000] 
{triggerer_job_runner.py:237} INFO - Setting up logging queue listener with 
handlers [<RedirectStdHandler <stdout> (NOTSET)>, <TriggererHandlerWrapper 
(NOTSET)>]
       return func(*args, **kwargs)                                             
                                                                                
                                               │[2024-08-19T19:24:20.900+0000] 
{triggerer_job_runner.py:338} INFO - Starting the triggerer
     File "/opt/airflow/airflow/utils/cli.py", line 115, in wrapper             
                                                                                
                                               │[2024-08-19T19:25:21.099+0000] 
{triggerer_job_runner.py:510} INFO - 0 triggers currently running
       return f(*args, **kwargs)                                                
                                                                                
                                               │[2024-08-19T19:26:21.264+0000] 
{triggerer_job_runner.py:510} INFO - 0 triggers currently running
     File "/opt/airflow/airflow/utils/providers_configuration_loader.py", line 
55, in wrapped_function                                                         
                                                │
       return func(*args, **kwargs)                                             
                                                                                
                                               │
     File 
"/opt/airflow/airflow/providers/fab/auth_manager/cli_commands/sync_perm_command.py",
 line 39, in sync_perm                                                          
                                 │
       appbuilder.sm.create_dag_specific_permissions()                          
                                                                                
                                               │
     File 
"/opt/airflow/airflow/providers/fab/auth_manager/security_manager/override.py", 
line 1067, in create_dag_specific_permissions                                   
                                     │
       root_dag_id = dag.parent_dag.dag_id if dag.parent_dag else dag.dag_id    
                                                                                
                                               │
   AttributeError: 'SerializedDAG' object has no attribute 'parent_dag'
   ```
   
   To run the tests I need to apply the [this line 
change](https://github.com/apache/airflow/blame/587015ddc84dfd306e4c2487c3aeb65ae280eab5/airflow/providers/fab/auth_manager/security_manager/override.py#L1076).
 
   
   @kaxil, do you know if it's related to this 
[PR](https://github.com/apache/airflow/pull/41390), is it expected to keep the 
compatibility with old FAB versions?
   


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

Reply via email to