Skip to content

Preserve feature flag configuration when Remote Config replaces a target - #13258

Draft
hhan2024 wants to merge 1 commit into
masterfrom
helen/fix-ffe-rc-config-replacement
Draft

hhan2024 wants to merge 1 commit into
masterfrom
helen/fix-ffe-rc-config-replacement

Conversation

@hhan2024

@hhan2024 hhan2024 commented Nov 5, 2026

Copy link
Copy Markdown

What Does This Do

Keep the latest feature flag configuration active when Remote Config replaces target A with target B. The poller applies B before removing A; previously, A's removal cleared B and made the OpenFeature provider return PROVIDER_NOT_READY, even though B was acknowledged as applied.

Track the current target key so removal of a superseded target is ignored. Removing the current target still clears the configuration, and late subscribers receive the replacement.

Motivation

Capability and SemVer routing can change the selected UFC target ID without restarting the SDK. This fix addresses the Java agent's existing RC lifecycle code on master and can merge independently of the evaluator changes in #13166 and capability preparation in #13167.

Additional Notes

The live check combined #13166 and #13167 with test-only capability reporting enabled. This PR contains only the RC lifecycle fix and regression tests; it preserves the existing capability defaults.

Test Coverage

  • All three new regression cases fail before the fix: dependency upgrade, dependency downgrade, and SemVer replacement. They also verify late replay and removal of the active replacement.
  • Full feature-flagging-lib test suite on Java 11: 100 passed, no skips. Module Spotless checks pass.
  • Real Agent 7.85.0, staging dogfooding: delayed provider subscription, companion delivery/ACK, downgrade, and re-upgrade pass without a flag republish. The provider remains ready and dependent-flag values match the running Python reference.

Contributor Checklist

  • Regression tests and module formatting checks pass.
  • Real Agent reproduction passes with the fix.
  • No source files added, moved, or removed; existing CODEOWNERS coverage applies.

Jira ticket: N/A

Ignore removal callbacks for superseded UFC targets so a replacement stays active.

Environment: Datadog workspace

Co-Authored-By: Codex GPT-6 <noreply@localhost>
@hhan2024 hhan2024 added type: bug fix Bug fix comp: remote config Configuration at Runtime tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature labels Nov 5, 2026
@datadog-official

datadog-official Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 73.60% (+13.62%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: cc4a8ed | Docs | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.76 s 14.62 s [-0.0%; +1.9%] (no difference)
startup:insecure-bank:tracing:Agent 13.62 s 13.60 s [-0.5%; +1.0%] (no difference)
startup:petclinic:appsec:Agent 17.14 s 17.04 s [-0.4%; +1.6%] (no difference)
startup:petclinic:iast:Agent 16.40 s 17.18 s [-8.8%; -0.3%] (maybe better)
startup:petclinic:profiling:Agent 16.78 s 16.78 s [-0.8%; +0.9%] (no difference)
startup:petclinic:sca:Agent 17.13 s 17.00 s [-0.1%; +1.6%] (no difference)
startup:petclinic:tracing:Agent 16.23 s 16.27 s [-1.2%; +0.7%] (no difference)

Commit: cc4a8ede · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: openfeature OpenFeature comp: remote config Configuration at Runtime tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant