okteto / docker-desktop-extension

Docker Extension for Okteto
Apache License 2.0
5 stars 4 forks source link

Keep the state of the extension #25

Open rberrelleza opened 2 years ago

rberrelleza commented 2 years ago

According to the docker desktop team, they don't have plans to automatically save the extension's state. every time you click out of it, the component is trashed, and the expectation is that the extension will generate its state back when it's loaded again. This means that we need to find a way to either store the state on a volume (maybe a file that describes the status so we don't have to query everything every single time?) or store it in the cloud and rebuild the state every time.

this is not required for Dockercon, but it's something we should do soon since it seriously impacts the usability of the extension.

rlamana commented 2 years ago

Since it uses electron underneath, we might be able to use localStorage to keep the state without the need of using the backend of the extension. I'll give that a try and see if it works.

rberrelleza commented 2 years ago

The docker team mentioned that we could use a docker volume as well (or that's what I understood)

rlamana commented 2 years ago

The localStorage thing works, while Docker Desktop is open. If the user quits the entire application it will get restarted.