Commit fa1f541
committed
fix(config): migrate endpoints to typed config for provenance awareness (#2317)
## Human Summary
This migrates all components affected by #1965 (we were unable to detect
explicitly set to default vs default config values) to typed config to
pick up the fix provided in #2279.
After implementation I ran a clean-room Opus audit with this prompt:
> please do a clean-room audit of this commit
`f4ae503e807b398ca55ee3f6275f554889cff645`
>
> Our goal is to correct a previous incorrect behavior in which we were
not sensitive to whether a configuration value was set by the Agent as a
default or whether the customer explicitly set the value (and happened
to set it to the default value).
>
> Other than that specific intentional bug fix, no other behavioral
changes are intended.
>
> Validate that only the desired behavioral change has occurred and that
configuration defaults are in-tact.
>
> Read AGENTS.md and /config-system
It only found two actionable items, which I fixed. One was that we were
previously rejecting empty API keys, so I retained that behavior. The
other was that an MRF endpoint consisting only of whitespace could be
treated as a valid setting. Also fixed. All defaults stood up to
scrutiny.
Edit: @aqian01 found a flaw that went undetected which became #2325.
### Review Guide
I tried breaking this up, which is why there are a bunch of subissues
being closed all at once, but it did not divide very well. As such, the
diff a bit large:
Focus on these files:
- `lib/saluki-components/*`
- `bin/agent-data-plane/src/cli/run.rs`
- `lib/agent-data-plane-config*`
Deprioritize generated code and inventory churn in:
- `lib/datadog-agent/*`
## AI Summary
Migrate Datadog endpoint, retry, proxy, forwarder, metrics encoder, MRF,
and Cluster Agent configuration consumers from raw
`GenericConfiguration` deserialization to resolved typed configuration.
Primary endpoint resolution now happens once in the typed configuration
layer:
- A default-sourced `dd_url` no longer shadows `site`.
- An explicitly configured `dd_url`, including the schema-default URL,
remains an override.
- MRF and Cluster Agent destination overrides cannot be overwritten by
global endpoint settings.
- Retry queue size precedence uses configuration provenance, so explicit
zero values are preserved.
- Raw configuration access remains only for live API-key refresh,
secrets retry behavior, and the `run_path` compatibility fallback whose
schema default is still an unresolved placeholder.
The schema inventories, generated registries, smoke-test metadata, and
component tests are updated for the typed consumers.
## Change Type
- [x] Non-functional (chore, refactoring, docs)
## How did you test this PR?
- unit tests updated and created throughout
- integration test modified to test this behavior. this was proven to
have caught the original bug (`red -> green`)
## References
- Closes: #1965
- Closes: #2310
- Closes: #2312
- Closes: #2313
- Closes: #2314
- Closes: #2315
- Closes: #2316
- Related to: #22791 parent e03611d commit fa1f541
37 files changed
Lines changed: 2182 additions & 2720 deletions
File tree
- .claude/skills/config-system
- bin/agent-data-plane/src/cli
- lib
- agent-data-plane-config-system/src
- translators
- agent-data-plane-config/src
- domains
- datadog-agent
- config-overlay-model
- src
- test
- config-testing/src
- config_registry
- config
- schema
- src/classifier
- saluki-components
- src
- common/datadog
- config
- encoders/datadog/metrics
- forwarders
- cluster_agent
- datadog
- transforms/mrf_gateway
- test/integration/cases/adp-config-stream
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
62 | 66 | | |
63 | 67 | | |
64 | 68 | | |
| |||
239 | 243 | | |
240 | 244 | | |
241 | 245 | | |
242 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
397 | | - | |
398 | | - | |
| 397 | + | |
399 | 398 | | |
400 | 399 | | |
401 | 400 | | |
| |||
420 | 419 | | |
421 | 420 | | |
422 | 421 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
| 422 | + | |
429 | 423 | | |
430 | 424 | | |
431 | 425 | | |
432 | 426 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
| 427 | + | |
441 | 428 | | |
442 | 429 | | |
443 | 430 | | |
| |||
518 | 505 | | |
519 | 506 | | |
520 | 507 | | |
521 | | - | |
522 | | - | |
| 508 | + | |
| 509 | + | |
523 | 510 | | |
524 | 511 | | |
525 | 512 | | |
| |||
535 | 522 | | |
536 | 523 | | |
537 | 524 | | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
| 525 | + | |
544 | 526 | | |
545 | 527 | | |
546 | 528 | | |
| |||
549 | 531 | | |
550 | 532 | | |
551 | 533 | | |
552 | | - | |
553 | | - | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
554 | 541 | | |
555 | 542 | | |
556 | 543 | | |
557 | 544 | | |
558 | 545 | | |
559 | | - | |
| 546 | + | |
| 547 | + | |
560 | 548 | | |
561 | | - | |
562 | | - | |
| 549 | + | |
563 | 550 | | |
564 | 551 | | |
565 | 552 | | |
| |||
576 | 563 | | |
577 | 564 | | |
578 | 565 | | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
593 | 575 | | |
594 | 576 | | |
595 | 577 | | |
| |||
606 | 588 | | |
607 | 589 | | |
608 | 590 | | |
609 | | - | |
| 591 | + | |
610 | 592 | | |
611 | 593 | | |
612 | 594 | | |
| |||
631 | 613 | | |
632 | 614 | | |
633 | 615 | | |
634 | | - | |
635 | | - | |
636 | | - | |
637 | | - | |
638 | | - | |
639 | | - | |
640 | | - | |
641 | | - | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
642 | 620 | | |
643 | 621 | | |
644 | 622 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
65 | 70 | | |
66 | 71 | | |
67 | 72 | | |
| |||
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
110 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
111 | 118 | | |
112 | 119 | | |
113 | 120 | | |
114 | | - | |
| 121 | + | |
| 122 | + | |
115 | 123 | | |
| 124 | + | |
116 | 125 | | |
117 | 126 | | |
118 | 127 | | |
| |||
257 | 266 | | |
258 | 267 | | |
259 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
260 | 289 | | |
261 | 290 | | |
262 | 291 | | |
| |||
0 commit comments