Skip to content

FFL-1675: [Flags] Add support for global flags via EvaluationContext.EMPTY#3104

Merged
dd-mergequeue[bot] merged 12 commits into
developfrom
typo/FFL-1675-sdk-android-support-global
Jan 7, 2026
Merged

FFL-1675: [Flags] Add support for global flags via EvaluationContext.EMPTY#3104
dd-mergequeue[bot] merged 12 commits into
developfrom
typo/FFL-1675-sdk-android-support-global

Conversation

@typotter

@typotter typotter commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds EvaluationContext.EMPTY constant to support global flag evaluations without user-specific targeting context.

This PR also includes a couple of minor fixes in the flags module.

Motivation

The Open Feature spec does not require a tarketingKey for flag evaluation. Our flags module requires a non-null key so that it may compute bucketing. An empty string is a valid targeting key, so this EMPTY context is a handy shortcut for when a non-null-but-empty context is required.

The NoopFlagsClient is expected to start in a NotReady state, rather than an error. This missing expectation surfaced in openfeature module testing.

Additional Notes

Use Cases

// Evaluate a global flag without any user context
client.setEvaluationContext(EvaluationContext.EMPTY)
val globalFeature = client.resolveBooleanValue("global-feature", false)

Related

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@typotter
typotter requested a review from a team as a code owner January 5, 2026 22:35
typotter added a commit that referenced this pull request Jan 5, 2026
@typotter typotter changed the title FFL-1675: Add support for global flags via EvaluationContext.EMPTY FFL-1675: [Flags] Add support for global flags via EvaluationContext.EMPTY Jan 5, 2026
@typotter
typotter force-pushed the typo/FFL-1675-sdk-android-support-global branch from c5e45ae to e398b27 Compare January 5, 2026 22:43
@datadog-official

datadog-official Bot commented Jan 5, 2026

Copy link
Copy Markdown

🎯 Code Coverage
Patch Coverage: 100.00%
Overall Coverage: 66.49% (+0.01%)

View detailed report

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

typotter added a commit that referenced this pull request Jan 6, 2026
@typotter
typotter changed the base branch from feature/flags-ofeat to develop January 6, 2026 07:21
@typotter
typotter force-pushed the typo/FFL-1675-sdk-android-support-global branch from 33caa77 to 707ac12 Compare January 6, 2026 07:28
0xnm
0xnm previously approved these changes Jan 6, 2026

@typotter typotter left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks! ptal for the fixes applied

@typotter
typotter requested a review from 0xnm January 6, 2026 08:21
@typotter

typotter commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Jan 6, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-01-06 08:27:38 UTC ℹ️ Start processing command /merge


2026-01-06 08:27:42 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.


2026-01-06 12:28:12 UTC ⚠️ MergeQueue: This merge request was unqueued

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

0xnm
0xnm previously approved these changes Jan 6, 2026

@typotter typotter left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks Nikita. Just needs a stamp for the last tweaks please and thank you

0xnm
0xnm previously approved these changes Jan 6, 2026
@typotter

typotter commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Jan 6, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-01-06 16:27:56 UTC ℹ️ Start processing command /merge


2026-01-06 16:28:04 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.


2026-01-06 16:50:41 UTC ⚠️ MergeQueue: This merge request was unqueued

[email protected] unqueued this merge request

@typotter

typotter commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

/remove

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Jan 6, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-01-06 16:50:32 UTC ℹ️ Start processing command /remove


2026-01-06 16:50:39 UTC ℹ️ Devflow: /remove

@typotter

typotter commented Jan 6, 2026

Copy link
Copy Markdown
Contributor Author

/remove

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Jan 6, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-01-06 19:13:26 UTC ℹ️ Start processing command /remove


2026-01-06 19:13:29 UTC ℹ️ Devflow: /remove

@typotter
typotter force-pushed the typo/FFL-1675-sdk-android-support-global branch from 52ec66f to 95c4410 Compare January 6, 2026 19:14
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.48%. Comparing base (d370277) to head (95c4410).
⚠️ Report is 16 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3104      +/-   ##
===========================================
+ Coverage    71.42%   71.48%   +0.07%     
===========================================
  Files          881      881              
  Lines        32523    32524       +1     
  Branches      5479     5479              
===========================================
+ Hits         23227    23249      +22     
+ Misses        7747     7738       -9     
+ Partials      1549     1537      -12     
Files with missing lines Coverage Δ
.../datadog/android/flags/internal/NoOpFlagsClient.kt 93.33% <100.00%> (ø)
...m/datadog/android/flags/model/EvaluationContext.kt 100.00% <100.00%> (ø)
...om/datadog/android/flags/model/FlagsClientState.kt 83.33% <ø> (ø)

... and 40 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@typotter

typotter commented Jan 7, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@dd-devflow-routing-codex

dd-devflow-routing-codex Bot commented Jan 7, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-01-07 15:19:53 UTC ℹ️ Start processing command /merge


2026-01-07 15:20:01 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in develop is approximately 1h (p90).


2026-01-07 16:21:35 UTC ℹ️ MergeQueue: This merge request was merged

@dd-mergequeue
dd-mergequeue Bot merged commit 04c833a into develop Jan 7, 2026
27 checks passed
@dd-mergequeue
dd-mergequeue Bot deleted the typo/FFL-1675-sdk-android-support-global branch January 7, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants