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

do not build system-probe twice #32884

Merged
merged 3 commits into from
Jan 13, 2025
Merged

Conversation

paulcacheux
Copy link
Contributor

@paulcacheux paulcacheux commented Jan 12, 2025

What does this PR do?

This PR:

  • removes the duplicated task object-files/build-object-files, by keeping only one and creating an alias for the other name
  • makes sure system-probe is only built once (by omnibus) and not once with the object files (and never used, it's not even in the artifact generated by the CI job), and a second time by omnibus

Motivation

Describe how you validated your changes

Validated that the system probe build in the build_system-probe job was not used (not even exported). And all the new e2e tests are green.

Possible Drawbacks / Trade-offs

Additional Notes

@github-actions github-actions bot added component/system-probe short review PR is simple enough to be reviewed quickly team/ebpf-platform labels Jan 12, 2025
@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Jan 12, 2025

Gitlab CI Configuration Changes

Modified Jobs

.system-probe_build_common
  .system-probe_build_common:
    artifacts:
      expire_in: 2 weeks
      paths:
      - $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz
      - $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz.sum
    before_script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
      || exit 101
    - rm -f modcache.tar.xz
    - find "$CI_BUILDS_DIR" ! -path '*DataDog/datadog-agent*' -depth
    - find "$CI_BUILDS_DIR" ! -path '*DataDog/datadog-agent*' -delete || true
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - when: on_success
    script:
    - inv check-go-version
-   - inv -e system-probe.build --strip-object-files
+   - inv -e system-probe.build-object-files --strip-object-files
?                              +++++++++++++
-   - objdump -p $CI_PROJECT_DIR/$SYSTEM_PROBE_BINARIES_DIR/system-probe | egrep 'GLIBC_2\.(1[8-9]|[2-9][0-9])'
-     && exit 1
    - inv -e system-probe.save-build-outputs $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz
    variables:
      KUBERNETES_CPU_REQUEST: 6
      KUBERNETES_MEMORY_LIMIT: 12Gi
      KUBERNETES_MEMORY_REQUEST: 6Gi
build_system-probe-arm64
  build_system-probe-arm64:
    artifacts:
      expire_in: 2 weeks
      paths:
      - $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz
      - $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz.sum
    before_script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
      || exit 101
    - rm -f modcache.tar.xz
    - find "$CI_BUILDS_DIR" ! -path '*DataDog/datadog-agent*' -depth
    - find "$CI_BUILDS_DIR" ! -path '*DataDog/datadog-agent*' -delete || true
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/system-probe_arm64$DATADOG_AGENT_SYSPROBE_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_SYSPROBE_BUILDIMAGES
    needs:
    - go_deps
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - when: on_success
    script:
    - inv check-go-version
-   - inv -e system-probe.build --strip-object-files
+   - inv -e system-probe.build-object-files --strip-object-files
?                              +++++++++++++
-   - objdump -p $CI_PROJECT_DIR/$SYSTEM_PROBE_BINARIES_DIR/system-probe | egrep 'GLIBC_2\.(1[8-9]|[2-9][0-9])'
-     && exit 1
    - inv -e system-probe.save-build-outputs $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz
    stage: binary_build
    tags:
    - arch:arm64
    variables:
      ARCH: arm64
      KUBERNETES_CPU_REQUEST: 6
      KUBERNETES_MEMORY_LIMIT: 12Gi
      KUBERNETES_MEMORY_REQUEST: 6Gi
build_system-probe-x64
  build_system-probe-x64:
    artifacts:
      expire_in: 2 weeks
      paths:
      - $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz
      - $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz.sum
    before_script:
    - mkdir -p $GOPATH/pkg/mod/cache && tar xJf modcache.tar.xz -C $GOPATH/pkg/mod/cache
      || exit 101
    - rm -f modcache.tar.xz
    - find "$CI_BUILDS_DIR" ! -path '*DataDog/datadog-agent*' -depth
    - find "$CI_BUILDS_DIR" ! -path '*DataDog/datadog-agent*' -delete || true
    image: registry.ddbuild.io/ci/datadog-agent-buildimages/system-probe_x64$DATADOG_AGENT_SYSPROBE_BUILDIMAGES_SUFFIX:$DATADOG_AGENT_SYSPROBE_BUILDIMAGES
    needs:
    - go_deps
    rules:
    - if: $CI_COMMIT_BRANCH =~ /^mq-working-branch-/
      when: never
    - when: on_success
    script:
    - inv check-go-version
-   - inv -e system-probe.build --strip-object-files
+   - inv -e system-probe.build-object-files --strip-object-files
?                              +++++++++++++
-   - objdump -p $CI_PROJECT_DIR/$SYSTEM_PROBE_BINARIES_DIR/system-probe | egrep 'GLIBC_2\.(1[8-9]|[2-9][0-9])'
-     && exit 1
    - inv -e system-probe.save-build-outputs $CI_PROJECT_DIR/sysprobe-build-outputs.tar.xz
    stage: binary_build
    tags:
    - arch:amd64
    variables:
      ARCH: amd64
      KUBERNETES_CPU_REQUEST: 6
      KUBERNETES_MEMORY_LIMIT: 12Gi
      KUBERNETES_MEMORY_REQUEST: 6Gi

Changes Summary

Removed Modified Added Renamed
0 3 0 0

ℹ️ Diff available in the job log.

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Jan 12, 2025

Uncompressed package size comparison

Comparison with ancestor 15f12d51916dd3deded4a88a1cbae7ce78b728c4

Diff per package
package diff status size ancestor threshold
datadog-agent-arm64-deb 0.01MB ⚠️ 939.29MB 939.28MB 0.50MB
datadog-agent-aarch64-rpm 0.01MB ⚠️ 948.59MB 948.58MB 0.50MB
datadog-dogstatsd-amd64-deb 0.00MB 58.83MB 58.83MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.00MB 58.90MB 58.90MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.00MB 58.90MB 58.90MB 0.50MB
datadog-dogstatsd-arm64-deb 0.00MB 56.33MB 56.33MB 0.50MB
datadog-heroku-agent-amd64-deb 0.00MB 506.82MB 506.82MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 114.20MB 114.20MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 114.27MB 114.27MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 114.27MB 114.27MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 109.63MB 109.63MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 109.69MB 109.69MB 0.50MB
datadog-agent-amd64-deb -0.02MB 1009.50MB 1009.52MB 0.50MB
datadog-agent-x86_64-rpm -0.02MB 1018.82MB 1018.84MB 0.50MB
datadog-agent-x86_64-suse -0.02MB 1018.82MB 1018.84MB 0.50MB

Decision

⚠️ Warning

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Jan 12, 2025

[Fast Unit Tests Report]

On pipeline 52766059 (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

cit-pr-commenter bot commented Jan 12, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 30f181e3-4766-4624-b778-e83764866dae

Baseline: 15f12d5
Comparison: 1c21ba3
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
quality_gate_logs % cpu utilization +2.23 [-0.97, +5.44] 1 Logs
tcp_syslog_to_blackhole ingress throughput +0.60 [+0.54, +0.67] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.08 [-0.72, +0.88] 1 Logs
quality_gate_idle_all_features memory utilization +0.03 [-0.05, +0.12] 1 Logs bounds checks dashboard
file_to_blackhole_0ms_latency_http2 egress throughput +0.02 [-0.83, +0.87] 1 Logs
uds_dogstatsd_to_api ingress throughput +0.01 [-0.10, +0.12] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.01 [-0.66, +0.68] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.01 [-0.02, +0.01] 1 Logs
file_tree memory utilization -0.02 [-0.15, +0.11] 1 Logs
file_to_blackhole_0ms_latency egress throughput -0.02 [-0.93, +0.89] 1 Logs
file_to_blackhole_300ms_latency egress throughput -0.02 [-0.66, +0.61] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput -0.09 [-0.56, +0.38] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput -0.09 [-0.94, +0.75] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.21 [-1.04, +0.62] 1 Logs
quality_gate_idle memory utilization -0.66 [-0.70, -0.62] 1 Logs bounds checks dashboard
uds_dogstatsd_to_api_cpu % cpu utilization -1.19 [-1.90, -0.49] 1 Logs

Bounds Checks: ✅ Passed

perf experiment bounds_check_name replicates_passed links
file_to_blackhole_0ms_latency lost_bytes 10/10
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_0ms_latency_http1 lost_bytes 10/10
file_to_blackhole_0ms_latency_http1 memory_usage 10/10
file_to_blackhole_0ms_latency_http2 lost_bytes 10/10
file_to_blackhole_0ms_latency_http2 memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency_linear_load memory_usage 10/10
file_to_blackhole_100ms_latency lost_bytes 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_300ms_latency lost_bytes 10/10
file_to_blackhole_300ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency lost_bytes 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs lost_bytes 10/10
quality_gate_logs memory_usage 10/10

Explanation

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

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

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".

CI Pass/Fail Decision

Passed. All Quality Gates passed.

  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle, bounds check memory_usage: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@paulcacheux paulcacheux changed the title Paulcacheux/cleanup sysprobe build cleanup system-probe build Jan 12, 2025
@paulcacheux paulcacheux changed the title cleanup system-probe build do not build system-probe twice Jan 12, 2025
@paulcacheux paulcacheux added changelog/no-changelog qa/done QA done before merge and regressions are covered by tests labels Jan 12, 2025
@paulcacheux paulcacheux marked this pull request as ready for review January 12, 2025 18:03
@paulcacheux paulcacheux requested review from a team as code owners January 12, 2025 18:04
Copy link
Contributor

@gjulianm gjulianm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Minor thing, I think you have to fill the "describe how you validated changes" section with the qa/done tag now.

@paulcacheux
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jan 13, 2025

Devflow running: /merge

View all feedbacks in Devflow UI.


2025-01-13 09:29:15 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 35m.


2025-01-13 10:37:29 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit 9897364 into main Jan 13, 2025
311 checks passed
@dd-mergequeue dd-mergequeue bot deleted the paulcacheux/cleanup-sysprobe-build branch January 13, 2025 10:37
@github-actions github-actions bot added this to the 7.63.0 milestone Jan 13, 2025
@@ -12,9 +12,7 @@
- find "$CI_BUILDS_DIR" ! -path '*DataDog/datadog-agent*' -delete || true # Allow failure, we can't remove parent folders of datadog-agent
script:
- inv check-go-version
- inv -e system-probe.build --strip-object-files
# fail if references to glibc >= 2.18
- objdump -p $CI_PROJECT_DIR/$SYSTEM_PROBE_BINARIES_DIR/system-probe | egrep 'GLIBC_2\.(1[8-9]|[2-9][0-9])' && exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to this? We need this safeguard to ensure we don't accidentally start using a newer glibc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically this has never worked, since we have a safeguard on the wrong binary. Happy to spawn another PR to add this safeguard on the actually binary shipped, the one built by omnibus

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The omnibus building of the system-probe binary is a somewhat recent addition. They could mismatch, from a glibc standpoint, if the buildimages differed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will spawn a PR to add this check you are right, better be safe on this front

@github-actions github-actions bot added medium review PR review might take time and removed short review PR is simple enough to be reviewed quickly labels Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog component/system-probe medium review PR review might take time qa/done QA done before merge and regressions are covered by tests team/ebpf-platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants