kolide / launcher

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

Don't trigger TUF when running from build directory #1607

Closed directionless closed 4 months ago

directionless commented 5 months ago

The old updater had the side effect of not triggering the update check when running from a build dir. I found that quite convenient, as I'm often running launcher in a development cycle. This recreates that behavior with a somewhat klunky path check.

If y'all think it will have some unknown impact around CI or testing, speak up...

RebeccaMahany commented 5 months ago

I don't think there will be a negative impact to doing this, so if you want it, sure.

I am personally not in favor of adding this -- I don't think we need to add additional complexity to an already complicated system when there are already two other workarounds that meet this need during development (LAUNCHER_SKIP_UPDATES and localdev_path).

directionless commented 5 months ago

I'm willing to hold while we figure out what we want, and how to cleanly handle it.

Mostly, I want to be able to do things like make && ./build/launcher and get the build I just made. And I see the other things are serving different purposes. LAUNCHER_SKIP_UPDATES was designed as an internal safety to prevent forkbombs, localdev_path is for doing local TUF development.

RebeccaMahany commented 5 months ago

localdev_path isn't just for local TUF development but for all local development purposes -- e.g. I set localdev_path /path/to/my/launcher/build/darwin.universal/Kolide.app/Contents/MacOS/launcher in my launcher.flags file and unload/build/reload for all local development. (It was meant to be a replacement for the workflow where you could create a new timestamp dir in /usr/local/kolide-k2/bin/launcher-updates and copy a build there to run your desired launcher build.)

directionless commented 5 months ago

localdev_path isn't just for local TUF development but for all local development purposes

If we believe that, then we should make it part of the development environment. I'm not totally sure how we'd want to do that. And I kinda feel mixed. I like things to just DTRT when possible

RebeccaMahany commented 5 months ago

@directionless I think the discussion is getting long enough that we should move it to slack, or if you want to table it for our next team meeting -- I would like to know what "make it a part of the development environment" entails for you (plus I would also like to know if localdev_path has been adequate/not painful for James and Zack, or if they also want an alternative like this)

directionless commented 4 months ago

We discussed this today, and I think concluded we should merge it.