GoogleCloudPlatform / prometheus-engine

Google Cloud Managed Service for Prometheus libraries and manifests.
https://g.co/cloud/managedprometheus
Apache License 2.0
191 stars 89 forks source link

Allow NO_DOCKER mode of running all (if possible) commands with pinned deps (e.g. using bingo) #802

Open bwplotka opened 7 months ago

bwplotka commented 7 months ago

Currently all commands run things in docker container (including e2e and kind). This has benefit of ultimate hermetization (less "why it works on my machine, but not on CI" moments).

However there are downsides of that: harder to debug those commands (not intuitive, more layers), harder to edit commands (passing arguments), surprising side effects (state is often copied at the start and result is copied back overwriting changes in the mean time, and little to significant (depends on env) latency penalty especially for quick commands.

Since all our tools (at least most) are in Go, we could use https://github.com/bwplotka/bingo to pin them. We could verify envvars, go version, OS etc. We can slim our commands in latency while keeping majority of hermetization benefits. We also can agree on basic prerequisites outside of bingo (e.g. Linux/Mac, modern bash, Go 1.19+ installed etc).

We could also do this work while having NO_DOCKER env OR dedicate copy of the command for no docker run of the same thing to allow playing with the new mode and gather more data what we want 🤗