diff --git a/cosmos/operators/kubernetes.py b/cosmos/operators/kubernetes.py index 8f00315b9..b55dcdbe3 100644 --- a/cosmos/operators/kubernetes.py +++ b/cosmos/operators/kubernetes.py @@ -24,11 +24,11 @@ # apache-airflow-providers-cncf-kubernetes < 7.4.0 from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator except ImportError as error: - logger.info( + logger.exception(error) + raise ImportError( "Could not import KubernetesPodOperator. Ensure you've installed the Kubernetes provider " "separately or with with `pip install astronomer-cosmos[...,kubernetes]`." ) - logger.exception(error) class DbtKubernetesBaseOperator(KubernetesPodOperator, DbtBaseOperator): # type: ignore