Git Product home page Git Product logo

Comments (9)

bkeepers avatar bkeepers commented on August 15, 2024 1

I think this was fixed by #802, but let us know if not.

from flipper.

bkeepers avatar bkeepers commented on August 15, 2024

@danielsoto15 Can you give us more information for replicating the error?

What version are you using of Sequel, Flipper, and Ruby?

from flipper.

jmoglesby avatar jmoglesby commented on August 15, 2024

Answering for @danielsoto15

CleanShot 2023-12-19 at 12 22 42

CleanShot 2023-12-19 at 12 23 06

CleanShot 2023-12-19 at 12 23 49

from flipper.

jmoglesby avatar jmoglesby commented on August 15, 2024

@bkeepers,
Is this just as simple as changing:

features_sql = @feature_class.select(:key.qualify(feature_table).as(:feature_key))

to

features_sql = @feature_class.select(&:key.qualify(feature_table).as(:feature_key))

in the location @danielsoto15 linked to above? Seems you mean to call .qualify() on a string, not a symbol.

from flipper.

danielsoto15 avatar danielsoto15 commented on August 15, 2024

Yes and also on the following two lines after these line could need the same fix

from flipper.

jnunemaker avatar jnunemaker commented on August 15, 2024

Weird. Any idea why this broke? Did sequel change? We haven't changed this part of the adapter in years.

How does this look for a fix: #802

Can you try locking bundler to that branch and see if it fixes your problem?

from flipper.

jmoglesby avatar jmoglesby commented on August 15, 2024

@jnunemaker
We're trying to make this happen, but... running into complications in our codebase that are slowing it down. I'm probably just an idiot and not doing this right. 😑

Would you mind helping me understand how this works when you have multiple gemspecs bundled into a single repository?
If I'm referencing your fix branch for the flipper-sequel gem, do I also need to do that for the flipper-cloud gem?
CleanShot 2023-12-20 at 10 26 45

Also, bundler still reports I'm getting 1.1.2 in the lockfile -- is that just because it falls back to reporting the last version tag when you import an untagged, or "ahead-of-tags" branch?
CleanShot 2023-12-20 at 10 28 50

from flipper.

bkeepers avatar bkeepers commented on August 15, 2024

@jmoglesby this is how we do it in the Flipper Cloud gemfile:

flipper_version = {github: 'flippercloud/flipper', branch: "main"}
gem 'flipper', flipper_version
gem 'flipper-api', flipper_version
gem 'flipper-active_record', flipper_version

Also, bundler still reports I'm getting 1.1.2 in the lockfile -- is that just because it falls back to reporting the last version tag when you import an untagged, or "ahead-of-tags" branch?

Yeah, we don't usually bump Flipper::VERSION until right before a release.

from flipper.

jmoglesby avatar jmoglesby commented on August 15, 2024

Ok, sorry for how long this took @jnunemaker, but I can now confirm your fix worked. Here's the error log from a flipper sync test when using flipper-cloud v1.1.2 and flipper-sequel v1.1.2:

Puma starting in single mode...                                                                                                                                                 │
│ * Puma version: 5.6.5 (ruby 2.7.6-p219) ("Birdie's Version")                                                                                                                    │
│ *  Min threads: 15                                                                                                                                                              │
│ *  Max threads: 15                                                                                                                                                              │
│ *  Environment: production                                                                                                                                                      │
│ *          PID: 1                                                                                                                                                               │
│ * Listening on http://0.0.0.0:3005                                                                                                                                              │
│ Use Ctrl-C to stop                                                                                                                                                              │
│ I, [2023-12-20T21:52:29.269066 #1]  INFO -- : [a1e10d1c67aeb0a8d73951d26875fc46] Started POST "/_flipper" for 3.85.165.104 at 2023-12-20 21:52:29 +0000                         │
│ I, [2023-12-20T21:52:29.290376 #1]  INFO -- : name=flipper_cloud action=start                                                                                                   │
│ F, [2023-12-20T21:52:29.292542 #1] FATAL -- : [a1e10d1c67aeb0a8d73951d26875fc46]                                                                                                │
│ [a1e10d1c67aeb0a8d73951d26875fc46] NoMethodError (undefined method `qualify' for :key:Symbol):                                                                                  │
│ [a1e10d1c67aeb0a8d73951d26875fc46]                                                                                                                                              │
│ [a1e10d1c67aeb0a8d73951d26875fc46] flipper-sequel (1.1.2) lib/flipper/adapters/sequel.rb:107:in `get_all'                                                                       │
│ [a1e10d1c67aeb0a8d73951d26875fc46] flipper (1.1.2) lib/flipper/adapters/dual_write.rb:31:in `get_all'                                                                           │
│ [a1e10d1c67aeb0a8d73951d26875fc46] flipper (1.1.2) lib/flipper/adapters/memoizable.rb:93:in `get_all'                                                                           │
│ [a1e10d1c67aeb0a8d73951d26875fc46] flipper (1.1.2) lib/flipper/dsl.rb:239:in `preload_all'                                                                                      │
│ [a1e10d1c67aeb0a8d73951d26875fc46] /usr/local/lib/ruby/2.7.0/delegate.rb:83:in `method_missing'                                                                                 │
│ [a1e10d1c67aeb0a8d73951d26875fc46] /usr/local/lib/ruby/2.7.0/forwardable.rb:235:in `preload_all'                                                                                │
│ [a1e10d1c67aeb0a8d73951d26875fc46] flipper (1.1.2) lib/flipper/middleware/memoizer.rb:83:in `memoized_call'                                                                     │
│ [a1e10d1c67aeb0a8d73951d26875fc46] flipper (1.1.2) lib/flipper/middleware/memoizer.rb:45:in `call'                                                                              │
│ [a1e10d1c67aeb0a8d73951d26875fc46] flipper (1.1.2) lib/flipper/middleware/setup_env.rb:45:in `call!'                                                                            │
│ [a1e10d1c67aeb0a8d73951d26875fc46] flipper (1.1.2) lib/flipper/middleware/setup_env.rb:40:in `call'                                                                             │
│ [a1e10d1c67aeb0a8d73951d26875fc46] actionpack (7.0.5) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'                                                │
│ [a1e10d1c67aeb0a8d73951d26875fc46] actionpack (7.0.5) lib/action_dispatch/routing/mapper.rb:48:in `serve'                                                                       │
│ [a1e10d1c67aeb0a8d73951d26875fc46] actionpack (7.0.5) lib/action_dispatch/journey/router.rb:50:in `block in serve'                                                              │
│ [a1e10d1c67aeb0a8d73951d26875fc46] actionpack (7.0.5) lib/action_dispatch/journey/router.rb:32:in `each'                                                                        │
│ [a1e10d1c67aeb0a8d73951d26875fc46] actionpack (7.0.5) lib/action_dispatch/journey/router.rb:32:in `serve'                                                                       │
│ [a1e10d1c67aeb0a8d73951d26875fc46] actionpack (7.0.5) lib/action_dispatch/routing/route_set.rb:852:in `call'

But I get successful syncs when I lock to your fix branch #802
CleanShot 2023-12-20 at 16 05 02

Puma starting in single mode...                                                                                                                                                 │
│ * Puma version: 5.6.5 (ruby 2.7.6-p219) ("Birdie's Version")                                                                                                                    │
│ *  Min threads: 15                                                                                                                                                              │
│ *  Max threads: 15                                                                                                                                                              │
│ *  Environment: production                                                                                                                                                      │
│ *          PID: 1                                                                                                                                                               │
│ * Listening on http://0.0.0.0:3005                                                                                                                                              │
│ Use Ctrl-C to stop                                                                                                                                                              │
│ I, [2023-12-20T22:14:41.395378 #1]  INFO -- : [66292e2f9bc1b6e45af679f518d62561] Started POST "/_flipper" for 44.201.121.71 at 2023-12-20 22:14:41 +0000                        │
│ I, [2023-12-20T22:14:41.408416 #1]  INFO -- : name=flipper_cloud action=start

from flipper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.