Skip to content

[FFL-3355] Add standalone rules configuration fetch helper - #1508

Draft
sameerank wants to merge 2 commits into
sameerank/FFL-3355/native-tracking-hooksfrom
sameerank/rn-rules-configuration-fetch
Draft

sameerank wants to merge 2 commits into
sameerank/FFL-3355/native-tracking-hooksfrom
sameerank/rn-rules-configuration-fetch

Conversation

@sameerank

@sameerank sameerank commented Oct 21, 2026 •

Copy link
Copy Markdown

What does this PR do?

Add fetchRulesConfiguration and RulesConfigurationFetchOptions to the React Native OpenFeature /rules-based entry point (FFL-3355).

  • Fetch client-distributed protobuf rules with a client token, environment, supported site domain, optional fetch implementation, and optional abort signal.
  • Decode a portable FlagsConfiguration and attach the retrieval timestamp without initializing the native SDK or registering tracking.
  • Validate sites before sending the token and preserve useful HTTP errors, network errors, cancellation, and decoding failures.
  • Make one request per call, without implicit polling, retries, persistence, or tracking.
  • Add documentation and regression coverage for explicit refresh, preserved configuration after refresh failure, and refreshed tracking metadata with active hooks.

Motivation

The RN core provider supports local rules-based evaluation, but applications also need a client-side fetch helper to obtain its portable configuration. This follows the browser helper pattern while avoiding URL APIs that are incomplete on supported RN versions.

Additional Notes

This is stacked on #1507 and intentionally targets sameerank/FFL-3355/native-tracking-hooks. The PR diff contains only the fetch helper and its related documentation/tests. Retarget to develop after the tracking PR lands.

The helper itself does not require native SDK initialization. The active-hook integration tests use the tracking functionality from the base branch. Native dependency/release blockers for the combined branch are documented in the tracking PR.

Validation:

  • The targeted fetch-helper and tracking integration suites passed together: 51 tests.
  • Tests cover supported/invalid domains, environment encoding, headers, cancellation, HTTP/network/body/decode failures, local evaluation after context changes, and failed/successful refresh with active tracking hooks.
  • Full repository CI remains to be reviewed on this draft.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • 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)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

✨ Unblock PR with BitsAI

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 4 Pipeline jobs failed

DataDog/dd-sdk-reactnative | test:native-android — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/dd-sdk-reactnative | test:native-ios — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

DataDog/dd-sdk-reactnative | test:native-ios-newarch — 🔧 Needs a code fix, caused by this PR

View more details · View in GitLab

View all 4 failed jobs.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1bd9aa8 | Docs | View more details | Give us feedback!

@sameerank
sameerank force-pushed the sameerank/rn-rules-configuration-fetch branch from 147076a to 1bd9aa8 Compare October 23, 2026 06:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant