Skip to content

Conversation

@dd-oleksii
Copy link
Member

What does this PR do?

Implement OpenFeature evaluator using bindings to native libdatadog evaluator.

Change log entry

Additional Notes:

How to test the change?

@github-actions
Copy link

github-actions bot commented Nov 17, 2025

👋 Hey @p-datadog, please fill "Change log entry" section in the pull request description.

If changes need to be present in CHANGELOG.md you can state it this way

**Change log entry**

Yes. A brief summary to be placed into the CHANGELOG.md

(possible answers Yes/Yep/Yeah)

Or you can opt out like that

**Change log entry**

None.

(possible answers No/Nope/None)

Visited at: 2025-11-18 22:25:28 UTC

@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Nov 17, 2025

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage
Patch Coverage: 96.99%
Total Coverage: 95.21% (+0.04%)

View detailed report

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1ae3feb | Docs | Datadog PR Page | Was this helpful? Give us feedback!

@dd-oleksii dd-oleksii force-pushed the FFL-1273-native-feature-flags-evaluation branch 3 times, most recently from 90dd290 to df67799 Compare November 18, 2025 20:21
@dd-oleksii dd-oleksii changed the base branch from master to oleksii/libdatadog-24.0.1 November 18, 2025 20:22
Base automatically changed from oleksii/libdatadog-24.0.1 to master November 18, 2025 22:25
@dd-oleksii dd-oleksii force-pushed the FFL-1273-native-feature-flags-evaluation branch 2 times, most recently from 71e5459 to 76ac04c Compare November 19, 2025 15:23
@pr-commenter
Copy link

pr-commenter bot commented Nov 19, 2025

Benchmarks

Benchmark execution time: 2025-11-27 17:42:16

Comparing candidate commit 1ae3feb in PR branch FFL-1273-native-feature-flags-evaluation with baseline commit 92d6689 in branch master.

Found 1 performance improvements and 1 performance regressions! Performance is the same for 42 metrics, 2 unstable metrics.

scenario:profiling - intern mixed existing and new

  • 🟩 throughput [+1.662op/s; +2.882op/s] or [+5.861%; +10.163%]

scenario:profiling - intern_all 1000 repeated strings

  • 🟥 throughput [-3156.113op/s; -3083.383op/s] or [-12.144%; -11.864%]

@dd-oleksii dd-oleksii force-pushed the FFL-1273-native-feature-flags-evaluation branch from 76ac04c to ccef8cc Compare November 19, 2025 19:30
@github-actions
Copy link

github-actions bot commented Nov 19, 2025

Typing analysis

Note: Ignored files are excluded from the next sections.

Untyped methods

This PR introduces 3 untyped methods and 1 partially typed method. It increases the percentage of typed methods from 54.99% to 55.21% (+0.22%).

Untyped methods (+3-0)Introduced:
sig/datadog/core/feature_flags.rbs:22
└── def raw_value: () -> untyped
sig/datadog/core/feature_flags.rbs:24
└── def value: () -> untyped
sig/datadog/core/feature_flags.rbs:26
└── def value=: (untyped) -> untyped
Partially typed methods (+1-0)Introduced:
sig/datadog/core/feature_flags.rbs:46
└── def json?: (untyped) -> bool

If you believe a method or an attribute is rightfully untyped or partially typed, you can add # untyped:accept to the end of the line to remove it from the stats.

@dd-oleksii dd-oleksii force-pushed the FFL-1273-native-feature-flags-evaluation branch from ccef8cc to a6db269 Compare November 19, 2025 19:41
@github-actions github-actions bot added the core Involves Datadog core libraries label Nov 19, 2025
This commit is recovering Sameeran's work from #5034
@dd-oleksii dd-oleksii force-pushed the FFL-1273-native-feature-flags-evaluation branch from a6db269 to 106a374 Compare November 19, 2025 19:42
@dd-oleksii dd-oleksii force-pushed the FFL-1273-native-feature-flags-evaluation branch from 106a374 to 4862383 Compare November 19, 2025 19:49
@dd-oleksii dd-oleksii force-pushed the FFL-1273-native-feature-flags-evaluation branch 2 times, most recently from 5effc95 to 8e202f6 Compare November 19, 2025 20:15
@Strech
Copy link
Member

Strech commented Nov 20, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@dd-oleksii dd-oleksii requested review from a team as code owners November 21, 2025 11:44
Copy link
Member

@Strech Strech left a comment

Choose a reason for hiding this comment

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

Left a super-small correction of comment. I think we are good to go as soon as we get 👍🏼 from the perf team

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

I'm a bit short on time today so I gave a pass only on the feature_flags.c file -- that part LGTM (after a final suggested fix)

Copy link
Member

@y9v y9v left a comment

Choose a reason for hiding this comment

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

left some non-blocking comments

@dd-oleksii dd-oleksii force-pushed the FFL-1273-native-feature-flags-evaluation branch 3 times, most recently from 3171bd5 to 74a8452 Compare November 25, 2025 15:04
@dd-oleksii dd-oleksii force-pushed the FFL-1273-native-feature-flags-evaluation branch from 74a8452 to 262cd28 Compare November 25, 2025 15:06
@dd-oleksii
Copy link
Member Author

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Nov 25, 2025

View all feedbacks in Devflow UI.

2025-11-25 18:10:37 UTC ℹ️ Start processing command /merge


2025-11-25 18:10:52 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-11-25 22:11:12 UTC ⚠️ MergeQueue: This merge request was unqueued

devflow unqueued this merge request: It did not become mergeable within the expected time


// Forward declarations
static VALUE configuration_new(VALUE klass, VALUE json_str);
static void configuration_free(void *ptr);
Copy link
Member

Choose a reason for hiding this comment

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

Is this function taking a configuration as a parameter? If yes configuration would be a better name for the argument, void * already indicates it's a pointer.

Copy link
Member Author

@dd-oleksii dd-oleksii Nov 27, 2025

Choose a reason for hiding this comment

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

Yes and no. ptr is a data portion of RTypedData. It happens to be ddog_ffe_Handle_Configuration right now, so it's technically a configuration but not the one exposed to Ruby.

Note that this function is not exposed to Ruby, it's a part of integration with GC

VALUE feature_flags_module = rb_define_module_under(core_module, "FeatureFlags");

rb_gc_register_address(&feature_flags_error_class);
feature_flags_error_class = rb_define_class_under(feature_flags_module, "Error", rb_eStandardError);
Copy link
Member

Choose a reason for hiding this comment

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

This class is also defined in Ruby code, what is the purpose of having two definitions?

Copy link
Member Author

Choose a reason for hiding this comment

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

We need one here so we can refer to it later. I think we can remove the one defined in Ruby, although it would make the code confusing.

cc @Strech for your opinion

Copy link
Member

Choose a reason for hiding this comment

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

(For what it's worth, I like keeping the definitions on the Ruby side too, as a lot of tools gets confusing with the Ruby -> C transition and so it's clearer to have something on the Ruby side even though it gets used from C.)

(Instead of defining a class, it's possible to read from the constant instead, but the amount of code is similar so I'd keep it as-is)

@dd-oleksii
Copy link
Member Author

@p-datadog I'll work on addressing the comments but could you please clarify what comments are actually blocking the merge?

break;
default:
// Skip unsupported attribute types.
return ST_CONTINUE;
Copy link
Member

Choose a reason for hiding this comment

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

Is there an exception guard around the entire feature? If so, would it make sense to raise an exception here instead of silently ignoring unhandled input?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, there is a guard. No, it doesn't make sense because we can continue and produce results in most cases.

@dd-oleksii dd-oleksii requested a review from p-datadog November 27, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Involves Datadog core libraries mergequeue-status: removed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants