You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "potiuk (via GitHub)" <gi...@apache.org> on 2023/06/17 14:35:12 UTC

[GitHub] [airflow] potiuk commented on pull request #31735: Replace State usages with strong-typed enums

potiuk commented on PR #31735:
URL: https://github.com/apache/airflow/pull/31735#issuecomment-1595775886

   Hey @uranusjr :
   
   I reverted this one in https://github.com/apache/airflow/pull/31981. We need to take a close look and when it is re-done, "full test needed label" should be applied 
   
   Kubernetes tests started to fail when it got merged and when you look to scheduler logs (they are attached as artifacts to failed jobs). The error indicates it's the None Enum
   
   See https://github.com/apache/airflow/actions/runs/5297252493/jobs/9589070710
   
   And https://github.com/apache/airflow/actions/runs/5297252493 you can download kind-logs-k8s artifact.
   
   When you drill down for example to pods/scheduler logs you will see:
   ````
   2023-06-17T09:20:21.014975825Z stdout F [2023-06-17T09:20:21.014+0000] {kubernetes_executor.py:707} INFO - Changing state of (TaskInstanceKey(dag_id='example_kubernetes_executor', task_id='other_namespace_task', run_id='manual__2023-06-17T09:07:35.849355+00:00', try_number=1, map_index=-1), None, 'example-kubernetes-executor-other-namespace-task-i9qcs639', 'airflow', '1925') to None
   2023-06-17T09:20:21.014986528Z stdout F [2023-06-17T09:20:21.014+0000] {kubernetes_executor.py:711} ERROR - Exception: None is not a valid TaskInstanceState when attempting to change state of (TaskInstanceKey(dag_id='example_kubernetes_executor', task_id='other_namespace_task', run_id='manual__2023-06-17T09:07:35.849355+00:00', try_number=1, map_index=-1), None, 'example-kubernetes-executor-other-namespace-task-i9qcs639', 'airflow', '1925') to None, re-queueing.
   2023-06-17T09:20:21.014988629Z stdout F Traceback (most recent call last):
   2023-06-17T09:20:21.014990179Z stdout F   File "/home/airflow/.local/lib/python3.8/site-packages/airflow/executors/kubernetes_executor.py", line 709, in sync
   2023-06-17T09:20:21.014991743Z stdout F     self._change_state(key, TaskInstanceState(state), pod_name, namespace)
   2023-06-17T09:20:21.01499339Z stdout F   File "/usr/local/lib/python3.8/enum.py", line 339, in __call__
   2023-06-17T09:20:21.014994835Z stdout F     return cls.__new__(cls, value)
   2023-06-17T09:20:21.015001917Z stdout F   File "/usr/local/lib/python3.8/enum.py", line 663, in __new__
   2023-06-17T09:20:21.015004227Z stdout F     raise ve_exc
   2023-06-17T09:20:21.015005646Z stdout F ValueError: None is not a valid TaskInstanceState
   ```


-- 
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