feat(rc): Handle expired config status - #2274
Conversation
Drop all RC files when they expire. Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
There was a problem hiding this comment.
More details
The expiration path clears the shared remote-config index and the client’s applied paths before returning an empty generation, and the shared fetch loop releases the previous generation on that result. No concrete diff-only behavioral regression was identified; targeted execution was blocked by the sandbox’s unavailable pinned Cargo git dependency.
🤖 Datadog Autotest · Commit a3e567e · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a3e567e2ce
ℹ️ 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".
| "Agent served remote config from an expired cache for target {target:?}, \ | ||
| dropping all stored configurations" | ||
| ); | ||
| self.state.target_files_by_path.lock_or_panic().clear(); |
There was a problem hiding this comment.
Preserve shared fetcher ownership when expiring configs
When one SharedFetcher in a MultiTargetFetcher receives CONFIG_STATUS_EXPIRED, clearing this shared map immediately bypasses RefcountingStorage's ownership/inactive-file path. If another target still holds the old Arc in its last_files or has an in-flight request that advertised the file as cached, its next OK response sees an empty map and can try to store the same path before the old handle is expired, or fail with Found ... in client_configs response, but it isn't stored; either way that target can keep serving stale expired config. Expiry needs to go through the shared refcount/inactive mechanism or otherwise coordinate all shared runners before dropping the map.
Useful? React with 👍 / 👎.
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: 430f1a9 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksComparisonBenchmark execution time: 2026-07-28 13:16:33 Comparing candidate commit 430f1a9 in PR branch Found 14 performance improvements and 10 performance regressions! Performance is the same for 118 metrics, 0 unstable metrics.
|
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
Signed-off-by: Bob Weinand <bob.weinand@datadoghq.com>
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
…er-flare (#2332) # Release proposal for libdd-ffe, libdd-http-client, libdd-tracer-flare and their dependencies This PR contains version bumps based on public API changes and commits since last release. ## libdd-capabilities **Next version:** `3.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-v3.0.0` ### Commits - fix(telemetry)!: stop sending Connection: close to the Agent (#2286) - feat(capabilities)!: Add streaming to http capabilities (#2251) - feat: added file capability [APMSP-3780] (#2240) - feat: added environment capability [APMSP-3780] (#2239) ## libdd-common **Next version:** `5.1.1` **Semver bump:** `patch` **Tag:** `libdd-common-v5.1.1` ### Commits - feat(telemetry)!: Add Installation signature and AppProduct changes payloads (#2213) - refactor: migrate to workspace dependencies, phase 4 (#2296) - refactor: migrate to workspace dependencies, phase 3 (#2283) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - test: stabilize flaky tests (#2256) - fix(sidecar): don't double-encode file:// telemetry endpoints (#2230) - fix: last new clippy lint (#2221) ## libdd-tinybytes **Next version:** `1.1.2` **Semver bump:** `patch` **Tag:** `libdd-tinybytes-v1.1.2` ### Commits - chore: moving to workspace-level dependencies, phase 2 (#2270) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) ## libdd-trace-protobuf **Next version:** `4.0.1` **Semver bump:** `patch` **Tag:** `libdd-trace-protobuf-v4.0.1` ### Commits - refactor: migrate to workspace dependencies, phase 4 (#2296) - chore: moving to workspace-level dependencies, phase 2 (#2270) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - feat(stats)!: implement additional metric tags in libdd-trace-stats (#2170) ## libdd-capabilities-impl **Next version:** `4.0.0` **Semver bump:** `major` **Tag:** `libdd-capabilities-impl-v4.0.0` ###⚠️ major bump forced due to: - `libdd-capabilities`: ^2.1.0 → ^3.0.0 ### Commits - feat(telemetry)!: Add Installation signature and AppProduct changes payloads (#2213) - refactor: migrate to workspace dependencies, phase 4 (#2296) - fix(telemetry)!: stop sending Connection: close to the Agent (#2286) - fix(remote-config)!: Expose HttpClientCapability in remote config (#2252) - feat(capabilities)!: Add streaming to http capabilities (#2251) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - feat: added file capability [APMSP-3780] (#2240) - feat(telemetry)!: make telemetry worker wasm-compatible for the TraceExporter (#2172) - feat: added environment capability [APMSP-3780] (#2239) ## libdd-http-client **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-http-client-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. ## libdd-trace-normalization **Next version:** `3.0.1` **Semver bump:** `patch` **Tag:** `libdd-trace-normalization-v3.0.1` ### Commits - refactor: migrate to workspace dependencies, phase 4 (#2296) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) ## libdd-remote-config **Next version:** `3.0.0` **Semver bump:** `major` **Tag:** `libdd-remote-config-v3.0.0` ### Commits - refactor(rc)!: make conversion from RemoteConfigProduct back and forth generally available (#2325) - fix(wasm)!: finish the WASM port of remote-config (#2315) - refactor: migrate to workspace dependencies, phase 3 (#2283) - feat(rc): Handle expired config status (#2274) - feat(remote-config)!: add AsmRawResponseBody capability (#2278) - chore: moving to workspace-level dependencies, phase 2 (#2270) - fix(remote-config)!: Expose HttpClientCapability in remote config (#2252) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - fix(rc): Make Target fields available again after eaf5ad0 (#2232) - fix: new clippy lints (#2219) ## libdd-trace-utils **Next version:** `10.0.0` **Semver bump:** `major` **Tag:** `libdd-trace-utils-v10.0.0` ###⚠️ major bump forced due to: - `libdd-capabilities`: ^2.1.0 → ^3.0.0 ### Commits - refactor(rc)!: make conversion from RemoteConfigProduct back and forth generally available (#2325) - fix(libdd-trace-utils): apply SpanLink flags masking when v0.5 json encoding (#2314) - refactor: migrate to workspace dependencies, phase 4 (#2296) - feat(data-pipeline)!: add compression option for agentless export (#2205) - refactor: migrate to workspace dependencies, phase 3 (#2283) - refactor(trace-utils)!: split generic TracerHeaderTags (#2279) - chore(lint): update nightly (#2281) - chore: moving to workspace-level dependencies, phase 2 (#2270) - fix(remote-config)!: Expose HttpClientCapability in remote config (#2252) - refactor: consolidate core dependencies at workspace level (phase 1) (#2253) - feat(stats)!: implement additional metric tags in libdd-trace-stats (#2170) - feat(trace-utils)!: add v1 decoder (#2174) - feat(trace-utils)!: add encoder v1 to v04 + refactor (#2145) - feat(otlp): add instrumentation scope metadata (#2235) - fix(trace-utils)!: serialize v0.5 span links and events into meta (#980) ## libdd-ffe **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-ffe-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. ## libdd-tracer-flare **Next version:** `1.0.0` **Semver bump:** `major` **Tag:** `libdd-tracer-flare-v1.0.0` **Warning:** this is an initial release. Please verify that the version and commits included are correct. [APMSP-3780]: https://datadoghq.atlassian.net/browse/APMSP-3780?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [APMSP-3780]: https://datadoghq.atlassian.net/browse/APMSP-3780?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [APMSP-3780]: https://datadoghq.atlassian.net/browse/APMSP-3780?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: hoolioh <107922352+hoolioh@users.noreply.github.com>
Drop all RC files when they expire.
Adds the equivalent capability of DataDog/dd-trace-py@bc2b16b.