chore(config): preserve provenance in typed configuration - #2279
Conversation
Binary Size Analysis (Agent Data Plane)Baseline: be50909 · Comparison: de7bb0f · 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 ( |
0ea5c4a to
07acc99
Compare
Preserve whether streamed settings are explicit or producer defaults while converting Agent config events. Keep the compatibility map and typed configuration behavior unchanged for now by discarding provenance at both consumers.
- Retain explicit and default provenance in the typed configuration source tree - Prevent Agent schema defaults from shadowing explicit local settings - Expose provenance-aware values while preserving serialized configuration shape - Cover snapshot, partial-update, fallback, and provenance-only live changes Rationale: The Core Agent publishes schema defaults alongside explicitly configured values. Carrying provenance through bootstrap, merging, and translation lets typed consumers distinguish those cases and prevents a streamed default from overriding an explicit local setting. This commit made by [/saluki-commit](https://github.com/DataDog/saluki)
Human Summary
WIP: not ready for review
Reviewer's Guide
lib/saluki-config/src/dynamic/event.rsintroduces types to carry provenance in the Agent updates.lib/agent-data-plane-config/src/provenance.rsintroduces types to carry provenance in typed config.bin/agent-data-plane/src/internal/remote_agent.rsis where we preserve the information in the config stream.lib/agent-data-plane-config-system/src/translators/datadog_translator.rsis where we preserve the information for those fields where we need it in typed config.Most of the code churn is tests creating config stream events for themselves which now have to add the provenance metadata.
AI Summary
The Core Agent configuration stream publishes a complete reified configuration, including values materialized from schema defaults, and source metadata for each key. Once that configuration is deserialized into a value-only model, an explicitly supplied value equal to the schema default is indistinguishable from a defaulted value. That distinction is required for source-aware translation and is the key to resolving #1965.
This PR carries the two-state provenance (
Default/Explicit) from the stream through the typed configuration system and exposes it toSalukiConfigurationconsumers withConfigValue<T>. Translators and consumers can now determine whether a setting was supplied without hardcoding or comparing schema-default values. Provenance is preserved across local bootstrap values, snapshots, partial updates, resets, and live changes while retaining the existing serialized configuration shape.As a side effect, default-sourced Agent values no longer shadow explicit local file or environment values in the typed path; explicit Agent values still override them. This is useful for local and test configuration, but is secondary to making source-aware configuration decisions possible. The legacy
GenericConfigurationcompatibility view remains value-only, and affected components still need to migrate before #1965 is fully resolved.Change Type
How did you test this PR?
cargo check --workspace --testscargo test -p agent-data-plane-config -p agent-data-plane-config-system -p saluki-config -p agent-data-planegit diff --checkAll tests passed.
References
dd_url's schema default makessiteunreachable in ADP. #1965