Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove unnecessary precomputed constructor error logs #229

Merged

Conversation

sameerank
Copy link
Contributor


labels: mergeable

Fixes: #issue

Motivation and Context

There is a place in EppoPrecomputedJSClient's implementation where we want to initialize the instance with an empty store.

https://github.com/Eppo-exp/js-client-sdk/blob/5b317dab2cda07abb8aa259a14e7f88ac1dfc963/src/index.ts#L680-L688

This results in the following two errors getting logged

"[Eppo SDK] EppoPrecomputedClient requires an initialized precomputedFlagStore if requestParameters are not provided"
"[Eppo SDK] EppoPrecomputedClient requires a precomputedFlagStore with a salt if requestParameters are not provided"

Even if the client isn't even using the precomputed client, since we are initializing it automatically to ensure that getPrecomputedInstance always returns an instance.

Description

The change here allows EppoPrecomputedClient's initialization with an empty store without a salt and without the store being set to initialized.

How has this been tested?

Some unit tests that reproduce what is happening in the js-client-sdk

@sameerank sameerank requested review from greghuels and typotter March 4, 2025 02:37
@sameerank sameerank merged commit 9b2a216 into main Mar 4, 2025
8 checks passed
@sameerank sameerank deleted the sameeran/remove-unnecessary-precomputed-constructor-error-logs branch March 4, 2025 06:27
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