Skip to content

fall back to the API when a datastream entity fetch times out - #127

Merged
bpapillon merged 1 commit into
mainfrom
datastream-fallback-on-fetch-timeout
Oct 30, 2026
Merged

bpapillon merged 1 commit into
mainfrom
datastream-fallback-on-fetch-timeout

Conversation

@bpapillon

Copy link
Copy Markdown
Contributor

When the datastream did not return a company or user within 2 seconds, DataStreamClient.checkFlag evaluated the flag against a null entity and returned that result as authoritative, so rules targeting the company were skipped. Now checkFlag throws DataStreamException when an entity the caller named cannot be fetched, and the wrapper's existing REST fallback answers the check. This matches the Go, Node, Python and Ruby SDKs. In SDK E2E run https://github.com/SchematicHQ/schematic-api/actions/runs/41110052599 the dev datastream took 4 seconds to serve a company; Java returned the right value there only because that flag had no company rules. getCompany and getUser still return null on a miss, since the credit lease check relies on that to defer to a plain check.

@bpapillon
bpapillon requested a review from a team as a code owner October 30, 2026 19:23
@bpapillon
bpapillon merged commit d8aa85b into main Oct 30, 2026
5 checks passed
@bpapillon
bpapillon deleted the datastream-fallback-on-fetch-timeout branch October 30, 2026 19:37
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.

2 participants