dynatrace-extensions/dynatrace-extensions-vscode

Cancellation Token not processed for subprocess commands

radu-stefan-dt opened this issue · 1 comments

Current behavior:

Commands from the command palette such as "Build" may end up using the subprocess.runCommand utility to run shell commands on the system (e.g. checking for python sdk package, or building a python extension). This utility supports passing in a Cancellation Token from the upstream workflow so we can track and terminate the flow if the user has cancelled it.

However, while this terminates the workflow, it still leaves the shell process running as normal in the background.

Expected behavior:

The created subprocess should received a SIGTERM or SIGKILL signal so that it can be terminated upon cancellation.

This should also extend to ongoing web requests. Thr cancellationToken will be processed in the upstream command workflow but along with it an AbortController must be passed down to Axios so that whatever ongoing web request can be aborted once the cancellation is requested from the UI