Closed tiagozc closed 1 year ago
It is per design. @clun any thoughts ?
As of today the creation of the feature is triggered on the enable()
and not check()
. It would make sense to have it in the check as well i guess, it used to be the case.
https://github.com/ff4j/ff4j/blob/main/ff4j-core/src/main/java/org/ff4j/FF4j.java#L345
@clun it looks like it also creates on check()
... check()
calls getFeature()
, which then creates the feature flag also in case autoCreate is enabled
@tiagozc, hoping your question is answered. If not, please feel free to re-open
Describe the bug I'm not sure whether this is a bug or a design decision, but when the FF4J is set up with
autoCreate(true)
and you request the/check
endpoint for an array of feature flags it does not auto create them. The code actually it's quite explicitly asserting that the feature flag must exist otherwise throwing an exception. But the FF4J corecheck()
method (not the endpoint) does similar thing, but auto creates the feature flag if that is enabled.To Reproduce Steps to reproduce the behavior:
autoCreate(true)
/check
endpoint with an inexistent feature flagExpected behavior The feature flag gets auto created.