-
-
Notifications
You must be signed in to change notification settings - Fork 419
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
Flipper::Adapters::Strict::NotFound raised when checking non-existant feature flag during rspec test #849
Comments
Hi @dannyy83, you're actually running into an issue with the strict adapter, introduced in #763. I'm guessing you're running Flipper 1.1? In 1.2 we disabled the strict adapter in tests because people were running into this issue. So you can either upgrade to 1.2 or manually disable it per the directions in the 1.1 release notes (see https://github.com/flippercloud/flipper/releases). Let me know if that doesn't fix it for you. |
Hi @bkeepers, I'm seeing this with the following environment: My configuration for flipper is:
I have no explicit flipper configuration in rspec, except for what's being automatically pulled in from https://github.com/flippercloud/flipper/blob/main/lib/flipper/test_help.rb |
@bkeepers I've also tried to configure flipper as follows (as here https://www.flippercloud.io/docs/adapters/redis)
And I still have the same issue. |
I've also tried to disable the strict adapter as suggested:
And this has no effect. |
Also, here is the stack trace of the error being raised:
|
Hi @bkeepers. I've done some more investigation on this, and tracked down the root cause of this problem to https://github.com/flippercloud/flipper/blob/main/lib/flipper/engine.rb#L71 I'm not sure why, but the call to To be more explicit, If I set a breakpoint on the above line, you can see:
|
I've finally tracked down this problem... |
@dannyy83 wow, that's a fun one. I'm glad you figured it out! I'm not sure there's much we can do in flipper to work around that, but I'm open to suggestions if you have ideas. |
Hi @bkeepers, I agree there's not much we can do for flipper to work around this issue. I don't have any suggestions. For others that may see this problem, I worked around this issue by setting
And instead manually load it in the
|
The following error is being raised when a class under test is checking if a feature toggle exists:
I believe this is being caused by a bug in the
flipper_configure
method withintest_help.rb
:The code above should not be calling
config.adapter
when initializing Flipper. Instead, it should be:Is there any work around to prevent
test_help.rb
from being loaded, so that I can configure flipper myself, to avoid this? This is preventing me from upgrading to flipper v1.2The text was updated successfully, but these errors were encountered: