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/01/14 21:42:15 UTC

[GitHub] [airflow] saisujithkp opened a new issue #20884: JSONDecodeError caused by incomplete JSON created by cat /airflow/xcom/return.json when using KubernetePodOperator

saisujithkp opened a new issue #20884:
URL: https://github.com/apache/airflow/issues/20884


   ### Apache Airflow Provider(s)
   
   cncf-kubernetes
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Apache Airflow version
   
   2.1.2
   
   ### Operating System
   
   RHEL 7.6
   
   ### Deployment
   
   Other 3rd-party Helm chart
   
   ### Deployment details
   
   _No response_
   
   ### What happened
   
   We are facing an issue similar to https://github.com/apache/airflow/pull/6799 with Airflow Version 2.1.2
   
   The program has a very large JSON object that should be inserted as an XCOM.  But `cat /airflow/xcom/return.json ` is incompletely emitting the object which then caused the below error
   
   **Error**
   
   > [2022-01-14 07:28:30,540] {taskinstance.py:1501} ERROR - Task failed with exception
   Traceback (most recent call last):
     File "/home/airflow/.local/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 1157, in _run_raw_task
       self._prepare_and_execute_task_with_callbacks(context, task)
     File "/home/airflow/.local/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 1331, in _prepare_and_execute_task_with_callbacks
       result = self._execute_task(context, task_copy)
     File "/home/airflow/.local/lib/python3.6/site-packages/airflow/models/taskinstance.py", line 1361, in _execute_task
       result = task_copy.execute(context=context)
     File "/home/airflow/.local/lib/python3.6/site-packages/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py", line 366, in execute
       final_state, remote_pod, result = self.create_new_pod_for_operator(labels, launcher)
     File "/home/airflow/.local/lib/python3.6/site-packages/airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py", line 520, in create_new_pod_for_operator
       final_state, remote_pod, result = launcher.monitor_pod(pod=self.pod, get_logs=self.get_logs)
     File "/home/airflow/.local/lib/python3.6/site-packages/airflow/providers/cncf/kubernetes/utils/pod_launcher.py", line 169, in monitor_pod
       result = json.loads(result)
     File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads
       return _default_decoder.decode(s)
     File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
       obj, end = self.raw_decode(s, idx=_w(s, 0).end())
     File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode
       raise JSONDecodeError("Expecting value", s, err.value) from None
   json.decoder.JSONDecodeError: Expecting value: line 287 column 22 (char 8192)
   
   Can something be done to avoid this from happening?
   
   ### What you expected to happen
   
   _No response_
   
   ### How to reproduce
   
   _No response_
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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



[GitHub] [airflow] ddelange commented on issue #20884: JSONDecodeError caused by incomplete JSON created by cat /airflow/xcom/return.json when using KubernetePodOperator

Posted by GitBox <gi...@apache.org>.
ddelange commented on issue #20884:
URL: https://github.com/apache/airflow/issues/20884#issuecomment-1013737121


   ref https://github.com/kubernetes-client/python-base/issues/190


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



[GitHub] [airflow] uranusjr commented on issue #20884: JSONDecodeError caused by incomplete JSON created by cat /airflow/xcom/return.json when using KubernetePodOperator

Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #20884:
URL: https://github.com/apache/airflow/issues/20884#issuecomment-1066225166


   They say you need to file to https://github.com/kubernetes-client/python instead.


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



[GitHub] [airflow] ddelange commented on issue #20884: JSONDecodeError caused by incomplete JSON created by cat /airflow/xcom/return.json when using KubernetePodOperator

Posted by GitBox <gi...@apache.org>.
ddelange commented on issue #20884:
URL: https://github.com/apache/airflow/issues/20884#issuecomment-1066521304


   @saisujith2 do you have time to write a new issue that reflects their current codebase?


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



[GitHub] [airflow] ddelange commented on issue #20884: JSONDecodeError caused by incomplete JSON created by cat /airflow/xcom/return.json when using KubernetePodOperator

Posted by GitBox <gi...@apache.org>.
ddelange commented on issue #20884:
URL: https://github.com/apache/airflow/issues/20884#issuecomment-1042607721


   would agree this is upstream. nevertheless, here is a potential hotfix on airflow side (unconfirmed): https://github.com/kubernetes-client/python-base/issues/190#issuecomment-805073981


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



[GitHub] [airflow] uranusjr commented on issue #20884: JSONDecodeError caused by incomplete JSON created by cat /airflow/xcom/return.json when using KubernetePodOperator

Posted by GitBox <gi...@apache.org>.
uranusjr commented on issue #20884:
URL: https://github.com/apache/airflow/issues/20884#issuecomment-1014134477


   Sounds like this is something Airflow can’t fix and need to wait for a patch in the Kubernetes dependency?


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



[GitHub] [airflow] ddelange commented on issue #20884: JSONDecodeError caused by incomplete JSON created by cat /airflow/xcom/return.json when using KubernetePodOperator

Posted by GitBox <gi...@apache.org>.
ddelange commented on issue #20884:
URL: https://github.com/apache/airflow/issues/20884#issuecomment-1066146827


   FYI, the upstream issue has been closed, as the repo was archived


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



[GitHub] [airflow] github-actions[bot] commented on issue #20884: JSONDecodeError caused by incomplete JSON created by cat /airflow/xcom/return.json when using KubernetePodOperator

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #20884:
URL: https://github.com/apache/airflow/issues/20884#issuecomment-1042428496


   This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.


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