Skip to content

Commit

Permalink
master resolve bug causing pod logs to not be printed
Browse files Browse the repository at this point in the history
Signed-off-by: James Crabtree <[email protected]>
  • Loading branch information
james-crabtree-sp committed Oct 25, 2023
1 parent 5a8018d commit 938b903
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,6 @@ def _await_path_materialization(
f"(of {total_pods}) complete with status {job.status()}"
)
except BaseException as e:
if self.batch_engine_config.print_pod_logs_on_failure:
self._print_pod_logs(job.job_id(), feature_view, batch_start)

logger.info(f"Deleting job {job.job_id()}")
try:
self.batch_v1.delete_namespaced_job(job.job_id(), self.namespace)
Expand All @@ -268,6 +265,12 @@ def _await_path_materialization(
f"Could not delete configmap due to API Error: {ae.body}"
)

if (
job.status() == MaterializationJobStatus.ERROR
and self.batch_engine_config.print_pod_logs_on_failure
):
self._print_pod_logs(job.job_id(), feature_view, batch_start)

return job

def _print_pod_logs(self, job_id, feature_view, offset=0):
Expand Down

0 comments on commit 938b903

Please sign in to comment.