Page MenuHomePhabricator

Adjust stacklevel for @pipeline return value warning
ClosedPublic

Authored by sandyryza on Oct 24 2020, 12:21 AM.

Details

Summary

Current warning:

/Users/sryza/dagster/python_modules/dagster/dagster/core/definitions/decorators/pipeline.py:41: UserWarning: You have returned a value out of a @pipeline-decorated function. This currently has no effect on behavior, but will after 0.10.0 is released. In order to preserve existing behavior to do not return anything out of this function. Pipelines (and its successor, graphs) will have meaningful outputs just like composite solids do today, and the return value will be meaningful.

With stacklevel adjusted:

/Users/sryza/dagster/python_modules/dagster-test/dagster_test/toys/hammer.py:87: UserWarning: You have returned a value out of a @pipeline-decorated function. This currently has no effect on behavior, but will after 0.10.0 is released. In order to preserve existing behavior to do not return anything out of this function. Pipelines (and its successor, graphs) will have meaningful outputs just like composite solids do today, and the return value will be meaningful.

Test Plan

manual

Diff Detail

Repository
R1 dagster
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.