https://prefect.io logo
#prefect-community
Title
# prefect-community
c

Chu Lục Ninh

03/29/2022, 11:25 AM
I seemed like
prefect.tasks.kubernetes.job.RunNamespacedJob
doesn't report properly to prefect server. I didn't receive any log from spawned kubernetes job at all. Here are my screenshots
a

Anna Geller

03/29/2022, 12:11 PM
To get the logs, you need to use an extra task:
ReadNamespacedPodLogs
Here is an example that shows how this can be used together with
RunNamespacedJob
c

Chu Lục Ninh

03/29/2022, 12:55 PM
RunNamespacedJob
already uses that, check it here https://github.com/PrefectHQ/prefect/blob/bc2d32d1fad886a911828e32b6ed7d50a7ee5102/src/prefect/tasks/kubernetes/job.py#L765 The log only printed to stdout, but didn't report back to server. Check the second image I post, it is kubernetes log of the flow
nevermind, release
1.1.0
fixed it https://github.com/PrefectHQ/prefect/pull/5514
👍 1
3 Views