Uh oh!
There was an error while loading. Please reload this page.
Move all k8S classes to cncf.kubernetes provider - #32767
Conversation
0489b31 to
2b5f5c9Compared3a18e9 to
4e281b6Compare83e9b83 to
dcc849dComparepotiuk
commented
Jul 22, 2023
Based on #32775 so only last commit counts. |
dcc849d to
5bff371Comparepotiuk
commented
Jul 23, 2023
Only last commit counts. |
76afae1 to
4e56e6aCompare17c3838 to
e2ed30eCompare205c9a4 to
d7d4bbbComparepotiuk
commented
Jul 25, 2023
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
d7d4bbb to
c486137Comparepotiuk
commented
Jul 25, 2023
Applied this round of comments from @jedcunningham . Also added newsfragment |
c486137 to
eb6573aCompareThis is the big move of all Kubenetes classes to go to provider. The changes that are implemented in this move: * replaced all imports from airflow.kubernetes to cncf.kubernetes Swith PEP-563 dynamic import rediretion and deprecation messages those messages now support overriding the "replacement" hints to make K8s deprecations more accurate * pre_7_4_0_compatibility package with classes used by past providerrs have been "frozen" and stored in the package with import redirections from airflow.kubernetes(with deprecation warnings) * kubernetes configuration is moved to kubernetes provider * mypy started complaining about conf and set used in configuration. so better solution to handle deprecations and hinting conf returning AirlfowConfigParsing was added. * example_kuberntes_executor uses configuration reading not in top level but in execute method * PodMutationHookException and PodReconciliationError have been moved to cncf.kubernetes provider and they are imported from there with fallback to an airflow.exception ones in case old provider is used in Airflow 2.7.0 * k8s methods in task_instance have been deprecated and reolaced with functions in "cncf.kubernetes` template_rendering module the old way still works but raise deprecaton warnings. * added extras with versions for celery and k8s * raise AirflowOptionalProviderFeatureException in case there is attempt to use CeleryK8sExecutor and cncf.k8s is not installed. * added few "new" core utils to k8s (hashlib_wrapper etc) * both warnings and errors indicate minimum versions for both cncf.k8s and Celery providers.
eb6573a to
b7af1c4CompareUh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com>
The apache#32767 missed imports of imports for a few kubernetes modules. This PR adds the missing ones.
The #32767 missed imports of imports for a few kubernetes modules. This PR adds the missing ones.
The apache#32767 has moved all k8s classes to cncf.kubernetes provider, however there was a mistake with location of Pod*Exceptions - rather than in pod_manager they remained defined in the kubernetes_executor package - which has the side-effect that trying to import them in Airflow Pre 2.7 raised the "You should not use the provider's executors in this version of Airflow." error. This change moves the exceptions to the pod_generator package to fix the problem.
The #32767 has moved all k8s classes to cncf.kubernetes provider, however there was a mistake with location of Pod*Exceptions - rather than in pod_manager they remained defined in the kubernetes_executor package - which has the side-effect that trying to import them in Airflow Pre 2.7 raised the "You should not use the provider's executors in this version of Airflow." error. This change moves the exceptions to the pod_generator package to fix the problem.
This is the big move of all Kubenetes classes to go to provider.
The changes that are implemented in this move:
Swith PEP-563 dynamic import rediretion and deprecation messages
those messages now support overriding the "replacement" hints
to make K8s deprecations more accurate
providerrs have been "frozen" and stored in the package with
import redirections from airflow.kubernetes(with deprecation warnings)
so better solution to handle deprecations and hinting conf
returning AirlfowConfigParsing was added.
top level but in execute method
been moved to cncf.kubernetes provider and they are imported
from there with fallback to an airflow.exception ones in case
old provider is used in Airflow 2.7.0
with functions in "cncf.kubernetes` template_rendering module
the old way still works but raise deprecaton warnings.
attempt to use CeleryK8sExecutor and cncf.k8s is not installed.
and Celery providers.
^ 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.rstor{issue_number}.significant.rst, in newsfragments.