open-feature / ofep

A focal point for OpenFeature research, proposals and requests for comments
https://openfeature.dev
21 stars 15 forks source link

SDK wait provider to be ready #80

Closed thomaspoignant closed 1 year ago

thomaspoignant commented 1 year ago

This PR

toddbaert commented 1 year ago

Should we recommend this functionality on the API, the client, or both?

Adding it just at the API seems like the most conservative move to me, especially if we're expecting it to throw. That would make this more of a convenience method for integrators. I'm not sure how I'd expect this to behave on clients, which we don't want to throw, generally.

thomaspoignant commented 1 year ago

We have a trend in favor of alternative 4. Should we add this to the specification?

toddbaert commented 1 year ago

@thomaspoignant @beeme1mr My only remaining question about this proposal is here.

I think we should clearly indicate if we want this feature to be available only where providers are set (on the API) or also on the client. I advocate we add it just at the API level.

In any case, when this is merged, I think we should add a SHOULD requirement to the spec for this.

Kavindu-Dodan commented 1 year ago

@thomaspoignant @beeme1mr My only remaining question about this proposal is here.

I think we should clearly indicate if we want this feature to be available only where providers are set (on the API) or also on the client. I advocate we add it just at the API level.

In any case, when this is merged, I think we should add a SHOULD requirement to the spec for this.

I am not sure what you refer by or also on the client 🤔 we only have set provider in API level. And if set provider is blocking, then we cannot invoke API to retrieve client. So I don't see why we need to consider client here. But may be I am missing something.

toddbaert commented 1 year ago

I am not sure what you refer by or also on the client we only have set provider in API level. And if set provider is blocking, then we cannot invoke API to retrieve client. So I don't see why we need to consider client here. But may be I am missing something.

client.wairForReady is what I meant, but I would rather not implement this. If we all agree this is only associated with the ability to set the provider, that's fine with me, and of course only implies it's on the API.

toddbaert commented 1 year ago

Merging this. I think we see a trend toward option 4 as mentioned here. I think we should open a spec PR.