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

Validate tracer blob reproducibility in CI #44

Open
athre0z opened this issue Jun 24, 2024 · 1 comment
Open

Validate tracer blob reproducibility in CI #44

athre0z opened this issue Jun 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@athre0z
Copy link
Member

athre0z commented Jun 24, 2024

Problem

We are currently committing our eBPF tracer blobs into version control to easily allow pulling in the profiler's code as a library in other Go applications. While this is a bit of a hack, it is consistent with what other OTel projects do with generated resources such as protoc generated code. One issue with this approach, however, is that we rely on PR authors to also update the tracer blobs whenever they change BPF code.

Proposed solution

To ensure that people cannot forget to update the blobs or sneak in changes that aren't reflected in the source files they change along with that into our tracer binaries, we should:

  • Encourage users to build the tracers with our future builder image
  • Add a CI workflow that builds the tracers and ensures that they are byte-by-byte equivalent to what is being committed

We have already verified that the tracer executable build itself is reproducible even when cross-compiling as long as the same toolchain is being used.

Alternatives

Move away from committing tracers into VC

We could stop committing our tracers into VC, forcing downstream "profiling agent as a library" consumers to use this repository as a submodule (or otherwise clone the repo) and build the tracers themselves, passing in the blob in the Tracer constructor.

@athre0z athre0z added the enhancement New feature or request label Jun 24, 2024
@rockdaboot
Copy link
Contributor

rockdaboot commented Jun 24, 2024

Move away from committing tracers into VC

If we are going to add OTEL receiver/collector code (so far it looks like every stakeholder wants it), we want to support the ocb tool. This tool works best in a pure Go environment.

I'd really prefer the suggested CI workflow. We possibly can extend it to add the tracer blobs to the PR, whenever the CI blobs are different from the blobs in the target branch.

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

No branches or pull requests

2 participants