foundry service restart doesn't show new version
I updated with winget upgrade Microsoft.FoundryLocal. Then I did the following sequence:
❯ foundry service restart
Restarting service...
🔴 Service is stopped.
🟢 Service is Started on http://127.0.0.1:53726/, PID 21248!
❯ foundry --version
0.6.87+e69a6c3d2b // NOTE: still showing the old version after restart
❯ foundry service stop
🔴 Service is stopped.
❯ foundry service status
🔴 Model management service is not running!
To start the service, run the following command: foundry service start
❯ foundry service start
🟢 Service is Started on http://127.0.0.1:61732/, PID 82348!
❯ foundry --version
0.7.120+3b92ed4014 // New version after stop/status/start
Hi @eerhardt, Thank you for reporting this bug.
If you go to Settings, then open up Apps > Installed Apps and search "Foundry Local", can you please check if you have more than one version of Foundry Local installed? Also, can you please check if you click on "Foundry Local" from the list of apps, what is the version installed?
please check if you have more than one version of Foundry Local installed?
No - only 1:
Also, can you please check if you click on "Foundry Local" from the list of apps, what is the version installed?
Same here after winget upgrade
Hi @eerhardt and @xgdgsc, we were able to reproduce the issue. Because Foundry Local has a persistent backend service running, winget upgrade does not replace the updated version of Foundry Local, as some resources are bound and currently in use.
To stop the service, you can run foundry service stop, as you showed in your initial example. Since no foundry resource is bound, the WinGet upgrade process will finish and the next time you use foundry, the upgraded version will be used. foundry service restart is not enough, since either the foundry application or the backend service is always in use, meaning there will always be some bound resources that prevent WinGet from finishing the upgrade process.
For now, we will add a note to the winget installation process to recommend using foundry service stop after running winget upgrade. In the future, Foundry Local will no longer rely on a backend service, so foundry service stop will no longer be necessary.