Skip to content

Allow setting redis options#132

Open
wnm wants to merge 3 commits into
chaps-io:masterfrom
wnm:update-redis-configuration-2
Open

Allow setting redis options#132
wnm wants to merge 3 commits into
chaps-io:masterfrom
wnm:update-redis-configuration-2

Conversation

@wnm
Copy link
Copy Markdown

@wnm wnm commented Aug 13, 2025

No description provided.

@wnm wnm mentioned this pull request Aug 13, 2025
@wnm
Copy link
Copy Markdown
Author

wnm commented Aug 13, 2025

I tried running the specs, but got:

An error occurred while loading ./spec/gush_spec.rb.
Failure/Error: require 'active_support'

NameError:
  uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

🤔

@wnm
Copy link
Copy Markdown
Author

wnm commented Oct 6, 2025

@krzyzak 👀

@pokonski
Copy link
Copy Markdown
Contributor

uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

I think it's because of ruby-concurrency/concurrent-ruby@d7ce956

@pokonski
Copy link
Copy Markdown
Contributor

Weirdly enough this PR has no github actions to run 🤔

@nplusp
Copy link
Copy Markdown

nplusp commented Dec 8, 2025

@wnm @pokonski

Hey folks, I want to use Gush on our project, but we face this issue of not having options for Redis, as say, Sidekiq has.

I've looked in to the issue with specs, and managed to resolve it, by changing rails_version in the Gemfile:

-rails_version = ENV['RAILS_VERSION'] || '< 7.0'
+rails_version = ENV['RAILS_VERSION'] || '<= 8.1'

This allows activesupport 7+ which is compatible with concurrent-ruby >= 1.3.4.
You already do have 8.1 enabled in the gemspec, so this shouldn't be an issue.

@wnm
Copy link
Copy Markdown
Author

wnm commented Dec 8, 2025

thanks @nplusp I updated the Gemfile as you suggested. lets see if that triggers github actions now

@wnm
Copy link
Copy Markdown
Author

wnm commented Dec 8, 2025

thanks @nplusp I updated the Gemfile as you suggested. lets see if that triggers github actions now

ah, the tests run now, but most of them fail with uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger

@nplusp
Copy link
Copy Markdown

nplusp commented Dec 8, 2025

@wnm interesting - I cannot reproduce that issue within you branch. Do you run rspec with prepending bundle exec?

@wnm
Copy link
Copy Markdown
Author

wnm commented Dec 8, 2025

@nplusp yes, it also shows the failing tests in the workflows now: https://github.com/wnm/gush/actions/runs/20033903532

@nplusp
Copy link
Copy Markdown

nplusp commented Dec 8, 2025

Oh yes, another fix would be either to add require "logger" in the lib/gush.rb, or locking the concurrent-ruby to the 1.3.4, as they've dropped the logger support for it ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

ruby-concurrency/concurrent-ruby@d7ce956

https://stackoverflow.com/questions/79360526/uninitialized-constant-activesupportloggerthreadsafelevellogger-nameerror

@nplusp
Copy link
Copy Markdown

nplusp commented Dec 8, 2025

I also have noticed a few specs that were failing locally, adding these to reset cached configuration helped:

config.after(:each) do
  clear_enqueued_jobs
  clear_performed_jobs
  redis.flushdb
+  Gush::Client.class_variable_set(:@@redis_connection, Concurrent::ThreadLocalVar.new(nil))
+  Gush.instance_variable_set(:@configuration, nil)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants