Open javierhonduco opened 1 year ago
*whispers* Nix...
whispers Nix...
@maxbrunet I'd be happy to use Nix, as the base image of choice, for our build pipeline as long as it checks all our boxes. As far as I know, Nix means more reproducible builds, even locally.
We still have this project for these types of aspirations 🤗 https://github.com/parca-dev/cross-builder
Nix is not a base image, it is a build tool and package manager. It would replace goreleaser, podman, libbpf git-submodule, and probably parts of the Makefile and GHA workflows. If done correctly, it should check all the boxes very strictly... its main caveat being having to learn the language itself. If that's something you are willing to try, I'll try to find time to build a POC. I would need to do some research on how to structure it and other best practices (it would a first for me too).
cross-builder
would be unnecessary and this GitHub Action would be used in the workflows: install-nix. The container image could be use as an alternative to installing it locally.
https://github.com/parca-dev/parca-agent/issues/1304 add a way to download the dependencies and build locally for the current host.
We need to extend the script to cross-build against multiple architectures and configure goreleaser accordingly.
Also these configuration variable should be extended with -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
https://github.com/parca-dev/parca-agent/blob/bd6a25af07744bef33f85d7ae51cfadc3ce93f5f/.goreleaser.yml#L27
We depend on
libbpf
, which linkszlib
andlibelf
. Let's make sure that the versions of these packages we use are defined by us, and are not different across machines depending on the available version provided by the OS. While we are at it, let's compile them with frame pointers, too.I do this in
rbperf
forzlib
andlibelf
to ensure consistent builds and to make troubleshooting regressions in behaviour and performance easier with this script.cc @kakkoyun