Handle incompatible OpenFeature SDK event APIs gracefully - #12401
Draft
leoromanovsky wants to merge 3 commits into
Draft
Handle incompatible OpenFeature SDK event APIs gracefully#12401leoromanovsky wants to merge 3 commits into
leoromanovsky wants to merge 3 commits into
Conversation
Contain provider-event linkage failures and report the loaded SDK version with actionable upgrade guidance. Environment: Datadog workspace
This comment has been minimized.
This comment has been minimized.
Contributor
🟢 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Prevents an incompatible OpenFeature SDK from letting provider-event linkage failures escape the Datadog configuration callback. The provider now emits one actionable warning with the loaded SDK version and upgrade requirement, while configuration delivery and flag evaluation can continue.
It also adds a dedicated compatibility job that continuously exercises the supported OpenFeature SDK and dd-java-agent version boundaries.
Motivation
dd-openfeatureis compiled against OpenFeature SDK 1.20.1, whereEventProvider.emit(...)returnsAwaitable. OpenFeature SDK 1.15.1 exposes the same method with avoidreturn type. If that unsupported SDK wins runtime dependency resolution, a configuration-change event raisesNoSuchMethodErrorand interrupts the Remote Configuration callback.The documented compatibility floor remains OpenFeature SDK 1.20.1 or later. An unsupported dependency should still fail gracefully and explain how to recover instead of repeatedly surfacing an uncaught linkage error. The supported dependency boundaries should also be tested explicitly so future SDK or agent changes cannot silently break them.
Changes
LinkageErrors and emit a warning once per provider.NoSuchMethodError.test_openfeature_compatibilityCI job with three integration lanes:Decisions
pom.propertiessecond, falling back tounknownwithout interfering with error handling.Additional Notes
Validated with:
./gradlew :dd-smoke-tests:openfeature:openFeatureCompatibilityTest -PtestJvm=11 -PskipFlakyTests./gradlew :dd-smoke-tests:openfeature:test -PtestJvm=11 -PskipFlakyTests --rerun-tasks./gradlew :products:feature-flagging:feature-flagging-api:spotlessCheck :products:feature-flagging:feature-flagging-api:test :products:feature-flagging:feature-flagging-api:legacyOpenFeatureSdkTest :products:feature-flagging:feature-flagging-api:forbiddenApisMain :products:feature-flagging:feature-flagging-api:spotbugsMain :dd-smoke-tests:openfeature:spotlessCheck -PtestJvm=11 -PskipFlakyTestscheckreaches and passes both test suites but fails the repository's pre-existing per-class JaCoCo gate. A cleanmasterat61071ab6829a6bd24465bb174b20bb99776e1106produces the same eight coverage violations and rounded ratios.git diff --checkContributor Checklist
type:andcomp:labels.