Skip to content
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

Dependency Issue with apache-airflow-providers-fab #37020

Closed
1 of 2 tasks
aashishshrestha09 opened this issue Jan 26, 2024 · 7 comments
Closed
1 of 2 tasks

Dependency Issue with apache-airflow-providers-fab #37020

aashishshrestha09 opened this issue Jan 26, 2024 · 7 comments
Labels
area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet

Comments

@aashishshrestha09
Copy link

aashishshrestha09 commented Jan 26, 2024

Apache Airflow Provider(s)

fab

Versions of Apache Airflow Providers

apache-airflow-providers-fab==1.0.0

Apache Airflow version

2.8.1

Operating System

macOS

Deployment

Other Docker-based deployment

Deployment details

No response

What happened

While trying to use the get_oauth_user_info method in my custom security manager, I encountered a dependency issue. I was following the recommendation to inherit from airflow.auth.managers.fab.security_manager.override.FabAirflowSecurityManagerOverride for overriding the security manager. However, when I tried to install apache-airflow-providers-fab, I found that the package requires apache-airflow version 2.9.0 or higher, but as of now, Apache Airflow has not released a version 2.9.0.

What you think should happen instead

I expected the apache-airflow-providers-fab package to have a dependency on a version of apache-airflow that is currently available.

How to reproduce

To reproduce the issue, try to install apache-airflow-providers-fab with the latest available version of apache-airflow. The dependency conflict becomes apparent.

Anything else

This issue is preventing me from using the get_oauth_user_info method in my custom security manager and the apache-airflow-providers-fab package. Any help or guidance would be appreciated.

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@aashishshrestha09 aashishshrestha09 added area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet labels Jan 26, 2024
Copy link

boring-cyborg bot commented Jan 26, 2024

Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

@eladkal
Copy link
Contributor

eladkal commented Jan 26, 2024

@vincbeck correct me if I am wrong here.

Only for Airflow>=2.9.0 the fab provider can be used. While the provider is released the core code of Airflow 2.8 dont refrence it so you cant really use it.

See #35926

Its important to understand that providers have seperated release cycle and the provider must be released before we release Airflow 2.9.0

@vincbeck
Copy link
Contributor

vincbeck commented Feb 6, 2024

@vincbeck correct me if I am wrong here.

Only for Airflow>=2.9.0 the fab provider can be used. While the provider is released the core code of Airflow 2.8 dont refrence it so you cant really use it.

See #35926

Its important to understand that providers have seperated release cycle and the provider must be released before we release Airflow 2.9.0

100% correct

@babaMar
Copy link

babaMar commented Apr 16, 2024

From where can I import Role and User models in 2.8.1?

I'm upgrading from an older version and found:
from airflow.www.security import Role, User, which now gives me error.

I tried from airflow.providers.fab.auth_manager.models import Role, User, which the linter accept, but then I get:
No module named 'airflow.providers.fab'

@vincbeck
Copy link
Contributor

from airflow.www.security import Role, User, which now gives me error.

What error do you get?

@babaMar
Copy link

babaMar commented Apr 16, 2024

it cannot be imported from there, as it's not there...
I fixed this with:
from airflow.auth.managers.fab.models import Role, User

@vincbeck
Copy link
Contributor

it cannot be imported from there, as it's not there... I fixed this with: from airflow.auth.managers.fab.models import Role, User

It seems we indeed break those imports ... Sorry for that. For Airflow 2.8.x version you should get them from airflow.auth.managers.fab.models and from Airflow 2.9, you should get them from airflow.providers.fab.auth_manager.models.

These models are not part of the Airflow public interface, I think that's the reason why we introduced some breaking changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers kind:bug This is a clearly a bug needs-triage label for new issues that we didn't triage yet
Projects
None yet
Development

No branches or pull requests

4 participants