Replies: 3 comments
-
Thanks for opening your first issue here! Be sure to follow the issue template! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Work-around could be: import textwrap
from airflow.exceptions import AirflowException
from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import (
KubernetesPodOperator,
)
class CustomKubernetesPodOperator(KubernetesPodOperator):
def execute(self, context):
try:
super().execute(context)
except AirflowException as e:
msg = str(e)
short_msg = textwrap.shorten(msg, width=160)
raise AirflowException(short_msg) from None |
Beta Was this translation helpful? Give feedback.
0 replies
-
A pod failing should be a rare event, and then having all the configuration is very helpful |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Currently if container launched via KubernetesPodOperator returns with non-zero exit code, whole pod configuration is printed to logs and this multiple times due to exception re-raising. This makes logs unreadable.
There should be some method to avoid showing pod config json in case of non-zero exit code.
Sample DAG:
Use case/motivation
No response
Related issues
No response
Are you willing to submit a PR?
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions