Page MenuHomePhabricator

Use subprocess interrupt helpers in compute log subprocess
ClosedPublic

Authored by dgibson on Mon, Nov 9, 3:46 PM.

Details

Summary

When we finish executing a plan on windows, we currently SIGTERM the tail process, which might leave a file handle open (manifesting as test flakiness on windows). Instead, use the interrupt machinery we use elsewhere to interrupt subprocesses, giving the subprocess a chance to clean up the file handle.

Test Plan

Run test_retry_deferral 250 times on windows, no more failures

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

This revision is now accepted and ready to land.Mon, Nov 9, 4:14 PM

in the off-chance that the interrupt comes in at a bad time (e.g. during a destructor), check for the signal at each iteration

oh wow I thought adding the delay_interrupts was just me being picky but it actually seems to keep things from hanging and interrupts getting swallowed (https://dev.azure.com/elementl/dagster/_build/results?buildId=9876&view=results was hanging before making that change)