You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update our approach for executor-bound dependencies (#22573)
Kubernetes and Celery are both providers and part of the core.
The dependencies for both are added via "extras" which makes them
"soft" limits and in case of serious dependency bumps this might
end up with a mess (as we experienced with bumping min K8S
library version from 11.0.0 to 22.* (resulting in yanking 4
versions of `cncf.kubernetes` provider.
After this learning, we approach K8S and Celery dependencies a bit
differently than any other dependencies.
* for Celery and K8S (and Dask but this is rather an afterhought)
we do not strip-off the dependencies from the extra (so for
example [cncf.kubernetes] extra will have dependencies on
both 'apache-airflow-providers-cncf-kubernetes' as well as
directly on kubernetes library
* We add upper-bound limits for both Celery and Kubernetes to prevent
from accidental upgrades. Both Celery and Kubernetes Python library
follow SemVer, and they are crucial components of Airlfow so they
both squarely fit our "do not upper-bound" exceptions.
* We also add a rule that whenever dependency upper-bound limit is
raised, we should also make sure that additional testing is done
and appropriate `apache-airflow` lower-bound limit is added for
the `apache-airflow-providers-cncf-kubernetes` and
`apache-airflow-providers-celery` providers.
As part of this change we also had to fix two issues:
* the image was needlesly rebuilt during constraint generation as
we already have the image and we even warn that it should
be built before we run constraint generation
* after this change, the currently released, unyanked cncf.kubernetes
provider cannot be installed with airflow, because it has
conflicting requirements for kubernetes library (provider has
<11 and airflow has > 22.7). Therefore during constraint
generation with PyPI providers we install providers from PyPI, we
explicitly install the yanked 3.1.2 version. This should be
removed after we release the next K8S provider version.
That should protect our users in all scenarios where they might
unknowingly attempt to upgrade Kubernetes or Celery to incompatible
version.
Related to: #22560, #21727
0 commit comments