Comments (13)
@n-rodriguez the active record gem spec is grabbing that. That's the issue.
flipper/flipper-active_record.gemspec
Line 6 in acab7e4
So it was both related and unrelated. Haha. I'll get it fixed up.
from flipper.
Hi @n-rodriguez thanks for reporting. This is odd. Redis shouldn't matter here. It's just requiring a file in flipper that defines a few helper methods.
You are on rails 7.1.2 and ruby 3.2.2, correct? Anything else unique or different about your setup that you can think of?
@bkeepers I did a blame on that and it was me that added it. I haven't done a lot in the engine though, anything in there look wrong or odd?
from flipper.
Hi @n-rodriguez thanks for reporting. This is odd. Redis shouldn't matter here
I think it's the opposite: I use redis, active record shouldn't matter here.
from flipper.
@n-rodriguez the reason it shouldn't matter is this is about extending active record to automatically include flipper_id and flipper_properties for each active record model. That's why I said it shouldn't matter. It has nothing to do with redis specifically or your flipper adapter. It's just generic extension of active record. Additionally, it shouldn't matter because the file doesn't require active record or actually do any of the extending.
Can you set your Gemfile to this:
gem "flipper", {git: "https://github.com/jnunemaker/flipper", branch: "delayed-require"}
And let me know if that works? If so, I can cut a patch release for ya.
from flipper.
Can you set your Gemfile to this:
gem "flipper", {git: "https://github.com/jnunemaker/flipper", branch: "delayed-require"}And let me know if that works? If so, I can cut a patch release for ya.
Done, still don't work :
<internal:/Users/nicolas/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require': cannot load such file -- flipper/model/active_record (LoadError)
from <internal:/Users/nicolas/.asdf/installs/ruby/3.2.2/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
from /Users/nicolas/PROJECTS/CONCERTO/concerto/.bundle/ruby/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
from /Users/nicolas/PROJECTS/CONCERTO/concerto/.bundle/ruby/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
from /Users/nicolas/PROJECTS/CONCERTO/concerto/.bundle/ruby/3.2.0/gems/flipper-1.1.0/lib/flipper/engine.rb:19:in `block (2 levels) in <class:Engine>'
from flipper.
Delaying require "flipper/model/active_record"
can't work because there's no flipper/model/active_record
in gem tree :
nicolas@MacBook-Pro-de-Nicolas:~/PROJECTS/CONCERTO/concerto/.bundle/ruby/3.2.0/gems/flipper-1.1.0$ tree lib/
lib/
├── flipper
│ ├── actor.rb
│ ├── adapter.rb
│ ├── adapter_builder.rb
│ ├── adapters
│ │ ├── dual_write.rb
│ │ ├── failover.rb
│ │ ├── failsafe.rb
│ │ ├── http
│ │ │ ├── client.rb
│ │ │ └── error.rb
│ │ ├── http.rb
│ │ ├── instrumented.rb
│ │ ├── memoizable.rb
│ │ ├── memory.rb
│ │ ├── operation_logger.rb
│ │ ├── poll
│ │ │ └── poller.rb
│ │ ├── poll.rb
│ │ ├── pstore.rb
│ │ ├── read_only.rb
│ │ ├── strict.rb
│ │ ├── sync
│ │ │ ├── feature_synchronizer.rb
│ │ │ ├── interval_synchronizer.rb
│ │ │ └── synchronizer.rb
│ │ └── sync.rb
│ ├── cloud
│ │ ├── configuration.rb
│ │ ├── dsl.rb
│ │ ├── message_verifier.rb
│ │ ├── middleware.rb
│ │ ├── routes.rb
│ │ ├── telemetry
│ │ │ ├── backoff_policy.rb
│ │ │ ├── instrumenter.rb
│ │ │ ├── metric.rb
│ │ │ ├── metric_storage.rb
│ │ │ └── submitter.rb
│ │ └── telemetry.rb
│ ├── cloud.rb
│ ├── configuration.rb
│ ├── dsl.rb
│ ├── engine.rb
│ ├── errors.rb
│ ├── export.rb
│ ├── exporter.rb
│ ├── exporters
│ │ └── json
│ │ ├── export.rb
│ │ └── v1.rb
│ ├── expression
│ │ ├── builder.rb
│ │ └── constant.rb
│ ├── expression.rb
│ ├── expressions
│ │ ├── all.rb
│ │ ├── any.rb
│ │ ├── boolean.rb
│ │ ├── comparable.rb
│ │ ├── duration.rb
│ │ ├── equal.rb
│ │ ├── greater_than.rb
│ │ ├── greater_than_or_equal_to.rb
│ │ ├── less_than.rb
│ │ ├── less_than_or_equal_to.rb
│ │ ├── not_equal.rb
│ │ ├── now.rb
│ │ ├── number.rb
│ │ ├── percentage.rb
│ │ ├── percentage_of_actors.rb
│ │ ├── property.rb
│ │ ├── random.rb
│ │ ├── string.rb
│ │ └── time.rb
│ ├── feature.rb
│ ├── feature_check_context.rb
│ ├── gate.rb
│ ├── gate_values.rb
│ ├── gates
│ │ ├── actor.rb
│ │ ├── boolean.rb
│ │ ├── expression.rb
│ │ ├── group.rb
│ │ ├── percentage_of_actors.rb
│ │ └── percentage_of_time.rb
│ ├── identifier.rb
│ ├── instrumentation
│ │ ├── log_subscriber.rb
│ │ ├── statsd.rb
│ │ ├── statsd_subscriber.rb
│ │ └── subscriber.rb
│ ├── instrumenters
│ │ ├── memory.rb
│ │ └── noop.rb
│ ├── metadata.rb
│ ├── middleware
│ │ ├── memoizer.rb
│ │ └── setup_env.rb
│ ├── poller.rb
│ ├── registry.rb
│ ├── serializers
│ │ ├── gzip.rb
│ │ └── json.rb
│ ├── spec
│ │ └── shared_adapter_specs.rb
│ ├── test
│ │ └── shared_adapter_test.rb
│ ├── type.rb
│ ├── typecast.rb
│ ├── types
│ │ ├── actor.rb
│ │ ├── boolean.rb
│ │ ├── group.rb
│ │ ├── percentage.rb
│ │ ├── percentage_of_actors.rb
│ │ └── percentage_of_time.rb
│ └── version.rb
└── flipper.rb
20 directories, 100 files
from flipper.
Ok, that's interesting. Definitely the problem. I'm sure I can reproduce and get this fixed.
from flipper.
this is about extending active record to automatically include flipper_id and flipper_properties for each active record model
fine, but moving from Flipper::Identifier
to Flipper::Model::ActiveRecord
seems to be a bad idea for people who don't use flipper-active_record
.
from flipper.
@n-rodriguez can you change the branch to fix-ar-ext-require
and see if that works for you?
from flipper.
fine, but moving from Flipper::Identifier to Flipper::Model::ActiveRecord seems to be a bad idea for people who don't use flipper-active_record.
Yeah, it will no longer do anything unless you use active record in the branch I just shared. Flipper::Identifier still exists for those not using AR as adapter or for models.
from flipper.
I verified locally with a new rails app and flipper-redis that 1.1.0 caused missing require and locking to main fixed it. I'm going to release 1.1.1 but let me know if you have further issues.
Lastly, if you don't mind, I would love to know what you are using flipper for as well and how it is working out for you (what went well, what was hard other than what you mentioned here).
If you aren't comfortable leaving that information here in a public comment, feel free to email me directly [email protected]. I'm just always curious. :)
from flipper.
It works! thank you!
I'm using Flipper in a CRM application developed by myself for a small real estate company.
Like many others, I use feature flags for rolling out new features, conducting experiments and activating/deactivating features when a service we use experiences an outage.
from flipper.
Awesome! Thanks for the feedback. Always curious. :)
from flipper.
Related Issues (20)
- Flipper causing measurable slowdowns HOT 12
- B
- mysql - BLOB/TEXT column 'value' used in key specification without a key length HOT 6
- KeyError: key not found: true in strict mode HOT 2
- Sync error with flipper cloud HOT 9
- Error when running migrations with Flipper and Strong Migrations HOT 1
- Inconsistency - custom description, banner_text uses `Sanitize` but actor names is fully escaped HOT 2
- How to handle strict adapter with test? HOT 1
- (1.2) uninitialized constant Flipper::CLI::IRB (NameError) HOT 5
- (1.2) `Flipper::TestHelp` initializer raises an error if enabled HOT 3
- RSpec/Rails Issues with 1.2.1 HOT 1
- Feature flag not being enabled in RSpec specs on 1.2.1 HOT 7
- Flipper 1.2.2 breaks my CI HOT 7
- Loading all actor identifiers into memory isn't scalable HOT 8
- Flipper::Adapters::Strict::NotFound raised when checking non-existant feature flag during rspec test HOT 9
- How to design a request-scoped per-actor flag state table? HOT 5
- Flipper Redis Adapter ignoring configuration block sometimes HOT 5
- Rails credentials read prevents Flipper from working on Rails < 5.2 HOT 2
- Flipper-active_record breaks in 0.26.2+ with Rails 4.2 HOT 2
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 flipper.