Repository navigation
fix(config): accept streamed null as an empty configuration collection - #2762
Conversation
The Datadog Agent's configuration stream can carry `null` for an empty or cleared list or map, and its accessors read that as empty. ADP's shared collection deserializers rejected it, failing startup or discarding updates (for example `histogram_aggregates: []`, an empty `proxy.no_proxy`, or an update clearing `additional_endpoints`). The list and map deserializers now read `null` as empty; an absent key still takes its schema default. A null element in `apm_config.replace_tags` reads as an empty map, and rules missing `name` or `pattern` are rejected, matching the trace-agent. Fixes #2750. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 67c193bb68
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jesse Szwedko <jesse@szwedko.me>
Binary Size Analysis (Agent Data Plane)Baseline: a41cd43 · Comparison: 5d1070d · diff ✅ Binary size difference within thresholdChanges by Module
Detailed Symbol Changes |
Regression Detector (Agent Data Plane)Run ID: Optimization Goals: ✅ No significant changes detectedFine details of change detection per experiment (5)Experiments configured
Bounds Checks: ✅ Passed (5)
ExplanationA change is flagged as a regression when |Δ mean %| > 5.00% in the regressing direction for its optimization goal AND SMP marks the experiment as a regression ( |
#2762) ## Summary The Datadog streams `null` for an empty or cleared list or map. We need to handle this as an empty collection. Fixes #2750. ## Test plan - [x] New reader unit tests in `list_de.rs` and `cast_de.rs`: `null` and empty inputs read as empty, null `replace_tags` elements read as empty maps (sequence and JSON-string forms) - [x] New `null_collection_tests` in `datadog-agent-config`: every collection leaf in the generated model accepts `null`; `null` yields empty while an absent `histogram_aggregates` keeps its default - [x] New `system.rs` tests: a startup snapshot with null collections translates, and a `null` update clears a previously non-empty `additional_endpoints`/`histogram_aggregates` (both fail without the fix) - [x] New translator test: `replace_tags` rules missing `name` or `pattern` (including `[null]`) are rejected with the trace-agent's messages - [ ] Follow-up once #2722 lands: remove the replay expectations this makes match 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: jesse.szwedko <jesse.szwedko@datadoghq.com> 6e3f308
Summary
The Datadog streams
nullfor an empty or cleared list or map. We need to handle this as an empty collection.Fixes #2750.
Test plan
list_de.rsandcast_de.rs:nulland empty inputs read as empty, nullreplace_tagselements read as empty maps (sequence and JSON-string forms)null_collection_testsindatadog-agent-config: every collection leaf in the generated model acceptsnull;nullyields empty while an absenthistogram_aggregateskeeps its defaultsystem.rstests: a startup snapshot with null collections translates, and anullupdate clears a previously non-emptyadditional_endpoints/histogram_aggregates(both fail without the fix)replace_tagsrules missingnameorpattern(including[null]) are rejected with the trace-agent's messages🤖 Generated with Claude Code