petergoldstein/dalli

Question issue upgrade 3.0.1

ips219 opened this issue · 13 comments

After 3.0.1 migration of today we have a problem in the start-up of redmine

SyntaxError: /usr/local/bundle/gems/dalli-3.0.1/lib/dalli/client.rb:369: syntax error, unexpected keyword_rescue, expecting keyword_end rescue DalliError, NetworkError => e ^ /usr/local/bundle/gems/dalli-3.0.1/lib/dalli/client.rb:369: dynamic constant assignment rescue DalliError, NetworkError => e ^ /usr/local/bundle/gems/dalli-3.0.1/lib/dalli/client.rb:369: dynamic constant assignment ue DalliError, NetworkError => e ^ /usr/local/bundle/gems/dalli-3.0.1/lib/dalli/client.rb:369: syntax error, unexpected =>, expecting '=' ue DalliError, NetworkError => e
Is it an expected version migration issue or a regression not expected of last commit?

Thanks and best regards!

See my last comment here: #758

I also asked here: danmunn/redmine_dmsf#1297

@ips219 @zumodevidrio Can you please provide platform information on where you'e seeing the issue? I suspect we're looking at a Windows regression that snuck in during the socket level rewrite.

In my case it is Redmine running over a Docker Linux container.... As @zumodevidrio commented in dmsf fixing the plugin dependency to an older version resolved the issue in redmine.

@ips219 What's the Ruby version you're running?

Crruent version is 2.4.5

@ips219 So I suspect your Ruby version is the issue. The compatibility notes on the README are out of date and need an update. Our CI only runs Ruby 2.5, 2.6, 2.7, 3.0.

I need to do some work on straightening that out. But I'm going to set the minimum Ruby for Dalli 3.0 at 2.5, so you likely need to lock to Dalli 2.7.x to ensure you can use Ruby 2.4.5.

Ok...thanks for the clarification and your support

Same environment for me, Redmine over Docker Linux and Ruby version 2.4.6p354

As mentioned here, I was confronted with a dalli-related error too when upgrading my Redmine instance. My environment is different, however:

  • MS Windows Server 2012, Version 6.2, Build 9200
  • Ruby version: 2.7.4-p191 (2021-07-07) [x64-mingw32]
  • Redmine version: 4.2.3.stable

That's the stacktrace I encountered:

C:\redmine-V4.2.3>bundle exec rake db:migrate RAILS_ENV=production
rake aborted!
NameError: uninitialized constant Dalli::Socket::UNIXSocket
Did you mean?  IPSocket
               UDPSocket
C:/redmine-V4.2.3/config/application.rb:18:in `<top (required)>'
C:/redmine-V4.2.3/Rakefile:5:in `require'
C:/redmine-V4.2.3/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

I suspect this is a Windows regression.
Maybe we are looking at two different problems here? One compatibility issue with Ruby versions < 2.5 and another socket issue that occurs on Windows systems only?

Edit: I just saw #796, so I think this is fixed already.

@deining We're almost certainly looking at two different problems.

As you noted, I put in #796 which I think should fix your issue. If you could load Dalli from current master and report whether the fix addresses your issue, that would be helpful.

If you could load Dalli from current master and report whether the fix addresses your issue, that would be helpful.

I just tested you fix and yes, I can confirm that it successfully addresses my issue. Looking forward to a new version of dalli that contains this fix.

@deining Great. I can take care of the latter shortly.

As these issues have either been clarified (minimum Ruby version) or addressed (Windows compatibility) with the 3.0.2 release, I'm going to close this issue.