You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/09/16 05:00:28 UTC

[GitHub] [airflow] uranusjr commented on issue #26008: Cannot convert a non-kubernetes.client.models.V1Pod object into a KubernetesExecutorConfig

uranusjr commented on issue #26008:
URL: https://github.com/apache/airflow/issues/26008#issuecomment-1248920572

   I was just seeing a separate case for this particular error, and the setup also has a similar pattern—the DAG file imports a helper module (`template` here) that implements a function that returns the custom `executor_config`. And the error is emitted from here:
   
   https://github.com/apache/airflow/blob/39c91697a5b4e8a6f05c0fc8cb0c93b18b8bfcd1/airflow/kubernetes/pod_generator.py#L169-L182
   
   Since there’s an `isinstance(k8s_object, k8s.V1Pod)` check right at the top (that should cover this `executor_config` value), this means the (de-)serialisation process could be causing the issue, or the V1Pod import may have changed during the process. I’m not sure how this can be fixed yet, but a temporary workaround would be to use the old executor config format for now:
   
   ```python
   custom_executor_config = {
       "KubernetesExecutor": {
           # Put worker configuration here. Possible arguments see:
           # PodGenerator in airflow/kubernetes/pod_generator_deprecated.py
       },
   }
   ```
   
   If this is a serialisation issue, #26191 may be the fix for this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org