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

[PoC] Run integration tests using docker-compose #1140

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Sep 30, 2024

  • Updates all e2e tests so they can be run with docker-compose
  • Adds additional make targets to run e2e tests in docker-compose
  • Replaces indeterminate timing steps for assumed completion with deterministic signal passing and handling
    • The sample app waits for a signal that the auto-instrumentation is ready
    • The collector is shutdown when it is verified the telemetry has been generated
  • A Github workflow is added to run the e2e tests using docker compose

Testing tools

Test runner

Adds a runner utility to run testing target applications with auto-instrumentation setup. This allows us to send run the sample application and auto-instrumentation from the same process and coordinate their execution by sending signals.

Collector

Wraps the OTel collector in an HTTP server that listens for a "shutdown" signal. It will gracefully flush and stop the collector when this signal is received

Executioner

Examples the collector's export metrics to determine when the expected number of spans have been processed. It then sends a "shutdown" signal to the collector

Example

$ make e2e-autosdk e2e-databasesql e2e-gin e2e-grpc e2e-kafka-go e2e-nethttp e2e-nethttp-custom e2e-otelglobal
# Test output ...

@pellared
Copy link
Member

pellared commented Oct 2, 2024

I guess it makes also debugging easier.

@RonFed
Copy link
Contributor

RonFed commented Oct 3, 2024

looks great.
To run this on non-Linux machines we'll need to run it inside a container, right?

@MrAlias
Copy link
Contributor Author

MrAlias commented Oct 3, 2024

looks great. To run this on non-Linux machines we'll need to run it inside a container, right?

I'm guessing, based on what @damemi said in the SIG meeting, it'll need to be run in a VM given the kernel still needs to support eBPF outside of the container.

That said, we'll probably still want to run this in a container on Linux to get sandbox the permissions issues and not have to run this with sudo.

@MrAlias MrAlias force-pushed the local-e2e branch 10 times, most recently from c0daf92 to 2799f0b Compare December 7, 2024 00:31
@MrAlias MrAlias mentioned this pull request Dec 9, 2024
@MrAlias MrAlias force-pushed the local-e2e branch 2 times, most recently from 5103924 to 2bf52d7 Compare December 20, 2024 18:06
@MrAlias MrAlias changed the title [PoC] Run integration tests locally [PoC] Run integration tests using docker-compose Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants