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

[EBPF-474] Improve kernel information in platforms.json #24097

Merged
merged 41 commits into from
Apr 25, 2024

Conversation

gjulianm
Copy link
Contributor

@gjulianm gjulianm commented Mar 26, 2024

What does this PR do?

Change the format of the platforms.json file, with more extended version information that gets generated automatically, including kernel version, using the manifest files generated in the ami-builder repo (https://github.com/DataDog/ami-builder/pull/171)

Motivation

  • Ensure that the list of available platforms is updated
  • Ensure that VM tags are always constructed in a standard, predictable way

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

@gjulianm gjulianm self-assigned this Mar 26, 2024
@pr-commenter
Copy link

pr-commenter bot commented Mar 26, 2024

Regression Detector

Regression Detector Results

Run ID: 394ec212-3470-4904-a5da-5bbe49528c04
Baseline: 7d2aebf
Comparison: 008eb28

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.

Experiments ignored for regressions

Regressions in experiments with settings containing erratic: true are ignored.

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization +17.52 [+10.06, +24.98]

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI
file_to_blackhole % cpu utilization +17.52 [+10.06, +24.98]
process_agent_standard_check memory utilization +3.66 [+3.43, +3.89]
tcp_syslog_to_blackhole ingress throughput +3.27 [-17.82, +24.36]
process_agent_standard_check_with_stats memory utilization +0.75 [+0.70, +0.80]
uds_dogstatsd_to_api_cpu % cpu utilization +0.56 [-2.43, +3.55]
pycheck_1000_100byte_tags % cpu utilization +0.42 [-4.02, +4.86]
basic_py_check % cpu utilization +0.09 [-2.42, +2.61]
otel_to_otel_logs ingress throughput +0.08 [-0.27, +0.43]
process_agent_real_time_mode memory utilization +0.02 [-0.04, +0.07]
tcp_dd_logs_filter_exclude ingress throughput +0.00 [-0.04, +0.04]
trace_agent_msgpack ingress throughput -0.00 [-0.00, +0.00]
uds_dogstatsd_to_api ingress throughput -0.01 [-0.21, +0.20]
trace_agent_json ingress throughput -0.01 [-0.03, +0.01]
idle memory utilization -0.49 [-0.53, -0.46]

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

@gjulianm gjulianm changed the title Allow downloading images for all architectures [EBPF] Improve kernel information in platforms.json Mar 27, 2024
@gjulianm gjulianm added changelog/no-changelog team/ebpf-platform qa/done QA done before merge and regressions are covered by tests labels Mar 27, 2024
@gjulianm gjulianm added this to the 7.54.0 milestone Mar 27, 2024
Base automatically changed from guillermo.julian/fix-kmt-image-suffix to main April 1, 2024 09:00
@gjulianm gjulianm force-pushed the guillermo.julian/improved-kmt-kernel-info branch from 4174f53 to b73d346 Compare April 2, 2024 09:47
@gjulianm gjulianm marked this pull request as ready for review April 2, 2024 10:37
@gjulianm gjulianm requested a review from a team as a code owner April 2, 2024 10:37
Copy link
Contributor

@usamasaqib usamasaqib left a comment

Choose a reason for hiding this comment

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

Minor comments. Otherwise looks good.

res = ctx.run(
"aws-vault exec sso-staging-engineering -- aws s3 ls --recursive s3://dd-agent-omnibus/kernel-version-testing/rootfs"
)
if res is None or not res.ok:
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 if you want to check the error condition explicitly then you need to specify warn=True in the call above. Otherwise ctx.run will throw an exception.

tasks/kmt.py Outdated
image_name = keyvals['IMAGE_NAME']
image_filename = keyvals['IMAGE_FILENAME']
except KeyError:
warn(f"[!] Invalid manifest {manifest}, skipping")
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 we should consider this version corrupted if any manifest file is invalid, and refuse to update the platforms file.

@usamasaqib
Copy link
Contributor

Can we also filter out the custom kernels in kmt.ls. At the moment they just add noise.

@gjulianm gjulianm requested a review from a team as a code owner April 23, 2024 12:36
@gjulianm
Copy link
Contributor Author

/trigger-ci --variable RUN_ALL_BUILDS=true --variable RUN_KITCHEN_TESTS=true --variable RUN_E2E_TESTS=on --variable RUN_UNIT_TESTS=on

@gjulianm
Copy link
Contributor Author

/trigger-ci --variable RUN_KMT_TESTS=on

@dd-devflow
Copy link

dd-devflow bot commented Apr 23, 2024

🚂 Gitlab pipeline started

Started pipeline #32725041

@dd-devflow
Copy link

dd-devflow bot commented Apr 23, 2024

🚂 Gitlab pipeline started

Started pipeline #32725059

@agent-platform-auto-pr
Copy link
Contributor

agent-platform-auto-pr bot commented Apr 24, 2024

[Fast Unit Tests Report]

On pipeline 32888982 (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-developer-experience

- "ubuntu_18.04"
- "ubuntu_20.04"
- "ubuntu_22.04"
- "ubuntu_23.10"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand this change, ubuntu releases 2 versions per year 2x.04 and 2x.10, how do you differentiate between the 2 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before, we were using custom names in the platform.json as that was edited manually. Now we switch to automatic generation, so we use the same names there are in the ami-builder repo. There, the Ubuntu versions are defined just with the release year. As we only have one image per release year there's no risk of using different images in the CI. However I agree that it can be confusing for the devs, so I'll make a followup PR in ami-builder to use unambigous names and then update them here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Honestly I still disagree, in december of 2024 we will most likely want to have both 24.04 (the latest LTS) and 24.10 (the latest ubuntu, playing the role of 23.10 currently), I don't see how you represent that here

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, I'll make a PR changing those names and then update them here.

@gjulianm
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Apr 25, 2024

🚂 MergeQueue

Pull request added to the queue.

This build is next! (estimated merge in less than 47m)

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit db828d1 into main Apr 25, 2024
273 of 274 checks passed
@dd-mergequeue dd-mergequeue bot deleted the guillermo.julian/improved-kmt-kernel-info branch April 25, 2024 10:14
alexgallotta pushed a commit that referenced this pull request May 9, 2024
* Allow downloading images for all architectures

* Add update-platform-info task

* Improve output of kmt.ls

* Adapt to new platforms.json structure

* Use guestfs python package

* Ignore rescue images when detecting kernel

* Ignore empty version names

* Fix kernel detection

* Use dynamic distribution mappings

* Update platform info

* Remove empty alternative names

* Better help

* Fix archs for custom kernels

* Fix import order

* Fix format

* Use manifest files

* Improve sorting in kmt.ls

* Update platforms.json

* Warn when some images have not been updated

* Update platforms.json

* Update to latest images

* Raise an error when image is missing

* Fix platforms.json file

* Add kmt.validate-platform-info task

* review comments

* Improve kmt.ls

* Show an error when kernels are missing

* Fix image names in CI

* Switch Amazon 2023 version

* Use master version for AL2023

* test with updated names

* Update Amazon 2023 name

* Add --exclude-matching argument to update-platform-info task

* Update platforms.json
gjulianm added a commit that referenced this pull request Dec 3, 2024
* Allow downloading images for all architectures

* Add update-platform-info task

* Improve output of kmt.ls

* Adapt to new platforms.json structure

* Use guestfs python package

* Ignore rescue images when detecting kernel

* Ignore empty version names

* Fix kernel detection

* Use dynamic distribution mappings

* Update platform info

* Remove empty alternative names

* Better help

* Fix archs for custom kernels

* Fix import order

* Fix format

* Use manifest files

* Improve sorting in kmt.ls

* Update platforms.json

* Warn when some images have not been updated

* Update platforms.json

* Update to latest images

* Raise an error when image is missing

* Fix platforms.json file

* Add kmt.validate-platform-info task

* review comments

* Improve kmt.ls

* Show an error when kernels are missing

* Fix image names in CI

* Switch Amazon 2023 version

* Use master version for AL2023

* test with updated names

* Update Amazon 2023 name

* Add --exclude-matching argument to update-platform-info task

* Update platforms.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog 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.

3 participants