Page MenuHomeElementl

stop swallowing the causes of exceptions in log strings

Authored by sandyryza on Jan 4 2021, 9:19 PM.
Referenced Files
Unknown Object (File)
Sep 7 2022, 4:30 AM
Unknown Object (File)
Sep 5 2022, 1:25 AM
Unknown Object (File)
Sep 2 2022, 10:13 PM
Unknown Object (File)
Aug 27 2022, 7:22 AM
Unknown Object (File)
Aug 23 2022, 9:20 AM
Unknown Object (File)
Aug 23 2022, 1:34 AM
Unknown Object (File)
Aug 20 2022, 11:05 PM
Unknown Object (File)
Aug 20 2022, 9:47 PM



Prior, if an exception was raised from another exception, the sub-exception would not be included in the logs.

Test Plan


Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Jan 4 2021, 9:35 PM
Harbormaster failed remote builds in B23587: Diff 28679!

can we test how the log message is in console and in dagit

Here's what shows up in Dagit:

image.png (696×1 px, 159 KB)

Here's what shows up in the CLI:

2021-01-05 13:13:35 - dagster - ERROR - error_monster - 5015c300-7e2b-4e7e-8601-5d4af76a86b3 - 22940 - start - STEP_FAILURE - Execution of step "start" failed.

ValueError: outer error

Stack Trace:
  File "/Users/sryza/dagster/python_modules/dagster/dagster/core/", line 184, in user_code_error_boundary
  File "/Users/sryza/dagster/python_modules/dagster/dagster/utils/", line 356, in iterate_with_context
    next_output = next(iterator)
  File "/Users/sryza/dagster/python_modules/dagster/dagster/core/execution/plan/", line 99, in _execute_core_compute
    for step_output in _yield_compute_results(compute_context, inputs, compute_fn):
  File "/Users/sryza/dagster/python_modules/dagster/dagster/core/execution/plan/", line 67, in _yield_compute_results
    for event in user_event_sequence:
  File "/Users/sryza/dagster/python_modules/dagster/dagster/core/definitions/decorators/", line 227, in compute
    result = fn(context, **kwargs)
  File "/Users/sryza/dagster/python_modules/dagster-test/dagster_test/toys/", line 85, in emit_num
    raise ValueError("outer error") from e

The above exception was the direct cause of the following exception:
ValueError: inner error

Stack Trace:
  File "/Users/sryza/dagster/python_modules/dagster-test/dagster_test/toys/", line 83, in emit_num
    raise ValueError("inner error")

The latter is tested in

This revision is now accepted and ready to land.Jan 5 2021, 9:59 PM