Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INSTA-16822: Build on ubuntu+clang17, fix cross-build, QA #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

teresanovielloatinstana
Copy link
Collaborator

Reference

Jira ticket

WHAT

  1. Migrate base image of the ebpf-profiler building image from debian:testing to delivery.instana.io/int-docker-private-virtual/ubuntu:22.04
    Attention: Clang version on this image is 17, not 16.
  2. Refactor the files to build the ebpf-profiler building image to the directory docker-image
    The docker image entrypoint moves to /agent/go/bin all the binaries needed by GO for the generation and linting
  3. Makefile: pin GO deps versions
    Attention: pin porto version to "v0.6.0" (instead of latest). The latest version of porto requires GO 1.23.
  4. Makefile: fix the clean target.
  5. Makefiles: substitute clang-16 with clang.
  6. Makefile: remove the installation of GolangCi deps during linting.
  7. Makefile: add targets for GO deps management
  8. Fix cross-compilation

WHY

  1. Compliance
    2-8: Fixes

Migrate the build from DockerHub debian:testing to ubuntu:22.04.
Attention: Clang version on this image is 17, not 16.
Isolate docker files in directory docker-image.
Introduce an entrypoint for the docker image, to better deal with the GO
environment.
Dockerfile: install GolangCi deps in the docker image, copy the binaries
in the container's workdir in /agent/go/bin.
Makefile: fix the clean target.
Makefiles: substitute clang-16 with clang.
Makefile: remove the installation of GolangCi deps during linting.
Makefile: add targets for GO deps management
Makefile: pin GO deps versions
Makefile: pin porto version to "v0.6.0" (instead of latest).
The latest version of porto requires GO 1.23, while the current
toolchain is based on Go 1.22.
Makefile: improve target linter-version, print all GolangCi deps
versions.
GO: touch go/bin/.gitkeep, the directory bin contains the GO deps
print_instruction_count: fix OBJDUMP_CMD from llvm-objdump-16 to
llvm-objdump.
Makefile: Fix cross-compilation
Always use NATIVE_ARCH as GOARCH for go:generate. The previous approach
may fail on systems that can not execute cross-compiled binaries on the
build host (e.g. if an appropriate qemu binary is not installed).
Copy link

sonarqubecloud bot commented Jan 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant