subkanthi commented on pull request #19729:
URL: https://github.com/apache/airflow/pull/19729#issuecomment-1045231490


   > Waiting for response from @subkanthi on the potential bug.
   
   Im actually stuck with another issue, Im pretty sure it used to work before, 
 For some reason the k8s_object is str and it ends up in the else block
   
   ```
          k8s_object = obj.get("pod_override", None)
   
           if k8s_legacy_object and k8s_object:
               raise AirflowConfigException(
                   "Can not have both a legacy and new"
                   "executor_config object. Please delete the 
KubernetesExecutor"
                   "dict and only use the pod_override 
kubernetes.client.models.V1Pod"
                   "object."
               )
           if not k8s_object and not k8s_legacy_object:
               return None
   
           print("TYPE" + str(type(k8s_object)))
           if isinstance(k8s_object, k8s.V1Pod):
               return k8s_object
           elif isinstance(k8s_legacy_object, dict):
               warnings.warn(
                   'Using a dictionary for the executor_config is deprecated 
and will soon be removed.'
                   'please use a `kubernetes.client.models.V1Pod` class with a 
"pod_override" key'
                   ' instead. ',
                   category=DeprecationWarning,
               )
               return PodGenerator.from_legacy_obj(obj)
           else:
   
               raise TypeError(
                   'Cannot convert a non-kubernetes.client.models.V1Pod object 
into a KubernetesExecutorConfig'
               )
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to