-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Keep compatibility with old FAB versions #41549
Conversation
…into fix/compatibility-old-fab # Conflicts: # airflow/models/dag.py
…into fix/compatibility-old-fab
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
To run the final tests with this PR change I need to apply the this line change. @kaxil, do you know if it's related to this PR, is it expected to keep the compatibility with old FAB versions? |
Older FAB version won't work with Airflow 3. You will need to use the changes from the PR or use |
Thanks for explaining that @kaxil! I've tested with tag 2.10.0 and it's working. |
According to the new rules- we should also back-port it to v2-10-test by PR |
(we means merging committer shoudl decide if they want to do it themselves or ask the author to do so). |
Good call, actually (and I should have thought about it before merging it), do we need it in main at all? Should it be only in 2.10 branch? Because as Kaxil mentioned:
Therefore, this compatibility code should only be for Airflow 2.x? |
Possibly - but we have not seen this kind of need before - we assumed we backport everything from main and we do not have "2.10 only" fixes - but yes, this one looks like a legitimate case (@ephraimbuddy @utkarsharma2 @kaxil ?) |
(cherry picked from commit d7d944e)
Regardless from decision #41792 is the backport as it needs to go there. |
@joaopamaral -> I just cherry-picked the change to v2-10-test, but tests are failing, would you mind back-porting it and fixing the tests - see #41792 |
closes: #41540
FAB versions before 1.3.0 still use the old access control format that allows only DAGs resource. This PR fixes the format when airflow is running with FAB versions < 1.3.0.
Tests:
access_control={'Viewer': ["can_read","can_delete"]}
New access_control format:
access_control={'Viewer': {"DAGs": ["can_read","can_delete"]}}
FAB 1.3.0:
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.