Page MenuHomePhabricator

Use subprocess interrupt helpers in compute log subprocess

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



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

R1 dagster
Automatic diff as part of commit; lint not applicable.
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 ( was hanging before making that change)