sumologic-otel-collector
sumologic-otel-collector copied to clipboard
Replace Cross Toolchain with Native aarch64 Builder
The way https://github.com/SumoLogic/sumologic-otel-collector/pull/1321 is going, we're going to introduce a musl-targeting C toolchain for each of our linux fips platforms (linux_amd64 and linux_arm64).
Building the toolchain from source in CI has a number of issues. Primarily, though, the issue is that it will be flaky. Downloading the source of gcc, musl, and a half dozen c libraries from miscellaneous mirrors is not always quick, and the mirrors seem to be less than reliable. If this becomes a huge issue we could find a way to cache sources and or the whole toolchain ourselves.
It'd be better to nix the idea of building our own toolchains all-together, and simply use the toolchain that comes packaged with alpine linux, alpine-sdk (native only.) When we get access to aarch64 builders we can tear out all of the toolchain building infrastructure and run the same make command but in an alpine container. A very crude and likely non-functional version of this may look like this:
docker run --rm -v $repo-root:/work -w /work golang:1.20.10-alpine3.18 \
/bin/sh \
-c 'apk add alpine-sdk && make otelcol-sumo-linux_amd64 -C ./otelcolbuilder CGO_ENABLED=1 FIPS_SUFFIX="-fips"'