Page MenuHomePhabricator

Fix queued runs test - race condition on storage creation
ClosedPublic

Authored by johann on Fri, Nov 20, 7:55 PM.

Details

Summary

Both the test process and the spawned daemon would try to initialize the instance, leading to https://dev.azure.com/elementl/dagster/_build/results?buildId=10076&view=logs&j=4e8e61ab-cdcc-5fb5-0caf-ebfe77ae9f01&t=a197a35e-3187-5338-927a-3831ce363aeb&l=244

This creates the instance first in the test process before spawning the daemon

Test Plan

existing

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.

Event Timeline

dgibson published this revision for review.Fri, Nov 20, 7:56 PM
dgibson added inline comments.
python_modules/dagster/dagster_tests/daemon_tests/integration_tests/test_queued_run_coordinator_integration.py
51–52

still important to wrap this in a contextmanager so it cleans up

with DagsterInstance.get() as instance:

after that change, looks great

This revision is now accepted and ready to land.Fri, Nov 20, 7:56 PM
This revision was landed with ongoing or failed builds.Fri, Nov 20, 8:01 PM
This revision was automatically updated to reflect the committed changes.