kolide / launcher

Osquery launcher, autoupdater, and packager
https://kolide.com/launcher
Other
505 stars 100 forks source link

Allow control server to pin version for osqueryd and launcher #1629

Closed RebeccaMahany closed 7 months ago

RebeccaMahany commented 7 months ago

Relates to https://github.com/kolide/launcher/issues/1577

Some users may want to pin a particular version of osqueryd or launcher. This PR enables that functionality via the TUF autoupdater.

If a pinned version is set, the autoupdater will select that version first. If it cannot find that version, then it will fall back to using the release version for the configured update channel.

While working on this PR, I noticed I had a couple related functions about parsing and comparing versions, so I've moved them into their own file and separated out their tests as well.

Also -- updated to handle control server actions during the initial delay in a clearer and more opinionated way:

James-Pickett commented 7 months ago

LGTM!