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

Bump gcc version to 10.4.0 to build python dependencies #17978

Merged
merged 3 commits into from
Jul 20, 2023

Conversation

FlorentClarret
Copy link
Member

@FlorentClarret FlorentClarret commented Jul 4, 2023

What does this PR do?

Bump gcc version to 10.4.0 to build python dependencies for all the nix images.

Motivation

  • We want to bump ddtrace to 1.11.2 here. The agent build is failing on rpm x64 (and only this one) because it uses gcc 4.4.7 and some flags are not supported.
  • Each image is currently using its own version of gcc (7.3.1 for rpm arm for instance) so that's our chance to use the same version everywhere.
  • This is also needed to build pydantic 2.0

Additional Notes

This version of gcc was added here

The error we had:

      /opt/rh/devtoolset-1.1/root/usr/bin/gcc -shared -Wl,-rpath,/opt/datadog-agent/embedded/lib -L/opt/datadog-agent/embedded/lib -Wl,-rpath,/opt/datadog-agent/embedded/lib -L/opt/datadog-agent/embedded/lib -L/opt/datadog-agent/embedded/lib -L/opt/mqm/lib64 -L/opt/mqm/lib -I/opt/datadog-agent/embedded/include -I/opt/mqm/inc -std=c99 build/temp.linux-x86_64-cpython-39/ddtrace/appsec/iast/_stacktrace.o -L/opt/datadog-agent/embedded/lib -o build/lib.linux-x86_64-cpython-39/ddtrace/appsec/iast/_stacktrace.cpython-39-x86_64-linux-gnu.so
      building 'ddtrace.appsec.iast._taint_tracking._native' extension
      creating build/temp.linux-x86_64-cpython-39/ddtrace/appsec/iast/_taint_tracking
      /opt/rh/devtoolset-1.1/root/usr/bin/gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/opt/datadog-agent/embedded/include -O2 -g -pipe -I/opt/datadog-agent/embedded/include -O2 -g -pipe -I/opt/datadog-agent/embedded/include -I/opt/mqm/inc -std=c99 -fPIC -I/opt/datadog-agent/embedded/include/python3.9 -c ddtrace/appsec/iast/_taint_tracking/_native.cpp -o build/temp.linux-x86_64-cpython-39/ddtrace/appsec/iast/_taint_tracking/_native.o -std=c++17
      gcc: error: unrecognized command line option ‘-std=c++17’
      error: command '/opt/rh/devtoolset-1.1/root/usr/bin/gcc' failed with exit code 1
      [end of output]

I tested the image switching the integrations-core branch to my ddtrace branch and everything seems to be working properly. Pipeline: https://gitlab.ddbuild.io/DataDog/datadog-agent/-/pipelines/17557110

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • A release note has been added or the changelog/no-changelog label has been applied.
  • Changed code has automated tests for its functionality.
  • Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • If applicable, the need-change/operator and need-change/helm labels have been applied.
  • If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • If applicable, the config template has been updated.

.gitlab-ci.yml Outdated Show resolved Hide resolved
@pr-commenter
Copy link

pr-commenter bot commented Jul 4, 2023

Bloop Bleep... Dogbot Here

Regression Detector Results

Run ID: 4f2939fb-b09b-495a-a76d-81c6fbad089b
Baseline: 18a2518
Comparison: 858d995
Total datadog-agent CPUs: 7

Explanation

A regression test is an integrated performance test for datadog-agent in a repeatable rig, with varying configuration for datadog-agent. What follows is a statistical summary of a brief datadog-agent run for each configuration across SHAs given above. The goal of these tests are to determine quickly if datadog-agent performance is changed and to what degree by a pull request.

Because a target's optimization goal performance in each experiment will vary somewhat each time it is run, we can only estimate mean differences in optimization goal relative to the baseline target. We express these differences as a percentage change relative to the baseline target, denoted "Δ mean %". These estimates are made to a precision that balances accuracy and cost control. We represent this precision as a 90.00% confidence interval denoted "Δ mean % CI": there is a 90.00% chance that the true value of "Δ mean %" is in that interval.

We decide whether a change in performance is a "regression" -- a change worth investigating further -- if both of the following two criteria are true:

  1. The estimated |Δ mean %| ≥ 5.00%. This criterion intends to answer the question "Does the estimated change in mean optimization goal performance have a meaningful impact on your customers?". We assume that when |Δ mean %| < 5.00%, the impact on your customers is not meaningful. We also assume that a performance change in optimization goal is worth investigating whether it is an increase or decrease, so long as the magnitude of the change is sufficiently large.

  2. Zero is not in the 90.00% confidence interval "Δ mean % CI" about "Δ mean %". This statement is equivalent to saying that there is at least a 90.00% chance that the mean difference in optimization goal is not zero. This criterion intends to answer the question, "Is there a statistically significant difference in mean optimization goal performance?". It also means there is no more than a 10.00% chance this criterion reports a statistically significant difference when the true difference in mean optimization goal is zero -- a "false positive". We assume you are willing to accept a 10.00% chance of inaccurately detecting a change in performance when no true difference exists.

The table below, if present, lists those experiments that have experienced a statistically significant change in mean optimization goal performance between baseline and comparison SHAs with 90.00% confidence OR have been detected as newly erratic. Negative values of "Δ mean %" mean that baseline is faster, whereas positive values of "Δ mean %" mean that comparison is faster. Results that do not exhibit more than a ±5.00% change in their mean optimization goal are discarded. An experiment is erratic if its coefficient of variation is greater than 0.1. The abbreviated table will be omitted if no interesting change is observed.

No interesting changes in experiment optimization goals with confidence ≥ 90.00% and |Δ mean %| ≥ 5.00%.

Fine details of change detection per experiment.
experiment goal Δ mean % Δ mean % CI confidence
tcp_syslog_to_blackhole ingress throughput +0.22 [+0.17, +0.28] 100.00%
trace_agent_json ingress throughput +0.04 [+0.02, +0.06] 99.68%
file_to_blackhole egress throughput +0.00 [-1.08, +1.09] 0.30%
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.06, +0.06] 1.05%
otel_to_otel_logs ingress throughput -0.02 [-0.09, +0.05] 26.60%
trace_agent_msgpack ingress throughput -0.10 [-0.13, -0.08] 100.00%
uds_dogstatsd_to_api ingress throughput -0.11 [-0.71, +0.50] 18.16%

@FlorentClarret FlorentClarret force-pushed the florentclarret/bump_gcc_rpm_x64 branch 2 times, most recently from 09f7628 to 7d81a2c Compare July 6, 2023 09:17
@FlorentClarret FlorentClarret changed the title Bump gcc version for rpm x64 images Bump gcc version to 10.4.0 to build python dependencies Jul 6, 2023
.gitlab-ci.yml Outdated Show resolved Hide resolved
@FlorentClarret FlorentClarret added this to the 7.48.0 milestone Jul 6, 2023
@FlorentClarret FlorentClarret marked this pull request as ready for review July 10, 2023 06:27
@FlorentClarret FlorentClarret requested review from a team as code owners July 10, 2023 06:27
@FlorentClarret FlorentClarret requested a review from a team July 17, 2023 15:31
@0intro 0intro self-requested a review July 17, 2023 15:53
Copy link
Member

@0intro 0intro left a comment

Choose a reason for hiding this comment

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

Very nice.

It's a very good thing to use a recent version of GCC which is shared among the various Linux distributions we support.

@FlorentClarret FlorentClarret force-pushed the florentclarret/bump_gcc_rpm_x64 branch from 73cc77e to fcffa54 Compare July 20, 2023 05:34
@FlorentClarret FlorentClarret force-pushed the florentclarret/bump_gcc_rpm_x64 branch from fcffa54 to a656329 Compare July 20, 2023 05:41
@FlorentClarret FlorentClarret removed the request for review from a team July 20, 2023 05:43
@FlorentClarret FlorentClarret force-pushed the florentclarret/bump_gcc_rpm_x64 branch from 29852ef to cbe1bed Compare July 20, 2023 06:54
@FlorentClarret FlorentClarret force-pushed the florentclarret/bump_gcc_rpm_x64 branch from cbe1bed to 858d995 Compare July 20, 2023 07:13
@FlorentClarret FlorentClarret merged commit 8a81da6 into main Jul 20, 2023
@FlorentClarret FlorentClarret deleted the florentclarret/bump_gcc_rpm_x64 branch July 20, 2023 11:28
vivek-datadog added a commit that referenced this pull request Jul 21, 2023
julesmcrt pushed a commit that referenced this pull request Jul 28, 2023
* attempt to bump gcc version

* gcc_version

* facepalm
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.

4 participants