Skip to content
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

Handle Redis Deprecations #2

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

johnsyweb
Copy link

Context

Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0, which means apps using this gem are spewing logs like this:

Example logs
Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0.

redis.pipelined do
  redis.get("key")
end

should be replaced by

redis.pipelined do |pipeline|
  pipeline.get("key")
end

(called from /Users/paj/.asdf/installs/ruby/2.7.5/lib/ruby/gems/2.7.0/gems/fresh_redis-0.1.0/lib/fresh_redis/string.rb:33:in `fsum'}
Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0.

redis.pipelined do
  redis.get("key")
end

should be replaced by

redis.pipelined do |pipeline|
  pipeline.get("key")
end

(called from /Users/paj/.asdf/installs/ruby/2.7.5/lib/ruby/gems/2.7.0/gems/fresh_redis-0.1.0/lib/fresh_redis/string.rb:33:in `fsum'}
Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0.

redis.multi do
  redis.get("key")
end

should be replaced by

redis.multi do |pipeline|
  pipeline.get("key")
end

(called from /Users/paj/.asdf/installs/ruby/2.7.5/lib/ruby/gems/2.7.0/gems/fresh_redis-0.1.0/lib/fresh_redis/string.rb:5:in `fincrby'}
Pipelining commands on a Redis instance is deprecated and will be removed in Redis 5.0.0.

redis.pipelined do
  redis.get("key")
end

should be replaced by

redis.pipelined do |pipeline|
  pipeline.get("key")
end

(called from /Users/paj/.asdf/installs/ruby/2.7.5/lib/ruby/gems/2.7.0/gems/fresh_redis-0.1.0/lib/fresh_redis/string.rb:33:in `fsum'}

Change

  • Remove incompatible rspec config from project and leave this to the individual
  • Unlock and update all gem dependencies
  • Get specs running again
  • Use Redis#pipelined with block
  • Use transaction variable with Redis#multi in anticipation of the same happening here

Considerations

A new release would be nice, please!

rspec-mocks (2.11.3)
thor (0.16.0)
timecop (0.5.2)
coderay (1.1.3)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

coderay

Gem added ⛄

[change-log, source-code, gem-diff]

thor (0.16.0)
timecop (0.5.2)
coderay (1.1.3)
diff-lcs (1.5.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

timecop (0.5.2)
coderay (1.1.3)
diff-lcs (1.5.0)
ffi (1.15.5)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ffi

Minor version upgrade 📈🔶 1.1.5 → 1.15.5

[change-log, source-code, gem-diff]

🎉 Patched vulnerabilities:

coderay (1.1.3)
diff-lcs (1.5.0)
ffi (1.15.5)
formatador (1.1.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatador

Gem added ⛄

[change-log, source-code, gem-diff]

diff-lcs (1.5.0)
ffi (1.15.5)
formatador (1.1.0)
guard (2.18.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guard

Major version upgrade 📈❗ 1.4.0 → 2.18.0

[change-log, source-code, gem-diff]

Commits

A change of 1218 commits. See the full changes on the compare page.

These are the first 10 commits:

pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guard-compat

Gem added ⛄

[change-log, source-code, gem-diff]

shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.7.3)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
listen (3.7.1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.8)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lumberjack

Gem added ⛄

[change-log, source-code, gem-diff]

rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.8)
method_source (1.0.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method_source

Gem added ⛄

[change-log, source-code, gem-diff]

rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.8)
method_source (1.0.0)
mock_redis (0.31.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mock_redis

Minor version upgrade 📈🔶 0.5.4 → 0.31.0

[change-log, source-code, gem-diff]

Commits

A change of 406 commits. See the full changes on the compare page.

These are the first 10 commits:

method_source (1.0.0)
mock_redis (0.31.0)
ruby2_keywords
nenv (0.3.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nenv

Gem added ⛄

[change-log, source-code, gem-diff]

mock_redis (0.31.0)
ruby2_keywords
nenv (0.3.0)
notiffany (0.1.3)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

notiffany

Gem added ⛄

[change-log, source-code, gem-diff]

notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
pry (0.14.1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pry

Gem added ⛄

[change-log, source-code, gem-diff]

pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
rake (13.0.6)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rake

Major version upgrade 📈❗ 0.9.2.2 → 13.0.6

[change-log, source-code, gem-diff]

🎉 Patched vulnerabilities:

  • CVE-2020-8130
    OS Command Injection in Rake

    CVSS V2: 9.3 high
    URL: GHSA-jppv-gw3r-w3q8

    There is an OS command injection vulnerability in Ruby Rake < 12.3.3 in Rake::FileList when supplying a filename that begins with the pipe character |.

Commits

A change of 1443 commits. See the full changes on the compare page.

These are the first 10 commits:

coderay (~> 1.1)
method_source (~> 1.0)
rake (13.0.6)
rb-fsevent (0.11.1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

method_source (~> 1.0)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.6.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.6.0)
rspec (3.11.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rspec

Major version upgrade 📈❗ 2.11.0 → 3.11.0

[change-log, source-code, gem-diff]

Commits

A change of 94 commits. See the full changes on the compare page.

These are the first 10 commits:

rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rspec-support

Gem added ⛄

[change-log, source-code, gem-diff]

diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
ruby2_keywords (0.0.5)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ruby2_keywords

Gem added ⛄

[change-log, source-code, gem-diff]

rspec-support (~> 3.11.0)
rspec-support (3.11.0)
ruby2_keywords (0.0.5)
shellany (0.0.1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shellany

Gem added ⛄

[change-log, source-code, gem-diff]

rspec-support (3.11.0)
ruby2_keywords (0.0.5)
shellany (0.0.1)
thor (1.2.1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ruby2_keywords (0.0.5)
shellany (0.0.1)
thor (1.2.1)
timecop (0.9.5)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@benlangfeld
Copy link

@madlep Might you consider this PR?

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.

2 participants