Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

Kubectl process lingers after VS Code is closed and has a handle on the opened folder #69

Open
maras28 opened this issue Oct 29, 2020 · 3 comments

Comments

@maras28
Copy link

maras28 commented Oct 29, 2020

Describe the bug
I cannot delete a folder I opened and worked with in VS Code because kubectl has an handle on. kubectl process lingers on after I close VS Code and each time I do this, the number of kubectl processes running increases. It seems kubectl process is being left over. I am using Windows 10.

Note that if I disable this extension, there is no kubectl process, no handle, and no problem.

To Reproduce
Steps to follow to reproduce this issue.

  1. Create a folder someplace.
  2. Open VS Code
  3. Open the folder
  4. Close VS Code
  5. Try to delete the folder. You should get a message saying the action cannot be performed because the folder is in use.

Expected behavior
First, there should not be any process lingering and I should be able to delete the folder I was working. Second, why is kubectl process being launched eagerly when clearly what I am doing has nothing to do with Kubernetes.

Environment Details
Version: 1.51.0-insider (user setup)
Commit: 2ee8b8c645ec8ab54304bacae7aa979c1d9c647a
Date: 2020-10-29T06:01:21.160Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19042

Thanks.

@amsoedal
Copy link
Contributor

Hi @maras28, thanks so much for reporting this issue. I'm logging a bug for us to investigate this further. We'll update this thread as soon as we get to the root cause.

@daniv-msft
Copy link
Collaborator

Thank you @maras28 for reporting this issue. I can confirm I'm able to reproduce the behavior you see where the current folder cannot be deleted when the extension is installed.

However, in my case, this doesn't seem related to kubectl as I reproduce this without the corresponding logic. Also, looking at the handles blocked in the Resource Monitor, I can only see that code (so VS Code) is blocking the folder.

Have you seen the handle being taken specifically by kubectl in your case?
In parallel, I'm still investigating to understand the root cause of this.

@maras28
Copy link
Author

maras28 commented Oct 31, 2020

I also use the Resource Monitor. I just did the steps above twice in two different VS Code instances and I have two kubectl processes with a handle to the folder I tried.
VCode Kubectl Folder Lock

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants