joaopamaral commented on code in PR #41549:
URL: https://github.com/apache/airflow/pull/41549#discussion_r1727834489
##########
airflow/models/dag.py:
##########
@@ -936,16 +938,26 @@ def update_old_perm(permission: str):
updated_access_control = {}
for role, perms in access_control.items():
- updated_access_control[role] = updated_access_control.get(role, {})
- if isinstance(perms, (set, list)):
- # Support for old-style access_control where only the actions
are specified
- updated_access_control[role][permissions.RESOURCE_DAG] =
set(perms)
+ if packaging_version.parse(FAB_VERSION) >=
packaging_version.parse("1.3.0"):
+ updated_access_control[role] =
updated_access_control.get(role, {})
+ if isinstance(perms, (set, list)):
+ # Support for old-style access_control where only the
actions are specified
+ updated_access_control[role][permissions.RESOURCE_DAG] =
set(perms)
+ else:
+ updated_access_control[role] = perms
Review Comment:
Hi @zachliu! This fix will be released in version 2.10.1 (not released yet),
and the user is using the version FAB==1.2.2 so it will execute this part of
the code (without the resource dict):
https://github.com/joaopamaral/airflow/blob/f8714c909665dd0630d9a8be54bdd7caffee3e12/airflow/models/dag.py#L959-L960
I'll inform the user that the fix will be released in 2.10.1.
--
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]