8000 Serverless FIPS by apiarian-datadog · Pull Request #33799 · DataDog/datadog-agent · GitHub
[go: up one dir, main page]

Skip to content

Serverless FIPS #33799

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

Merged
merged 5 commits into from
Mar 20, 2025
Merged

Conversation

apiarian-datadog
Copy link
Contributor
@apiarian-datadog apiarian-datadog commented Feb 6, 2025

What does this PR do?

In conjunction with the datadog-lambda-extension build process intoroduced in DataDog/datadog-lambda-extension#556 we are adding support for FIPS in the agent with goboring.

Describe how you validated your changes

Reviewed tests here. Also deployed a wide array of self-monitoring lambda functions to a govcloud region talking to a datadog org in ddog-gov.

Possible Drawbacks / Trade-offs

We chose to go with the goboring approach rather than the msgo approach because the latter would have required more substantial tooling changes for our build system.

@bits-bot
Copy link
Collaborator
bits-bot commented Feb 6, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added the short review PR is simple enough to be reviewed quickly label Feb 6, 2025
@agent-platform-auto-pr
Copy link
Contributor
agent-platform-auto-pr bot commented Feb 6, 2025

Static quality checks ✅

Please find below the results from static quality gates

Successful checks

Info

Result Quality gate On disk size On disk size limit On wire size On wire size limit
static_quality_gate_agent_deb_amd64 781.61 MiB 801.8 MiB 190.7 MiB 202.62 MiB
static_quality_gate_agent_deb_arm64 773.07 MiB 793.14 MiB 172.46 MiB 184.51 MiB
static_quality_gate_agent_rpm_amd64 781.64 MiB 801.79 MiB 193.32 MiB 205.03 MiB
static_quality_gate_agent_rpm_arm64 773.0 MiB 793.09 MiB 174.66 MiB 186.44 MiB
static_quality_gate_agent_suse_amd64 781.76 MiB 801.81 MiB 193.32 MiB 205.03 MiB
static_quality_gate_agent_suse_arm64 773.1 MiB 793.14 MiB 174.66 MiB 186.44 MiB
static_quality_gate_dogstatsd_deb_amd64 37.6 MiB 47.67 MiB 9.75 MiB 19.78 MiB
static_quality_gate_dogstatsd_deb_arm64 36.2 MiB 46.27 MiB 8.45 MiB 18.49 MiB
static_quality_gate_dogstatsd_rpm_amd64 37.6 MiB 47.67 MiB 9.76 MiB 19.79 MiB
static_quality_gate_dogstatsd_suse_amd64 37.6 MiB 47.67 MiB 9.76 MiB 19.79 MiB
static_quality_gate_iot_agent_deb_amd64 59.44 MiB 69.0 MiB 14.93 MiB 24.8 MiB
static_quality_gate_iot_agent_deb_arm64 56.8 MiB 66.4 MiB 12.87 MiB 22.8 MiB
static_quality_gate_iot_agent_rpm_amd64 59.44 MiB 69.0 MiB 14.95 MiB 24.8 MiB
static_quality_gate_iot_agent_rpm_arm64 56.8 MiB 66.4 MiB 12.89 MiB 22.8 MiB
static_quality_gate_iot_agent_suse_amd64 59.44 MiB 69.0 MiB 14.95 MiB 24.8 MiB
static_quality_gate_docker_agent_amd64 866.36 MiB 886.12 MiB 291.46 MiB 304.21 MiB
static_quality_gate_docker_agent_arm64 881.04 MiB 900.79 MiB 277.88 MiB 290.47 MiB
static_quality_gate_docker_agent_jmx_amd64 1.04 GiB 1.06 GiB 366.55 MiB 379.33 MiB
static_quality_gate_docker_agent_jmx_arm64 1.04 GiB 1.06 GiB 348.96 MiB 361.55 MiB
static_quality_gate_docker_dogstatsd_amd64 45.74 MiB 55.78 MiB 17.25 MiB 27.28 MiB
static_quality_gate_docker_dogstatsd_arm64 44.37 MiB 54.45 MiB 16.13 MiB 26.16 MiB
static_quality_gate_docker_cluster_agent_amd64 264.42 MiB 274.78 MiB 106.09 MiB 116.28 MiB
static_quality_gate_docker_cluster_agent_arm64 280.36 MiB 290.82 MiB 100.92 MiB 111.12 MiB

@agent-platform-auto-pr
Copy link
Contributor
agent-platform-auto-pr bot commented Feb 6, 2025

Uncompressed package size comparison

Comparison with ancestor f4b1c7cc17eea3464c0e313d2f7c31ee3b3f7c55

Diff per package
package diff status size ancestor threshold
datadog-agent-amd64-deb 0.00MB 807.62MB 807.62MB 0.50MB
datadog-agent-x86_64-rpm 0.00MB 817.42MB 817.42MB 0.50MB
datadog-agent-x86_64-suse 0.00MB 817.42MB 817.42MB 0.50MB
datadog-agent-arm64-deb 0.00MB 798.62MB 798.62MB 0.50MB
datadog-agent-aarch64-rpm 0.00MB 808.40MB 808.40MB 0.50MB
datadog-dogstatsd-amd64-deb 0.00MB 39.35MB 39.35MB 0.50MB
datadog-dogstatsd-x86_64-rpm 0.00MB 39.43MB 39.43MB 0.50MB
datadog-dogstatsd-x86_64-suse 0.00MB 39.43MB 39.43MB 0.50MB
datadog-dogstatsd-arm64-deb 0.00MB 37.87MB 37.87MB 0.50MB
datadog-heroku-agent-amd64-deb 0.00MB 444.40MB 444.40MB 0.50MB
datadog-iot-agent-amd64-deb 0.00MB 62.25MB 62.25MB 0.50MB
datadog-iot-agent-x86_64-rpm 0.00MB 62.32MB 62.32MB 0.50MB
datadog-iot-agent-x86_64-suse 0.00MB 62.32MB 62.32MB 0.50MB
datadog-iot-agent-arm64-deb 0.00MB 59.47MB 59.47MB 0.50MB
datadog-iot-agent-aarch64-rpm 0.00MB 59.54MB 59.54MB 0.50MB

Decision

✅ Passed

Copy link
cit-pr-commenter bot commented Feb 6, 2025

Regression Detector

Regression Detector Results

Metrics dashboard
Target profiles
Run ID: 9cf89b71-3ea0-4742-8d56-51ff7c4dbf95

Baseline: f4b1c7c
Comparison: 6a791a7
Diff

Optimization Goals: ✅ No significant changes detected

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
file_to_blackhole_0ms_latency_http2 egress throughput +0.04 [-0.82, +0.90] 1 Logs
file_to_blackhole_0ms_latency_http1 egress throughput +0.03 [-0.83, +0.89] 1 Logs
file_to_blackhole_100ms_latency egress throughput +0.03 [-0.66, +0.71] 1 Logs
file_to_blackhole_0ms_latency egress throughput +0.02 [-0.83, +0.87] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.03, +0.03] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.00 [-0.28, +0.27] 1 Logs
file_to_blackhole_300ms_latency egress throughput -0.01 [-0.64, +0.62] 1 Logs
file_to_blackhole_1000ms_latency egress throughput -0.02 [-0.80, +0.75] 1 Logs
file_to_blackhole_500ms_latency egress throughput -0.05 [-0.83, +0.73] 1 Logs
uds_dogstatsd_20mb_12k_contexts_20_senders memory utilization -0.10 [-0.15, -0.05] 1 Logs
quality_gate_idle_all_features memory utilization -0.20 [-0.29, -0.11] 1 Logs bounds checks dashboard
file_tree memory utilization -0.21 [-0.34, -0.09] 1 Logs
file_to_blackhole_1000ms_latency_linear_load egress throughput -0.33 [-0.80, +0.13] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.44 [-1.28, +0.40] 1 Logs
quality_gate_logs % cpu utilization -1.26 [-4.05, +1.53] 1 Logs
tcp_syslog_to_blackhole ingress throughput -1.32 [-1.37, -1.26] 1 Logs
quality_gate_idle memory utilization -1.64 [-1.72, -1.55] 1 Logs bounds checks dashboard

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 intake_connections 10/10 bounds checks dashboard
quality_gate_idle memory_usage 10/10 bounds checks dashboard
quality_gate_idle_all_features intake_connections 10/10 bounds checks dashboard
quality_gate_idle_all_features memory_usage 10/10 bounds checks dashboard
quality_gate_logs intake_connections 10/10
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_idle_all_features, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_idle_all_features, 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, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check lost_bytes: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check intake_connections: 10/10 replicas passed. Gate passed.
  • quality_gate_logs, bounds check memory_usage: 10/10 replicas passed. Gate passed.

@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-6279-serverless-fips branch from a15eadb to 3264cf1 Compare February 7, 2025 18:50
@agent-platform-auto-pr
Copy link
Contributor
agent-platform-auto-pr bot commented Feb 10, 2025

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

dda inv aws.create-vm --pipeline-id=59460770 --os-family=ubuntu

Note: This applies to commit 6a791a7

@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-6279-serverless-fips branch from cdafae7 to 87e3aca Compare February 24, 2025 15:03
@apiarian-datadog apiarian-datadog marked this pull request as ready for review February 24, 2025 15:05
@apiarian-datadog apiarian-datadog requested review from a team as code owners February 24, 2025 15:05
@apiarian-datadog apiarian-datadog added changelog/no-changelog qa/done QA done before merge and regressions are covered by tests labels Feb 24, 2025
@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-6279-serverless-fips branch from 87e3aca to f83a18b Compare March 13, 2025 20:06
Copy link
Contributor

Serverless Benchmark Results

BenchmarkStartEndInvocation comparison between 58383be and 0afd616.

tl;dr

Use these benchmarks as an insight tool during development.

  1. Skim down the vs base column in each chart. If there is a ~, then there was no statistically significant change to the benchmark. Otherwise, ensure the estimated percent change is either negative or very small.

  2. The last row of each chart is the geomean. Ensure this percentage is either negative or very small.

What is this benchmarking?

The BenchmarkStartEndInvocation compares the amount of time it takes to call the start-invocation and end-invocation endpoints. For universal instrumentation languages (Dotnet, Golang, Java, Ruby), this represents the majority of the duration overhead added by our tracing layer.

The benchmark is run using a large variety of lambda request payloads. In the charts below, there is one row for each event payload type.

How do I interpret these charts?

The charts below comes from benchstat. They represent the statistical change in duration (sec/op), memory overhead (B/op), and allocations (allocs/op).

The benchstat docs explain how to interpret these charts.

Before the comparison table, we see common file-level configuration. If there are benchmarks with different configuration (for example, from different packages), benchstat will print separate tables for each configuration.

The table then compares the two input files for each benchmark. It shows the median and 95% confidence interval summaries for each benchmark before and after the change, and an A/B comparison under "vs base". ... The p-value measures how likely it is that any differences were due to random chance (i.e., noise). The "~" means benchstat did not detect a statistically significant difference between the two inputs. ...

Note that "statistically significant" is not the same as "large": with enough low-noise data, even very small changes can be distinguished from noise and considered statistically significant. It is, of course, generally easier to distinguish large changes from noise.

Finally, the last row of the table shows the geometric mean of each column, giving an overall picture of how the benchmarks changed. Proportional changes in the geomean reflect proportional changes in the benchmarks. For example, given n benchmarks, if sec/op for one of them increases by a factor of 2, then the sec/op geomean will increase by a factor of ⁿ√2.

I need more help

First off, do not worry if the benchmarks are failing. They are not tests. The intention is for them to be a tool for you to use during development.

If you would like a hand interpreting the results come chat with us in #serverless-agent in the internal DataDog slack or in #serverless in the public DataDog slack. We're happy to help!

Benchmark stats

@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-6279-serverless-fips branch from f83a18b to 9ba256e Compare March 18, 2025 16:01
@apiarian-datadog apiarian-datadog requested a review from a team as a code owner March 18, 2025 16:01
@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 Mar 18, 2025
@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-6279-serverless-fips branch from 9ba256e to 24f5b81 Compare March 18, 2025 16:24
Copy link
Member
@pgimalac pgimalac left a comment

Choose a reason for hiding this comment

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

LGTM, just one nitpick

@apiarian-datadog apiarian-datadog requested review from a team as code owners March 19, 2025 14:36
@apiarian-datadog apiarian-datadog force-pushed the aleksandr.pasechnik/svls-6279-serverless-fips branch from bfffc8a to 6a791a7 Compare March 20, 2025 14:11
@apiarian-datadog
Copy link
Contributor Author

/merge

@dd-devflow
Copy link
dd-devflow bot commented Mar 20, 2025

View all feedbacks in Devflow UI.
2025-03-20 15:46:52 UTC ℹ️ Start processing command /merge


2025-03-20 15:47:01 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in main is approximately 58m (p90).


2025-03-20 19:12:28 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue dd-mergequeue bot merged commit fca6a13 into main Mar 20, 2025
235 checks passed
@dd-mergequeue dd-mergequeue bot deleted the aleksandr.pasechnik/svls-6279-serverless-fips branch March 20, 2025 19:12
@github-actions github-actions bot added this to the 7.65.0 milestone Mar 20, 2025
apiarian-datadog added a commit to DataDog/datadog-lambda-extension that referenced this pull request Mar 20, 2025
In order to support FIPS flavored go agent builds (added in DataDog/datadog-agent#33799 ) we're making the following changes:
- refactoring the build pipeline to add fips flavors
- rearranging the environment datasource to make it a dictionary instead of a list
- replacing our old publish_govcloud.sh script with a new publish_govcloud_layers.sh script which uses the same publish layers script as the commercial gitlab job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog medium review PR review might take time qa/done QA done before merge and regressions are covered by tests team/serverless
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0