Skip to content

Add offline Feature Flagging reference implementation#11933

Draft
leoromanovsky wants to merge 1 commit into
leo.romanovsky/ffl-2693-java-agentless-configuration-sourcefrom
agent/java-ffe-offline-reference
Draft

Add offline Feature Flagging reference implementation#11933
leoromanovsky wants to merge 1 commit into
leo.romanovsky/ffl-2693-java-agentless-configuration-sourcefrom
agent/java-ffe-offline-reference

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Motivation

Provide a small Java reference implementation for the startup-only offline Feature Flagging mode so the cross-SDK system-test contract can be exercised before the production implementation is reviewed. This draft is stacked on #11892 and intentionally keeps the offline API narrow: the application supplies complete UFC JSON bytes once at provider initialization.

Changes

  • add Provider.Options.offlineConfiguration(byte[])
  • route startup bytes through the bootstrap gateway to a dedicated offline configuration source
  • parse UFC with the existing Java deserializer and publish the existing ServerConfiguration model
  • reject missing, empty, malformed, or repeated offline configuration
  • document Java startup usage and cover listener lifecycle, defensive copying, initialization order, malformed payload recovery, and repeated initialization

Decisions

  • offline is a distinct startup-only source; it starts neither the agentless poller nor the FFE Remote Configuration subscription
  • the public API owns the caller-facing bytes, while the agent-owned source performs parsing and dispatch
  • the source registers once even if agent initialization is invoked repeatedly
  • this is a provisional Java reference used to validate the system-test contract; all system-tests manifests remain disabled
flowchart LR
  A["#11892<br/>agentless + source selection"] --> B["This draft<br/>Java offline reference"]
  C["system-tests main<br/>disabled offline contract"] --> B
  B --> D["Provisional proof<br/>26 offline tests pass"]
  C --> E["Small per-SDK<br/>manifest enablement PRs"]
Loading

Validation

  • ./gradlew :products:feature-flagging:feature-flagging-bootstrap:spotlessCheck :products:feature-flagging:feature-flagging-lib:spotlessCheck :products:feature-flagging:feature-flagging-api:spotlessCheck :products:feature-flagging:feature-flagging-agent:spotlessCheck
  • ./gradlew :products:feature-flagging:feature-flagging-bootstrap:test :products:feature-flagging:feature-flagging-lib:test :products:feature-flagging:feature-flagging-api:test :products:feature-flagging:feature-flagging-agent:testBUILD SUCCESSFUL
  • ./gradlew :dd-java-agent:shadowJar :dd-trace-api:jar :products:feature-flagging:feature-flagging-api:jarBUILD SUCCESSFUL
  • locally built these three artifacts, installed them into system-tests, and force-ran the disabled offline contract: 26 passed in 37.82s

Companion system-tests draft: DataDog/system-tests#7305.

@leoromanovsky leoromanovsky added tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature type: feature Enhancements and improvements labels Jul 13, 2026
@datadog-official

datadog-official Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 93.75%
Overall Coverage: 57.21% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8d654e2 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 13, 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 13.97 s 13.87 s [+0.1%; +1.3%] (maybe worse)
startup:insecure-bank:tracing:Agent 12.99 s 13.01 s [-0.8%; +0.5%] (no difference)
startup:petclinic:appsec:Agent 16.70 s 16.95 s [-2.4%; -0.5%] (maybe better)
startup:petclinic:iast:Agent 17.01 s 17.00 s [-0.8%; +0.9%] (no difference)
startup:petclinic:profiling:Agent 16.71 s 16.88 s [-2.2%; +0.1%] (no difference)
startup:petclinic:sca:Agent 16.91 s 16.80 s [-0.4%; +1.7%] (no difference)
startup:petclinic:tracing:Agent 16.14 s 16.13 s [-1.0%; +1.1%] (no difference)

Commit: 8d654e23 · 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.

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

Labels

comp: openfeature OpenFeature tag: ai generated Largely based on code generated by an AI or LLM type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant