Skip to content

🍒 11535 - Handle gracefully malformed flag evaluations - #12176

Merged
sarahchen6 merged 2 commits into
release/v1.65.xfrom
sarah.chen/backport-pr-11535
Aug 10, 2026
Merged

🍒 11535 - Handle gracefully malformed flag evaluations#12176
sarahchen6 merged 2 commits into
release/v1.65.xfrom
sarah.chen/backport-pr-11535

Conversation

@sarahchen6

Copy link
Copy Markdown
Contributor

Backport #11535 to release/v1.65.x

Skip malformed FFE flags during config parsing

Use Instant for FFE allocation windows

Log dropped malformed FFE flags

Merge remote-tracking branch 'origin/master' into leo.romanovsky/ffl-2339-instant-allocation-windows

# Conflicts:
#	products/feature-flagging/feature-flagging-lib/src/main/java/com/datadog/featureflag/RemoteConfigServiceImpl.java
#	products/feature-flagging/feature-flagging-lib/src/test/java/com/datadog/featureflag/RemoteConfigServiceImplTest.java

Merge branch 'master' into leo.romanovsky/ffl-2339-instant-allocation-windows

Clarify FFE instant parser test label

Merge branch 'master' into leo.romanovsky/ffl-2339-instant-allocation-windows

Merge remote-tracking branch 'origin/master' into leo.romanovsky/ffl-2339-instant-allocation-windows

# Conflicts:
#	products/feature-flagging/feature-flagging-lib/src/test/java/com/datadog/featureflag/RemoteConfigServiceImplTest.java

Address FFE Instant review feedback

Merge remote-tracking branch 'origin/master' into leo.romanovsky/ffl-2339-instant-allocation-windows

# Conflicts:
#	products/feature-flagging/feature-flagging-api/src/test/java/datadog/trace/api/openfeature/DDEvaluatorTest.java

Preserve FFE allocation date compatibility

Merge remote-tracking branch 'origin/master' into leo.romanovsky/ffl-2339-instant-allocation-windows

# Conflicts:
#	products/feature-flagging/feature-flagging-api/src/test/java/datadog/trace/api/openfeature/DDEvaluatorTest.java
#	products/feature-flagging/feature-flagging-lib/src/main/java/com/datadog/featureflag/RemoteConfigServiceImpl.java
#	products/feature-flagging/feature-flagging-lib/src/test/java/com/datadog/featureflag/RemoteConfigServiceImplTest.java

Preserve microsecond precision in FFE allocation windows

Merge remote-tracking branch 'origin/master' into leo.romanovsky/ffl-2339-instant-allocation-windows

Fix exposure context serialization

Exercise null Instant adapter path

Cover FFE allocation parser branches

Exercise the allocation adapter factory, null, and read-only paths required by changed-code coverage, and remove an unreachable parser null guard.

Environment: Datadog workspace

Respect exposure logging conventions

Exclude serialization failures from telemetry and log submission failures at debug level.

Environment: Datadog workspace

Co-authored-by: leo.romanovsky <leo.romanovsky@datadoghq.com>
(cherry picked from commit 4f6a1ea)
@sarahchen6
sarahchen6 requested a review from a team as a code owner August 10, 2026 13:23
@sarahchen6 sarahchen6 added type: bug fix Bug fix type: feature Enhancements and improvements tag: no release notes Changes to exclude from release notes tag: ai generated Largely based on code generated by an AI or LLM labels Aug 10, 2026
@sarahchen6
sarahchen6 removed the request for review from a team August 10, 2026 13:23
@sarahchen6 sarahchen6 added the comp: openfeature OpenFeature label Aug 10, 2026
@PerfectSlayer PerfectSlayer removed the type: feature Enhancements and improvements label Aug 10, 2026
@datadog-official

datadog-official Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 73.47%
Overall Coverage: 73.84% (+15.97%)

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

@dd-octo-sts

dd-octo-sts Bot commented Aug 10, 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.85 s 14.75 s [-0.2%; +1.5%] (no difference)
startup:insecure-bank:tracing:Agent 13.71 s 13.74 s [-1.0%; +0.5%] (no difference)
startup:petclinic:appsec:Agent 16.91 s 16.84 s [-0.5%; +1.4%] (no difference)
startup:petclinic:iast:Agent 16.85 s 17.00 s [-1.6%; -0.2%] (maybe better)
startup:petclinic:profiling:Agent 16.78 s 16.32 s [-2.0%; +7.6%] (no difference)
startup:petclinic:sca:Agent 16.77 s 16.57 s [+0.4%; +2.0%] (maybe worse)
startup:petclinic:tracing:Agent 15.99 s 16.18 s [-2.1%; -0.3%] (maybe better)

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

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: FAIL

The retained Date constructor now snapshots its mutable start/end arguments, so callers that adjust an allocation window after construction are evaluated against stale times. Remote-config allocations created through fromInstants retain the intended nanosecond precision.

📊 Validated against 12 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 31d14c7 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

Comment on lines +32 to +33
startAt == null ? null : startAt.toInstant(),
endAt == null ? null : endAt.toInstant());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Preserve mutable Date constructor behavior

Programmatically constructed allocations whose Date window is adjusted after construction can activate or expire at the stale original time.

Assertion details
  • Input: Construct an Allocation with startAt at 12:00, mutate that same Date to 13:00, then evaluate at 12:30.
  • Expected: Allocations created through the retained Date constructor should preserve the prior behavior of reading the public mutable Date fields, while fromInstants continues preserving nanosecond precision.
  • Actual: The constructor stores the original Date-derived Instants in preciseStartAt/preciseEndAt. Mutating either supplied Date later leaves isAllocationActive evaluating the stale construction-time window.
Suggested change
startAt == null ? null : startAt.toInstant(),
endAt == null ? null : endAt.toInstant());
null,
null);

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@pr-commenter

pr-commenter Bot commented Aug 10, 2026

Copy link
Copy Markdown

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch release/v1.65.x sarah.chen/backport-pr-11535
git_commit_date 1786365527 1786376406
git_commit_sha 3277e89 ee64a8d
See matching parameters
Baseline Candidate
ci_job_date 1786377797 1786377797
ci_job_id 1937955536 1937955536
ci_pipeline_id 129984378 129984378
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=15002 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=15002 -Dhttp.nonProxyHosts=localhost *.localhost
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaProduceBenchmark.benchProduce same

@pr-commenter

pr-commenter Bot commented Aug 10, 2026

Copy link
Copy Markdown

Kafka / consumer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch release/v1.65.x sarah.chen/backport-pr-11535
git_commit_date 1786365527 1786376406
git_commit_sha 3277e89 ee64a8d
See matching parameters
Baseline Candidate
ci_job_date 1786377781 1786377781
ci_job_id 1937899299 1937899299
ci_pipeline_id 129984378 129984378
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.25 11.0.25
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=15002 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=15002 -Dhttp.nonProxyHosts=localhost *.localhost
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.25+9-post-Ubuntu-1ubuntu122.04 11.0.25+9-post-Ubuntu-1ubuntu122.04

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 3 metrics, 0 unstable metrics.

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaConsumerBenchmark.benchConsume same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaConsumerBenchmark.benchConsume unsure
[+1939.664op/s; +11993.798op/s] or [+0.654%; +4.042%]
scenario:only-tracing-dsm-enabled-benchmarks/KafkaConsumerBenchmark.benchConsume same

@sarahchen6 sarahchen6 removed the tag: no release notes Changes to exclude from release notes label Aug 10, 2026
@sarahchen6 sarahchen6 changed the title 🍒 11535 - Use Instant and log dropped FFE flags 🍒 11535 - Handle gracefully malformed flag evaluations Aug 10, 2026
@sarahchen6
sarahchen6 merged commit 83d0540 into release/v1.65.x Aug 10, 2026
592 checks passed
@sarahchen6
sarahchen6 deleted the sarah.chen/backport-pr-11535 branch August 10, 2026 16:40
@github-actions github-actions Bot added this to the 1.65.1 milestone Aug 10, 2026
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: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants