Skip to content

Commit

Permalink
k8s fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
oavdeev committed Sep 20, 2021
1 parent f8a4c4e commit 600210e
Show file tree
Hide file tree
Showing 2 changed files with 149 additions and 69 deletions.
5 changes: 2 additions & 3 deletions metaflow/plugins/aws/eks/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ def _print_available(tail, stream, should_persist=False):
_print_available(stdout_tail, "stdout")
_print_available(stderr_tail, "stderr")


if self._job.has_failed:
exit_code, reason = self._job.reason
msg = next(
Expand All @@ -358,9 +359,7 @@ def _print_available(tail, stream, should_persist=False):
"%s. This could be a transient error. "
"Use @retry to retry." % msg
)
elif not self._job.is_done:
# Kill the job if it is still running by throwing an exception.
raise KubernetesKilledException("Task failed!")

exit_code, _ = self._job.reason
echo(
"Task finished with exit code %s." % exit_code,
Expand Down

0 comments on commit 600210e

Please sign in to comment.