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

Start dropping python2 support #30035

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

Conversation

chouquette
Copy link
Contributor

@chouquette chouquette commented Oct 11, 2024

What does this PR do?

Start dropping python2 as we don't ship it with the agent anymore.
It handles:

  • the CI job parameters
  • rtloader
  • omnibus
  • The MSI package

Motivation

We don't need to clutter the code with various parameters or branches for something we don't support anymore.

There are most likely some missing pieces and a lot of remaining references to python2, but this serves as a good starting point

Describe how to test/QA your changes

I'm not sure this needs dedicated QA as long as the CI still passes since we're only removing code, but since the change is large, I can definitely convinced otherwise

Possible Drawbacks / Trade-offs

Additional Notes

This is probably better review commit by commit. The changes should be very close to atomic, and things can be split out in multiple PRs if we chose to.

Associated PRs:

@chouquette chouquette added qa/no-code-change Skip QA week as there is no code change in Agent code team/agent-delivery labels Oct 11, 2024
Copy link

Regression Detector

Regression Detector Results

Run ID: c2fcdb13-bc86-4415-9f99-6d4bd78ab9e4 Metrics dashboard Target profiles

Baseline: ade743b
Comparison: 80ee5b4

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
pycheck_lots_of_tags % cpu utilization +1.33 [-1.18, +3.84] 1 Logs
file_tree memory utilization +1.00 [+0.87, +1.12] 1 Logs
file_to_blackhole_500ms_latency egress throughput +0.16 [-0.08, +0.40] 1 Logs
file_to_blackhole_300ms_latency egress throughput +0.07 [-0.11, +0.25] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.01 [-0.21, +0.23] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.01 [-0.34, +0.35] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.01, +0.01] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.01 [-0.10, +0.09] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.09 [-0.81, +0.63] 1 Logs
otel_to_otel_logs ingress throughput -0.12 [-0.93, +0.69] 1 Logs
idle_all_features memory utilization -0.25 [-0.33, -0.16] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.53 [-1.01, -0.05] 1 Logs
idle memory utilization -0.65 [-0.69, -0.61] 1 Logs
tcp_syslog_to_blackhole ingress throughput -0.74 [-0.78, -0.69] 1 Logs
basic_py_check % cpu utilization -1.44 [-4.09, +1.20] 1 Logs

Bounds Checks

perf experiment bounds_check_name replicates_passed
file_to_blackhole_0ms_latency memory_usage 10/10
file_to_blackhole_1000ms_latency memory_usage 10/10
file_to_blackhole_100ms_latency memory_usage 10/10
file_to_blackhole_300ms_latency memory_usage 10/10
file_to_blackhole_500ms_latency memory_usage 10/10
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".

@chouquette chouquette marked this pull request as ready for review October 11, 2024 08:22
@chouquette chouquette requested review from a team as code owners October 11, 2024 08:22
@chouquette chouquette requested a review from a team as a code owner October 11, 2024 08:22
Copy link
Contributor

@CelianR CelianR left a comment

Choose a reason for hiding this comment

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

Good job! Added minor suggestions

Py_END_ALLOW_THREADS

if (v == NULL) {
if (v == NULL)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be de-dented right?

Suggested change
if (v == NULL)
if (v == NULL)

if python_runtimes:
print(
color_message(
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
'Warning: --python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',

if python_runtimes:
print(
color_message(
'--python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'--python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',
'Warning: --python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',

if python_runtimes:
print(
color_message(
'--python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'--python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',
'Warning: --python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',

if python_runtimes:
print(
color_message(
'--python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'--python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',
'Warning: --python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',

if python_runtimes:
print(
color_message(
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
'Warning: --python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',

if python_runtimes:
print(
color_message(
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
'Warning: --python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',

if python_runtimes:
print(
color_message(
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
'Warning: --python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',

if python_runtimes:
print(
color_message(
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'--python-runtimes is deprecated and will always be 3. Please remove this parametes from your scripts',
'Warning: --python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',

if python_runtimes:
print(
color_message(
'--python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'--python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',
'Warning: --python-runtimes is deprecated and will always be 3. Please remove this parameter from your scripts',

Copy link
Contributor

@julien-lebot julien-lebot left a comment

Choose a reason for hiding this comment

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

There's some diff issue & the PR is missing the changes to the Python compression & decompression in the MSI installer.

public event XDocumentFormatedDlgt WixSourceFormated;
}
}
using Datadog.AgentCustomActions;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you undo the line ending changes in this file so that it shows what actually changed? Right now the diff shows that the entire file changed which makes it very difficult to review.

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.

I have a suggestion for the tasks code

@@ -618,6 +618,13 @@ def build(
"""
Build the system-probe
"""
if python_runtimes:
Copy link
Contributor

Choose a reason for hiding this comment

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

One suggestion, wouldn't it be better to extract these calls to a single warn_deprecation_if_used(python_runtimes) common function to be used everywhere? It'd also make it easier to track later which parameters are still active)

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

Successfully merging this pull request may close these issues.

6 participants