Closed DAGRSAG closed 4 months ago
I should add, that we use the sdk in an offline mode. Means only the bootstrap file is loaded and decides about the toggle state
Hi @DAGRSAG . Thanks for your report. I think you're right; I'll see if I can't release a fix this week.
Hi @chriswk, thanks for the update and working on a fix.
I've released 9.2.4 just now, which includes this fix. Should be live within the next hour. Thanks for reporting this.
Awesome. Thanks. I will test it on Thursday 👍
Describe the bug
Hi, we have the following config defined in our bootstrap file
My purpose here is, that we have toggle
featureOne
which should only be true, when the parentSR26_Pack
is true.If your code evaluates the toggle now, the return value is
true
, which is not expected.In my opinion the problem is in this
DefaultUnleash
code herethis code means, that if no strategy is defined (
featureToggle.getStrategies().isEmpty()
returnstrue
) always true is returned as evaluation value for the toggle. The parent dependencies are only looked at for the first time in the else block afterwards.Why not checking first if the
isParentDependencySatisfied
after!featureToggle.isEnabled()
? Because if the parent dependencies not satisfied to toggle can not be true.The behavior is correct, if e.g. the default strategy is added to the toggle def
Steps to reproduce the bug
No response
Expected behavior
Parent dependencies gets considered also if no strategy is defined
Logs, error output, etc.
No response
Screenshots
No response
Additional context
No response
Unleash version
No response
Subscription type
Open source
Hosting type
Self-hosted
SDK information (language and version)
Java in version 9.2.0