Comments (4)
If you're generally okay with the proposed solution I'm fine submitting a PR myself.
from unleash-client-go.
Hey, @jameshartig! Thanks for the issue. I know you've got a few of them open (this one, #162, and #160), so permit me to briefly talk to you here for some info. Are they all still relevant after your merging of #164?
Regarding this one specifically:
For clarity, do you mean that whenever you call GetVariant
, the SDK makes an API call to Unleash to fetch the updated state about the flag? All of Unleash's SDKs poll Unleash at set intervals, so you can make as many checks to isEnabled
you want without making any extra network calls. So the impact of doing this should at most be that you can skip some in-memory evaluation, I would think. However, I haven't looked that deeply into this SDK myself; are you saying that that's not how it works?
from unleash-client-go.
Thanks for the issue. I know you've got a few of them open (this one, #162, and #160), so permit me to briefly talk to you here for some info. Are they all still relevant after your merging of #164?
Yes, #160 is a bug with either the documentation or in the code but I'm not sure which. #162 is a feature request.
For clarity, do you mean that whenever you call GetVariant, the SDK makes an API call to Unleash to fetch the updated state about the flag? All of Unleash's SDKs poll Unleash at set intervals, so you can make as many checks to isEnabled you want without making any extra network calls. So the impact of doing this should at most be that you can skip some in-memory evaluation, I would think. However, I haven't looked that deeply into this SDK myself; are you saying that that's not how it works?
Yes, I understand it doesn't do another network lookup, but it does call r.options.storage.Get
again which happens to be Redis for us. Let me create a quick PR to show my proposed solution since I think will be simpler to get across.
from unleash-client-go.
Great; thanks! 🙏🏼
It appears that #162 has been resolved and that you have a PR in the works for this one that @FredrikOseberg has said he'll have a look at, so that's sorted.
Regarding #160, I think it's the documentation that's unclear (but I'll double check against the implementations in the other SDKs). And while I think you're right in that it's at least misleading, it could be read as being correct: if the flag exists, then you'll always find a variant (even if it's the disabled variant), so the only time the sdk won't be able to find the variant is if the flag is missing. However, that is not at all obvious and the names can certainly be misleading. I'll add it as a thing to solve and see if we can tackle it shortly.
from unleash-client-go.
Related Issues (20)
- Is there a way to get all the feature flags for a project, not just one at a time? HOT 2
- Proposal: be more strict about WithListener HOT 4
- Implement Global Segments
- (Feature Request) Enable passing api.Feature instead of a string to an alternative of IsEnabled HOT 12
- Update link to GoDoc HOT 2
- openfeature HOT 2
- infinitely blocked in metrics.count with gitlab HOT 3
- Back-off strategy for calling Unleash HOT 2
- Missing v3.9.0 Release Notes HOT 1
- Return variant and feature enabled from a single method HOT 5
- WithVariantFallback and WithVariantFallbackFunc are called when feature isn't found HOT 3
- Add Type to api.Feature HOT 1
- Expose admin API HOT 1
- fix: GetVariant does not accept custom context HOT 1
- Publicly expose the default Strategies for faster and more advanced Strategies. HOT 2
- Unleash context in readme direct to 404 HOT 1
- Why is not options passed when calling GetVariant? HOT 1
- Missing testdata results in failed build HOT 3
- Not able to set Environment in Client HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unleash-client-go.