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

[APR-207] chore: add support for resolving config secrets #234

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

tobz
Copy link
Member

@tobz tobz commented Sep 5, 2024

Context

The Datadog Agent provides support for secrets management through an approach called the "secrets backend". This is an executable that uses a lightweight JSON-based protocol to receive requests for secrets to resolve (a list of opaque keys) and is expected to return back the resolved secrets, all operating over standard in/out.

This is the primary way by which to use external secrets management systems, such as Vault, as a secrets backend for the Datadog Agent.

Solution

This PR adds a barebones implementation of secrets backend support, matching that of the Datadog Agent. We've eschewed some specific things here:

  • we don't do any of the same ownership/permissions checks on the backend command that is passed in
  • we only support specifying the command to run and the timeout
  • we don't support re-resolving secrets at runtime

Closes #235.

@tobz tobz added the type/chore Updates to dependencies or general "administrative" tasks necessary to maintain the codebase/repo. label Sep 5, 2024
@tobz tobz requested review from a team as code owners September 5, 2024 10:42
@github-actions github-actions bot added the area/config Configuration. label Sep 5, 2024
@pr-commenter
Copy link

pr-commenter bot commented Sep 5, 2024

Regression Detector (DogStatsD)

Regression Detector Results

Run ID: a901d233-2737-4e8c-87b6-0a18387de628

Baseline: 7.55.2
Comparison: 7.55.3

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
dsd_uds_100mb_3k_contexts_distributions_only memory utilization +1.37 [+1.15, +1.59] 1
dsd_uds_10mb_3k_contexts ingress throughput +0.03 [+0.00, +0.06] 1
dsd_uds_500mb_3k_contexts ingress throughput +0.00 [-0.00, +0.00] 1
dsd_uds_512kb_3k_contexts ingress throughput -0.00 [-0.09, +0.09] 1
dsd_uds_100mb_250k_contexts ingress throughput -0.00 [-0.01, +0.01] 1
dsd_uds_100mb_3k_contexts ingress throughput -0.01 [-0.02, +0.00] 1
dsd_uds_1mb_3k_contexts ingress throughput -0.01 [-0.08, +0.05] 1
dsd_uds_1mb_50k_contexts_memlimit ingress throughput -0.02 [-0.05, +0.02] 1
dsd_uds_1mb_50k_contexts ingress throughput -0.03 [-0.06, +0.01] 1

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

@pr-commenter
Copy link

pr-commenter bot commented Sep 5, 2024

Regression Detector (Saluki)

Regression Detector Results

Run ID: 755461c2-80d4-4285-8b49-5571ae412eab

Baseline: ad1a5f8
Comparison: c387b27

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
dsd_uds_100mb_3k_contexts_distributions_only memory utilization +1.09 [+0.92, +1.26] 1
dsd_uds_1mb_50k_contexts_memlimit ingress throughput +0.31 [-2.96, +3.58] 1
dsd_uds_512kb_3k_contexts ingress throughput +0.04 [-0.03, +0.11] 1
dsd_uds_1mb_3k_contexts ingress throughput +0.01 [-0.04, +0.07] 1
dsd_uds_50mb_10k_contexts_no_inlining ingress throughput -0.00 [-0.00, +0.00] 1
dsd_uds_100mb_3k_contexts ingress throughput -0.01 [-0.01, +0.00] 1
dsd_uds_50mb_10k_contexts_no_inlining_no_allocs ingress throughput -0.01 [-0.05, +0.03] 1
dsd_uds_1mb_50k_contexts ingress throughput -0.02 [-0.03, -0.00] 1
dsd_uds_100mb_250k_contexts ingress throughput -0.05 [-0.31, +0.21] 1
dsd_uds_10mb_3k_contexts ingress throughput -0.08 [-0.14, -0.02] 1
dsd_uds_500mb_3k_contexts ingress throughput -0.55 [-0.65, -0.45] 1

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

@pr-commenter
Copy link

pr-commenter bot commented Sep 5, 2024

Regression Detector Links

Experiment Result Links

experiment link(s)
dsd_uds_100mb_250k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_100mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_100mb_3k_contexts_distributions_only [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_10mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_50k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_1mb_50k_contexts_memlimit [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_500mb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_512kb_3k_contexts [Profiling (ADP)] [Profiling (DSD)] [SMP Dashboard]
dsd_uds_50mb_10k_contexts_no_inlining (ADP only) [Profiling (ADP)] [SMP Dashboard]
dsd_uds_50mb_10k_contexts_no_inlining_no_allocs (ADP only) [Profiling (ADP)] [SMP Dashboard]

@tobz tobz merged commit 55ed65a into main Sep 9, 2024
14 checks passed
@tobz tobz deleted the tobz/secrets-config-support branch September 9, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config Configuration. type/chore Updates to dependencies or general "administrative" tasks necessary to maintain the codebase/repo.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for resolving secrets in the configuration.
1 participant