Repository navigation
Keep released dd-openfeature SDKs working with the agent - #12976
Conversation
This comment has been minimized.
This comment has been minimized.
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
17c0f4e to
9b8b55c
Compare
413ffd3 to
4f242cb
Compare
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.
More details
Static review found no actionable compatibility gaps in legacy provider matching, initialization bypass, or default-value evaluation. Runtime behavior remains unverified.
🤖 Bits Code Review · Commit 4f242cb
4f242cb to
b2884a9
Compare
b2884a9 to
9e36453
Compare
There was a problem hiding this comment.
More details
Static review supports that the legacy-provider fallback avoids loading the removed bootstrap evaluator and returns caller defaults for all five evaluation types, including when Feature Flags is disabled.
🤖 Bits Code Review · Commit 0b85f6e
0b85f6e to
6c105cc
Compare
6c105cc to
1e13ef9
Compare
1e13ef9 to
75cccf3
Compare
75cccf3 to
24d8d65
Compare
There was a problem hiding this comment.
Two critical regressions stand out: the replacement HTTP factory in FeatureFlagsBackend loses both send-once semantics (risking duplicate exposure/evaluation counts on retries) and the DD-EVP-ORIGIN/DD-EVP-ORIGIN-VERSION identity headers (silently dropping SDK attribution). Additionally, a permanent resolved=true flag in EventProxy after a failed Agent discovery prevents any recovery of event pipelines even after the Agent comes back online.
🤖 Bits Code Review · Commit 75cccf3
Findings that could not be posted inline
products/feature-flagging/feature-flagging-lib/src/main/java/com/datadog/featureflag/EventProxy.java:81
Allow event delivery to recover after failed discovery
If initial Agent discovery fails, both clients can be null, yet resolved permanently prevents another attempt. JavaAgentBridge then returns no transport, causing FeatureFlagsRuntime to omit both event pipelines when direct delivery is unavailable. Agent recovery cannot restore reporting, even after provider recreation because the backend retains the cached absence. Keep a recoverable transport and pipelines alive, and re-probe unavailable routes; changing this flag alone is insufficient.
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
What each reaction means
- 👍 Useful: correct, and you're fixing it or will.
- 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
- 😕 Unclear: you can't tell what it means or why it matters.
- 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.
🤖 Bits Code Review · Open Bits AI session
products/feature-flagging/feature-flagging-lib/src/main/java/com/datadog/featureflag/FeatureFlagsBackend.java:36
Preserve send-once semantics for proxied event batches
If the proxy accepts a batch but its response times out, this factory permits replaying the same exposure or evaluation counts. The two-argument constructor defaults to sendOnce=false, enabling timeout/5xx retries on the no-fallback path and leaving OkHttp automatic retries enabled even with NEVER_RETRY. This regresses the previous transport's send-once safeguards and can inflate event counts. Enable send-once semantics on the factory.
new BackendApiFactory(config, sco, true),
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
What each reaction means
- 👍 Useful: correct, and you're fixing it or will.
- 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
- 😕 Unclear: you can't tell what it means or why it matters.
- 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.
🤖 Bits Code Review · Open Bits AI session
products/feature-flagging/feature-flagging-lib/src/main/java/com/datadog/featureflag/FeatureFlagsBackend.java:36
Keep SDK identity headers on proxied Feature Flags events
Every proxied exposure and evaluation batch now uses a factory with empty request headers, and EvpProxyApi does not supply DD-EVP-ORIGIN or DD-EVP-ORIGIN-VERSION itself. The removed factory supplied both, so successful deliveries silently lose SDK identity and version attribution. Restore those headers and the corresponding forwarding-capability check during proxy discovery.
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
What each reaction means
- 👍 Useful: correct, and you're fixing it or will.
- 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
- 😕 Unclear: you can't tell what it means or why it matters.
- 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.
🤖 Bits Code Review · Open Bits AI session
Released providers, from 1.56 to 1.68, link to the agent bootstrap API the bridge replaced: make them return the caller defaults instead of failing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace the legacy provider instrumentation tests, which loaded a released provider in a dedicated class loader, with a smoke test running an application built with the released dd-openfeature 1.67.1, with and without Feature Flags enabled. Drop the IDEA module configuration and use the static VERSION_11 import in the legacy provider instrumentation build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Mark the instrumentation module and advice classes as unused, as they are only referenced through AutoService and advice class names, and import the Advice annotations statically. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
24d8d65 to
80f290f
Compare
Findings will be addressed in subsequent PRs in the stack |
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
What Does This Do
Keeps applications using a released
dd-openfeatureSDK working with this agent:dd-openfeature-1.56instrumentation: released providers (1.56 to 1.68) link to the agent bootstrap API the bridge replaced; they now skip their legacy evaluator and return the caller defaults (PROVIDER_NOT_READY) with a warning to upgrade, instead of failing. It applies even with Feature Flags disabled, and is checked by muzzle against every released version.Motivation
The previous PR removes the agent-coupled provider API (APMLP-1512). Merge right after it: in between, released SDKs fail with this agent.
Additional Notes
Files
LegacyProviderInstrumentation,LegacyProviderAdviceinitialize()and return defaults from the evaluation methods of legacy providers (matched onloadEvaluatorClass())ignored_class_name.triedatadog.trace.api.openfeature.Provider:dd-smoke-tests:openfeature-legacydd-openfeature1.67.1 gets the caller defaults and the upgrade warning, with Feature Flags enabled or disabledStack
The full change is in #12709. It was split into this stack to ease the review.
Jira ticket: APMLP-1512
🤖 Generated with Claude Code