-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update our approach for executor-bound dependencies
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
- Loading branch information
Showing
8 changed files
with
78 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
scripts/ci/provider_packages/ci_make_providers_2_1_compliant.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# shellcheck source=scripts/ci/libraries/_script_init.sh | ||
. "$( dirname "${BASH_SOURCE[0]}" )/../libraries/_script_init.sh" | ||
|
||
# Some of our provider sources are not Airflow 2.1 compliant any more | ||
# We replace them with 2.1 compliant versions from PyPI to run the checks | ||
|
||
cd "${AIRFLOW_SOURCES}" || exit 1 | ||
rm -rvf dist/apache_airflow_providers_cncf_kubernetes* dist/apache_airflow_providers_celery* | ||
pip download --no-deps --dest dist apache-airflow-providers-cncf-kubernetes==3.0.0 \ | ||
apache-airflow-providers-celery==2.1.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters