arduino-create-agent icon indicating copy to clipboard operation
arduino-create-agent copied to clipboard

Do not restart the agent if `POST /update` call should do nothing

Open Xayton opened this issue 9 months ago • 0 comments

When the agent processes the POST /update command, it will check if the latest version is newer than the agent version. If it's not, the command should not do anything. Instead it always restarts the agent.

  • It should also download the full executable only when it's not on the latest version, instead of always doing it.
  • If possible, the user agent used when downloading the updates should be changed from the default Go-http-client/2.0 to something like Arduino-Cloud-Agent/1.5.0.

https://github.com/arduino/arduino-create-agent/blob/main/update.go#L37-L49 The code above should be improved.

Xayton avatar May 23 '24 14:05 Xayton