docker-prune-.lock files should be automatically deleted when debugging finishes

Using Torizon IDE to build, download and debug code with a development board, part of the standard task.json is to call /.conf/remove-dangling-images.xsh
That creates a lock file /tmp/docker-prune-{unique hw id}.lock

The lock file is not deleted when the debug session ends
The lock file is owned by the current user

We have a number of developers working through a shared server and sharing a single development board for some of our testing. Therefore if one user does not manually delete the lock file when they are finished then others are blocked from running code by linux file security:

Executing task: .conf/remove-dangling-images.xsh  

xonsh: For full traceback set: $XONSH_SHOW_TRACEBACK = True
PermissionError: [Errno 13] Permission denied: '/tmp/docker-prune-5xxxxxxxxx400f0ff.lock'

Therefore I suggest adding some automatic deletion of the lock when a debug session finishes

Greetings @Gideon1,

I’ll forward your suggestion here to our IDE extensions team for further consideration and discussion.

Best Regards,
Jeremias

Our team discussed this briefly and addressed this with the following PR: remove-dangling-images: Remove residual lock file after execution by andreriesco · Pull Request #351 · torizon/vscode-torizon-templates · GitHub

Now the lock file should be removed after execution of the task it was needed for. This should be in the next version of the Torizon extension.

Best Regards,
Jeremias

1 Like