Repository navigation
feat(openfeature): support immediate per-subject experimentation opt-out - #21112
leoromanovsky wants to merge 5 commits into
Conversation
Dependency direction analysis
|
Codeowners resolved asResolved from the full PR diff against |
BenchmarksBenchmark execution time: 2026-10-20 22:49:26 Comparing candidate commit ac6a369 in PR branch Found 0 performance improvements and 8 performance regressions! Performance is the same for 543 metrics, 10 unstable metrics, 6 known flaky benchmarks, 18 flaky benchmarks without significant changes.
|
…entation-opt-out-immediate
…entation-opt-out-immediate
🎉 All green!🧪 All tests passed 🔗 Commit SHA: ac6a369 | Docs | View more details | Give us feedback! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
No concrete defect was identified in configuration precedence, invalid-context handling, or ordinary-allocation fallback. Native and system runtime behavior remains unverified.
🤖 Bits Code Review · Commit ac6a369
brettlangdon
left a comment
There was a problem hiding this comment.
nit about keeping Cargo.toml crates all in sync on an actual libdatadog version, otherwise config/release note changes lgtm
| smallvec = "1" | ||
| tokio = "1" | ||
| libdd-ffe = { git = "https://github.com/DataDog/libdatadog", rev = "v46.0.0", optional = true, features = ["pyo3"] } | ||
| libdd-ffe = { git = "https://github.com/DataDog/libdatadog", rev = "020004781291bd9178cd91868f53291bfed550f7", optional = true, features = ["pyo3"] } |
There was a problem hiding this comment.
I'd prefer to keep this on a synced release across the other crates... if we can.
There was a problem hiding this comment.
Ok I'll wait for a release.
FFE reviewer selectionReviewers: @btthomas, @sameerank Why: server py — Adds an immediate per-subject experimentation opt-out mode to the Python OpenFeature DataDogProvider. Reviewers come from the matched pod and the required specialist pods. 🤖 Automated selection. Selection detailsInitiative: fallback / server-py Why this match: Adds an immediate per-subject experimentation opt-out mode to the Python OpenFeature DataDogProvider. A new setting and constructor option control it. When it is on, the provider skips experiment allocations for opted-out subjects and returns INVALID_CONTEXT for invalid timestamps. Evaluation telemetry and exposure handling stay the same. Experiment-allocation eligibility is explicitly excluded from ufc-compliance, and no other registered project fits, so the Python OpenFeature SME owns this. Why these owners: Eligible reviewers have already approved the current head; no additional reviewers are needed for the responsibilities those approvals cover.
Additional review: openfeature-architecture — Changes the contract at the native evaluator boundary. The PyO3 resolve_value now takes an experimentation_opt_out_immediate option and calls the shared libdatadog eval_flag_with_options with EvaluationOptions in place of get_assignment. It maps the new EvaluationError::InvalidContext to the INVALID_CONTEXT error code. The Python wrapper now replaces invalid object or array opt-out attributes with null before they reach the native layer. Coverage: @sameerank. Evidence: src/native/ffe.rs, ddtrace/internal/openfeature/_native.py, ddtrace/internal/native/_native.pyi The PR author was excluded. Existing reviewers and teams were preserved. Debug or fix a problemWorkflow run · Bits Code session
Evidence and run details✅ Complete — reviewer coverage verified. The workflow checked pending requests or submitted reviews on the evaluated head. Generated asynchronously by the FFE reviewer-routing workflow. Changed paths: Evaluated head: Registry revision: Pinned skill source: Instructions: workflow-injected snapshot (no plugin loaded) Instruction snapshot SHA-256: |
Motivation
Customers need to exclude selected subjects from experimentation without blocking ordinary feature delivery.
Changes and Decisions
DD_FEATURE_FLAGS_EXPERIMENTATION_OPT_OUT_MODE, defaulting todisabled. Explicit provider configuration takes precedence.immediatemode, validate the subject's timestamp and skip experiment allocations before targeting. Continue through ordinary allocations.INVALID_CONTEXTfor invalid timestamps. Keep evaluation telemetry and exposure deduplication unchanged.export DD_FEATURE_FLAGS_EXPERIMENTATION_OPT_OUT_MODE=immediateThe timestamp must include its time zone. A future timestamp also takes effect immediately.
Dependency: The shared libdatadog evaluator change must land and receive an approved dependency version before this draft can merge. This draft pins
DataDog/libdatadog@020004781291bd9178cd91868f53291bfed550f7.Validation
DataDog/dd-trace-py@ac6a36954750d31fb423d42d562200797b8db865DataDog/dd-trace-py@f460cd9276f220d1c4f33cf36b6472c87bfc84dcFFE reviewer selection
Reviewers: @vjfridge, @btthomas
Why: server py — Adds a per-subject experimentation opt-out mode to the Python OpenFeature provider. Reviewers come from the matched pod.
🤖 Automated selection.
Selection details
Initiative: fallback / server-py
Why this match: Adds a per-subject experimentation opt-out mode to the Python OpenFeature provider. In immediate mode it validates dd_experimentation_opt_out_at, skips experiment allocations and returns INVALID_CONTEXT for invalid timestamps. It does not suppress evaluation or exposure events: the PR keeps telemetry and exposure deduplication unchanged, so ufc-compliance does not fit. It adds no layers, mutual exclusion, holdouts or bandits. No catalog project matches this behavior, so it falls to the Python Feature Flags/OpenFeature subject pod.
The PR author was excluded. Existing reviewers and teams were preserved.
Debug or fix a problem
Workflow run · Bits Code session
dry_run=false. Unchanged completed runs are skipped. If the receipt saysneeds_reconciliationor a write outcome is uncertain, ask the workflow owner to reconcile GitHub and the receipt before retrying; do not delete the lock blindly.Evidence and run details
✅ Complete — reviewer coverage verified. The workflow checked pending requests or submitted reviews on the evaluated head.
Generated asynchronously by the FFE reviewer-routing workflow.
Changed paths:
ddtrace/internal/openfeature/_experimentation_opt_out.py,ddtrace/internal/openfeature/_provider.py,ddtrace/internal/openfeature/_native.py,ddtrace/internal/settings/openfeature.py,ddtrace/openfeature/__init__.py,tests/openfeature/test_experimentation_opt_out.py,tests/openfeature/test_provider_fixtures.pyEvaluated head:
ac6a36954750d31fb423d42d562200797b8db865Registry revision:
revision:1946aa2a-530e-487a-84a7-83aff44a1089Pinned skill source:
d214cfc65ae154b97d39af5cf32caf48aaec9bf0Instructions: workflow-injected snapshot (no plugin loaded)
Instruction snapshot SHA-256:
f23b2a88c13c0da90e2dd58246a14f257af91e2195c555039bd555b52e6f3516