Skip to content

Commit

Permalink
set ErrorSource when retry request limit exceeded (#6806)
Browse files Browse the repository at this point in the history
  • Loading branch information
alangenfeld committed Feb 28, 2022
1 parent c157260 commit ca94d8d
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,15 +242,20 @@ def _dagster_event_sequence_for_step(step_context: StepExecutionContext) -> Iter
prev_attempts = step_context.previous_attempt_count
if prev_attempts >= retry_request.max_retries:
fail_err = SerializableErrorInfo(
message="Exceeded max_retries of {}".format(retry_request.max_retries),
message=f"Exceeded max_retries of {retry_request.max_retries}\n",
stack=retry_err_info.stack,
cls_name=retry_err_info.cls_name,
cause=retry_err_info.cause,
)
step_context.capture_step_exception(retry_request)
yield DagsterEvent.step_failure_event(
step_context=step_context,
step_failure_data=StepFailureData(error=fail_err, user_failure_data=None),
step_failure_data=StepFailureData(
error=fail_err,
user_failure_data=None,
# set the flag to omit the outer stack if we have a cause to show
error_source=ErrorSource.USER_CODE_ERROR if fail_err.cause else None,
),
)
else:
yield DagsterEvent.step_retry_event(
Expand Down

0 comments on commit ca94d8d

Please sign in to comment.