Page MenuHomeElementl

Fix coroutine bug for solid invocation
ClosedPublic

Authored by cdecarolis on Jul 13 2021, 5:45 PM.

Details

Summary

Previously, if someone tried to await from an invocation of async solid, and had a type on their outputs, we would fail. This fixes to wrap the resulting coroutine and type check properly, and also cleans up a bit of code along the way.

Test Plan

added unit test for coroutine case.

Diff Detail

Repository
R1 dagster
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Remove need for pytest.mark.asyncio, which is another package

behold

python_modules/dagster/dagster_tests/core_tests/test_solid_invocation.py
689–695

should we just do async def test_ and await instead of manual look manipulation? seems like a pytest thing we can take advantage of

This revision is now accepted and ready to land.Jul 13 2021, 8:26 PM
python_modules/dagster/dagster_tests/core_tests/test_solid_invocation.py
689–695

the pytest stuff requires another package and I opted towards not requiring another package. Would be an easy add though if we wanted to go that route.