[FFL-1273] bindings for libdatadog datadog ffe api#5001
Closed
[FFL-1273] bindings for libdatadog datadog ffe api#5001
Conversation
Implements Ruby integration for Feature Flagging & Experimentation (FFE) following ddsketch patterns: - Add native C extension wrapper (ext/libdatadog_api/feature_flags.c) - Create Ruby API with graceful degradation (lib/datadog/core/feature_flags.rb) - Add type signatures and test suite - Register FFE classes in libdatadog_api init
|
Thank you for updating Change log entry section 👏 Visited at: 2025-10-24 15:17:34 UTC |
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 1 untyped method. It increases the percentage of typed methods from 51.13% to 51.29% (+0.16%). Untyped methods (+1-0)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
|
- Updated method names in the C extension and Ruby bindings to include a "_native_" prefix for clarity. - Adjusted initialization methods in the Ruby API to call the renamed native methods. - Removed unnecessary initialization in the Assignment class, as it is now created via the native get_assignment method. - Updated feature flag configuration structure in tests to align with recent changes.
- Integrated crashtracker, process discovery, library configuration, and ddsketch initialization into the core module.
- Add custom build detection to extconf.rb to support platforms without prebuilt libdatadog gem binaries - Include missing headers (common.h, library-config.h) in datadog_ruby_common.h for FFE type definitions - Update setup_ffe.sh to compile Ruby extension with proper cleanup of build artifacts - Skip problematic RSpec tests that have isolation issues in fork environment (functionality works correctly) - Add complete build directory cleanup to setup script
- Fixed ddog_ffe_evaluation_context_new_with_attributes to use AttributePair struct
Contributor
Author
|
Closing this PR in favor of #5007 |
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 PR do?
Motivation:
Change log entry
None because this binding is an internal feature (not user-facing). User-facing methods will be from the OpenFeature provider
Additional Notes:
Since
datadog-ffe-ffi(DataDog/libdatadog#1282) hasn't been published yet, you'll need to buildlibdatadoglocally to access the evaluation engine.Prerequisites
cargoandcbindgenpkg-configsystem tool~/dd/(assumes you have~/dd/dd-trace-rband~/dd/libdatadog)To build
libdatadogand test binding indd-trace-rbRun this script.
To clean and retry
How to test the change?