Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaskVineExecutor: Enable exception chaining when functions are executed to provide detailed error messages. #2926

Merged
merged 1 commit into from
Oct 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions parsl/executors/taskvine/executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,22 @@ def _collect_taskvine_results(self):
with open(task_report.result_file, 'rb') as f_in:
result = deserialize(f_in.read())
except Exception as e:
logger.debug(f'Cannot load result from result file {task_report.result_file}. Exception: {e}')
future.set_exception(TaskVineTaskFailure('Cannot load result from result file', None))
logger.error(f'Cannot load result from result file {task_report.result_file}. Exception: {e}')
ex = TaskVineTaskFailure('Cannot load result from result file', None)
ex.__cause__ = e
future.set_exception(ex)
else:
future.set_result(result)
if isinstance(result, Exception):
ex = TaskVineTaskFailure('Task execution raises an exception', result)
ex.__cause__ = result
future.set_exception(ex)
else:
future.set_result(result)
else:
# If there are no results, then the task failed according to one of
# taskvine modes, such as resource exhaustion.
future.set_exception(TaskVineTaskFailure(task_report.reason, None))
ex = TaskVineTaskFailure(task_report.reason, None)
future.set_exception(ex)

# decrement outstanding task counter
with self._outstanding_tasks_lock:
Expand Down