opentelemetry-demo icon indicating copy to clipboard operation
opentelemetry-demo copied to clipboard

Support multi-arch builds

Open austinlparker opened this issue 1 year ago • 4 comments

This fixes the problems with multi-arch builds -- the context for each build is not consistent.

austinlparker avatar Oct 23 '22 22:10 austinlparker

Ok, good news/bad news.

Good news, this is actually building things! Bad news, it's slow as heck because of qemu emulation.

I believe we could fix this by using https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ to build amd64 base images and arm64 binaries, but I'm not entirely sure if that'll help for stuff like PHP. I'd intuit that it'd help in C++, but I'm not sure if it'd work to build amd64 grpc and otel then link to an arm64 binary.

Would love if @brettmc and/or @DebajitDas could chime in with ideas as well.

austinlparker avatar Oct 24 '22 16:10 austinlparker

Cc @lalitb on the above question too

cartersocha avatar Oct 24 '22 16:10 cartersocha

but I'm not sure if it'd work to build amd64 grpc and otel then link to an arm64 binary.

That won't work for C++. Tagging @esigo as he has done some work on qemu/ARM CI builds earlier.

lalitb avatar Oct 24 '22 20:10 lalitb

I know only two ways to address the slow build issue.

  1. The dependencies being stored in some image and hosted in some registry (not possible for us I think).
  2. Saving the dependencies image in GitHub actions artifact and loading the artifact before builds similar to what I was trying to do here.

I can work on the second option after C++ metric GA.

esigo avatar Oct 24 '22 21:10 esigo

Please see https://github.com/open-telemetry/opentelemetry-demo/issues/458#issuecomment-1297170414 for the current state of work here.

austinlparker avatar Oct 31 '22 16:10 austinlparker