LOLINTERNETZ / vscodeoffline

Enables Visual Studio Code's extension gallery to be used in offline (air-gapped) environments. Or, run your own gallery!
https://hub.docker.com/u/lolinternet
MIT License
97 stars 31 forks source link

Extensions auto update #41

Closed tomer953 closed 2 years ago

tomer953 commented 2 years ago

Hi,

I just noticed a small issue, the extensions in my vscode is not updating to the lastest version availble in the gallery.

IE:

  1. install extension version 1.0.0
  2. sync new versions to the air-gapped network, ie: 2.0.0
  3. restart the gallery service
  4. in VSCODE, go to the extensions tab and check for updates: Check for extensions updates
  5. Also, try to restart vscode

This steps do not trigger the extensions update, however:

  1. if you start typing the name of the extension in the search box, (actually triggering search of this extension) - then it find the updates and install automatically

I guess it is cache related, can we solve this behavior ?

LOLINTERNETZ commented 2 years ago

Thanks @tomer953. That is very strange. From what you've described, it sounds like the VSCode client might be caching something. Do you have any other proxies or layers in between? There's no cloudflare or anything funky I'd assume?

The gallery component is pretty dumb and it's been restarted. It makes sense the client might do some caching (or perhaps it's been added recently). I had a really quick look on the VSCode Issues tracker and there wasn't anything obvious aside from a few issues referencing service workers blowing out disk usage (feels smokey) if they're aggressively caching resources. Might need to dig into this more.

Does this manual update button work for you? There might also be some strange fail logs showing up as well.

image
tomer953 commented 2 years ago

Hi, no more proxies afaik. and the Manuel button does nothing as I described in section 4.

we need some logs of whats happened when this button clicked, why it says no updates. maybe your python simple server need to cancle caching ? ( I do this sometimes in nodejs+express with this package https://www.npmjs.com/package/nocache )

Also, I wonder if its related to me have multiple instances of vscode open, so after the weekend ill try some more things. (plus ill need to find a way how to easily fake an update as well)

tomer953 commented 2 years ago

So here some more information:

So the query is see that the extension has another version but do not update it. only after searching ENV in the search bar, and triggering another search query, the extension appear with Update to 0.2.0 button (also not updating automatically for some reason) `

Ill try a few more things and update, but If you have a direction on what causing it please share

Edit: another team member told me that the extensions has been updates on his machine. I will take a look in another machines to examine the issue

Edit 2: It seems that the way I faked the package update is not good enough, and this is why the installation was not automatically after I searched for the extension - I found it because a manual installation is not worked as well. its not really related to the issue because it a side effect of my test, but I guess if I want to fake version update I need also to override the files itself and not only the json files. (since in the installation process it verifies for a matching version inside the vsix package) so for the next tests I will need to find a real update for some extensions

tomer953 commented 2 years ago

Ok other team members are getting the updates, so it something with my machine, ill try to solve it by myself