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

Put reasonable lower bounds on providers in Airflow's extras #39100

Open
1 of 2 tasks
notatallshaw opened this issue Apr 18, 2024 · 5 comments
Open
1 of 2 tasks

Put reasonable lower bounds on providers in Airflow's extras #39100

notatallshaw opened this issue Apr 18, 2024 · 5 comments
Labels
area:dependencies Issues related to dependencies problems area:providers kind:feature Feature Requests

Comments

@notatallshaw
Copy link
Contributor

notatallshaw commented Apr 18, 2024

Description

Airflow should set lower bounds on the providers it specifies by extras.

Use case/motivation

Airflow provides a number of extras that point to providers, e.g. apache-beam points to the provider apache-airflow-providers-apache-beam , but in the metadata it does this completely unbounded:

Provides-Extra: apache-beam
Requires-Dist: apache-airflow-providers-apache-beam; (python_version != "3.12") and extra == 'apache-beam'

This leads to the problem that dependency resolution tools might backtrack to apache-airflow-providers-apache-beam==1.0.0 when trying to find solutions, which can cause resolution failures, e.g. astral-sh/uv#3078

I don't think the lower bounds need to even be particularly strong, just avoid letting resolution tools attempt extremely old versions of providers that are known to be problematic in some sense. In this example putting a lower bound of apache-airflow-providers-apache-beam>=2.0.0 would solve this issue.

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@notatallshaw notatallshaw added kind:feature Feature Requests needs-triage label for new issues that we didn't triage yet labels Apr 18, 2024
Copy link

boring-cyborg bot commented Apr 18, 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.

@notatallshaw
Copy link
Contributor Author

notatallshaw commented Apr 18, 2024

cc @potiuk digging deep into resolutions (astral-sh/uv#3078) I found that uv can end up aggressively checking older versions of (transitive) dependencies.

If airflow ever wanted to reccomend uv as a tool to user to install it, I would strongly reccomend adding some reasonable lower bounds on providers given by airflow's extras.

@potiuk
Copy link
Member

potiuk commented Apr 18, 2024

Yes I think it might make sense to put some limits, but it's hard to say what those limits should be.

Generally speaking, the point of having old providers (even very old) and new Airflow is the whole point of separating providers and Airflow - simply, if provider has breaking changes, users can still upgrade Airflow but keep some providers not updated to latest versions.

The question is: "DEFINE REASONABLE". We already have some rules that we follow on providers supporting minimum Airflow versions - and those rules are well defined. https://github.com/apache/airflow/blob/main/PROVIDERS.rst#upgrading-minimum-supported-version-of-airflow

If someone will come up with a proposal for what would be "REASONABLE", I think it makes sense - the extra limits are not hard - they are soft, so it does not even "block" the users if they want to use older versions.

If so - maybe a good idea will be to raise the proposal as discusison in our devlist - this is where we discuss such ideas - for example the 12 months policy for providers have been discussed in:

and lazy consensus proposed and achieved here:

Similarly - discussion should be started, with reasoning and proposal, and then after achieving a consensus, we should implement it. I am all for it and I am also super-happy to guide someone doing it. IT's been a long time I was doing all these things myself, but this time I started to think about others stepping in and driving this - I am happy to support and guide implementation of it so if you feel like it @notatallshaw -> I would be super-happy to take the back seat on that one.

@notatallshaw
Copy link
Contributor Author

I am happy to put a well thought out proposal together on the mailing list, but beyond that I don't think I can either lead or implement it.

I'm pretty much at capacity with my OSS work, I already have a patch for Airflow I promised to turn into a PR last year and I've not managed to get round to doing (in part delayed because of company bureaucracy, in part I started spending a lot more focus on Python's packaging standards and it ate up all my OSS energy).

But if putting a proposal on the mailing list is a good start, without commiting to implementing it myself, I will do that soon.

@potiuk
Copy link
Member

potiuk commented Apr 18, 2024

Sure. Let's start with that. Implementation might be simple and possibly someone else might volunteer - we already have a few people who know their ways around that code.

potiuk added a commit to potiuk/airflow that referenced this issue Jun 3, 2024
With this change we are running tests of downgrading Airflow
dependencies to "lowest-direct" ones - separately for "core" tests
and for each provider (and run corresponding tests with it). This
should allows us to determine what are the lowest bounds for the
dependencies - for Airflow and for individual providers and continue
doing it while Airflow evolves in the future.

Fixes: apache#35549
Related: apache#39100
potiuk added a commit that referenced this issue Jun 4, 2024
…#39946)

With this change we are running tests of downgrading Airflow
dependencies to "lowest-direct" ones - separately for "core" tests
and for each provider (and run corresponding tests with it). This
should allows us to determine what are the lowest bounds for the
dependencies - for Airflow and for individual providers and continue
doing it while Airflow evolves in the future.

Fixes: #35549
Related: #39100
fdemiane pushed a commit to fdemiane/airflow that referenced this issue Jun 6, 2024
…apache#39946)

With this change we are running tests of downgrading Airflow
dependencies to "lowest-direct" ones - separately for "core" tests
and for each provider (and run corresponding tests with it). This
should allows us to determine what are the lowest bounds for the
dependencies - for Airflow and for individual providers and continue
doing it while Airflow evolves in the future.

Fixes: apache#35549
Related: apache#39100
syedahsn pushed a commit to aws-mwaa/upstream-to-airflow that referenced this issue Jun 7, 2024
…apache#39946)

With this change we are running tests of downgrading Airflow
dependencies to "lowest-direct" ones - separately for "core" tests
and for each provider (and run corresponding tests with it). This
should allows us to determine what are the lowest bounds for the
dependencies - for Airflow and for individual providers and continue
doing it while Airflow evolves in the future.

Fixes: apache#35549
Related: apache#39100
@shahar1 shahar1 added area:dependencies Issues related to dependencies problems area:providers and removed needs-triage label for new issues that we didn't triage yet labels Jul 13, 2024
romsharon98 pushed a commit to romsharon98/airflow that referenced this issue Jul 26, 2024
…apache#39946)

With this change we are running tests of downgrading Airflow
dependencies to "lowest-direct" ones - separately for "core" tests
and for each provider (and run corresponding tests with it). This
should allows us to determine what are the lowest bounds for the
dependencies - for Airflow and for individual providers and continue
doing it while Airflow evolves in the future.

Fixes: apache#35549
Related: apache#39100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:dependencies Issues related to dependencies problems area:providers kind:feature Feature Requests
Projects
None yet
Development

No branches or pull requests

3 participants