sdk-core icon indicating copy to clipboard operation
sdk-core copied to clipboard

[Feature Request] Expose ephemeral server PID and confirm shutdown destroys process

Open cretz opened this issue 1 year ago • 2 comments

Describe the solution you'd like

Need to see ephemeral server PID for lang to do some validations against it (and users may want to know about it too). Also need to confirm the process is gone in CI tests. See https://github.com/temporalio/features/issues/470.

cretz avatar Apr 26 '24 16:04 cretz

Exposing it for users is reasonable but I do think it's worth verifying that everything we need to do can't be done solely in Core. I see no reason it couldn't - particularly if we start using process groups for the spawned children which usually makes for a convenient way to clean up this sort of thing. There are libs that abstract over the OS for this purpose.

Sushisource avatar Apr 26 '24 16:04 Sushisource

The two main problems are that 1) different lang runtimes (e.g. python binary) set different OS-level things that make child process behavior behave differently, and 2) core does not test across all platforms we support in CI. But yes, the Tokio libraries already mention that they wait for process complete, but there are caveats that are per-parent process which is lang specific.

cretz avatar Apr 26 '24 16:04 cretz