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

add minimal test for otel agent BYOC Docker build #29807

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jackgopack4
Copy link
Contributor

@jackgopack4 jackgopack4 commented Oct 4, 2024

What does this PR do?

Adds docker_image_build_otel integration test to build and run the OTel Agent Bring Your Own Collector (BYOC) Docker image, verifying that a "version" command passed to the otel-agent entrypoint succeeds

Motivation

Closes OTEL-1989

Describe how to test/QA your changes

Run integration_tests stage of gitlab CI, see passing job here: https://gitlab.ddbuild.io/DataDog/datadog-agent/-/jobs/662106364

Possible Drawbacks / Trade-offs

Runs a static command in otel.yml, could expand tests and functionality in the future by making the test call an invoke command

Additional Notes

Also adds updates to JOBOWNERS and CODEOWNERS file to reflect OTEL team ownership of OTEL-related test files.

@jackgopack4 jackgopack4 added changelog/no-changelog qa/no-code-change Skip QA week as there is no code change in Agent code labels Oct 4, 2024
@jackgopack4 jackgopack4 added this to the 7.60.0 milestone Oct 4, 2024
@jackgopack4 jackgopack4 added the team/opentelemetry OpenTelemetry team label Oct 4, 2024
@agent-platform-auto-pr
Copy link
Contributor

Gitlab CI Configuration Changes

Added Jobs

docker_image_build_otel
docker_image_build_otel:
  before_script:
  - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
  - rm -f modcache.tar.xz
  - mkdir -p /tmp/otel-ci
  - cp comp/otelcol/collector-contrib/impl/manifest.yaml /tmp/otel-ci/
  - cp Dockerfiles/agent-ot/Dockerfile.agent-otel /tmp/otel-ci/
  - cp test/integration/docker/otel_agent_build_tests.py /tmp/otel-ci/
  image: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/datadog-agent-buildimages/docker_x64$DATADOG_AGENT_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_BUILDIMAGES
  needs:
  - go_deps
  - integration_tests_otel
  rules:
  - if: $CI_PIPELINE_SOURCE =~ /^schedule.*$/
    when: never
  - if: $CI_COMMIT_TAG
    when: never
  - if: $CI_COMMIT_MESSAGE =~ /.*\[skip cancel\].*/
    when: never
  - if: $CI_COMMIT_REF_NAME =~ /.*-skip-cancel$/
    when: never
  - when: always
  script:
  - docker build -t agent-byoc:latest -f /tmp/otel-ci/Dockerfile.agent-otel /tmp/otel-ci
  - OT_AGENT_IMAGE_NAME=agent-byoc OT_AGENT_TAG=latest python3 /tmp/otel-ci/otel_agent_build_tests.py
  stage: integration_test
  tags:
  - runner:docker

Changes Summary

Removed Modified Added Renamed
0 0 1 0

ℹ️ Diff available in the job log.

@jackgopack4 jackgopack4 requested review from a team and mx-psi and removed request for a team October 4, 2024 16:31
@jackgopack4 jackgopack4 marked this pull request as ready for review October 4, 2024 16:31
@jackgopack4 jackgopack4 requested review from a team as code owners October 4, 2024 16:31
@agent-platform-auto-pr
Copy link
Contributor

[Fast Unit Tests Report]

On pipeline 45852665 (CI Visibility). The following jobs did not run any unit tests:

Jobs:
  • tests_deb-arm64-py3
  • tests_deb-x64-py3
  • tests_flavor_dogstatsd_deb-x64
  • tests_flavor_heroku_deb-x64
  • tests_flavor_iot_deb-x64
  • tests_rpm-arm64-py3
  • tests_rpm-x64-py3
  • tests_windows-x64

If you modified Go files and expected unit tests to run in these jobs, please double check the job logs. If you think tests should have been executed reach out to #agent-devx-help

Copy link

Regression Detector

Regression Detector Results

Run ID: 8263e115-9e5d-4fdd-88f4-e7c3cb97908c Metrics dashboard Target profiles

Baseline: d9895ca
Comparison: a181088

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
uds_dogstatsd_to_api_cpu % cpu utilization +1.31 [+0.58, +2.03] 1 Logs
idle memory utilization +0.91 [+0.86, +0.96] 1 Logs
file_tree memory utilization +0.58 [+0.48, +0.69] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.02 [-0.09, +0.12] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.01, +0.01] 1 Logs
tcp_syslog_to_blackhole ingress throughput -0.43 [-0.48, -0.38] 1 Logs
otel_to_otel_logs ingress throughput -0.57 [-1.38, +0.23] 1 Logs
pycheck_lots_of_tags % cpu utilization -1.07 [-3.55, +1.41] 1 Logs
basic_py_check % cpu utilization -1.47 [-4.14, +1.21] 1 Logs
idle_all_features memory utilization -2.41 [-2.52, -2.29] 1 Logs

Bounds Checks

perf experiment bounds_check_name replicates_passed
idle memory_usage 10/10

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog qa/no-code-change Skip QA week as there is no code change in Agent code team/agent-devx-infra team/opentelemetry OpenTelemetry team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant