Skip to content

Handle Redis Deprecations#2

Open
johnsyweb wants to merge 5 commits into
madlep:masterfrom
johnsyweb:paj/fix-deprecation-warnings
Open

Handle Redis Deprecations#2
johnsyweb wants to merge 5 commits into
madlep:masterfrom
johnsyweb:paj/fix-deprecation-warnings

Conversation

@johnsyweb

Copy link
Copy Markdown

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!

Comment thread Gemfile.lock
rspec-mocks (2.11.3)
thor (0.16.0)
timecop (0.5.2)
coderay (1.1.3)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
thor (0.16.0)
timecop (0.5.2)
coderay (1.1.3)
diff-lcs (1.5.0)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
timecop (0.5.2)
coderay (1.1.3)
diff-lcs (1.5.0)
ffi (1.15.5)

Copy link
Copy Markdown
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:

Comment thread Gemfile.lock
coderay (1.1.3)
diff-lcs (1.5.0)
ffi (1.15.5)
formatador (1.1.0)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
diff-lcs (1.5.0)
ffi (1.15.5)
formatador (1.1.0)
guard (2.18.0)

Copy link
Copy Markdown
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:

Comment thread Gemfile.lock
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.7.3)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
listen (3.7.1)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.8)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
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
Copy Markdown
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]

Comment thread Gemfile.lock
rb-inotify (~> 0.9, >= 0.9.10)
lumberjack (1.2.8)
method_source (1.0.0)
mock_redis (0.31.0)

Copy link
Copy Markdown
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:

Comment thread Gemfile.lock
method_source (1.0.0)
mock_redis (0.31.0)
ruby2_keywords
nenv (0.3.0)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
mock_redis (0.31.0)
ruby2_keywords
nenv (0.3.0)
notiffany (0.1.3)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
pry (0.14.1)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
rake (13.0.6)

Copy link
Copy Markdown
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:

Comment thread Gemfile.lock
coderay (~> 1.1)
method_source (~> 1.0)
rake (13.0.6)
rb-fsevent (0.11.1)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
method_source (~> 1.0)
rake (13.0.6)
rb-fsevent (0.11.1)
rb-inotify (0.10.1)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
rb-fsevent (0.11.1)
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.6.0)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
rb-inotify (0.10.1)
ffi (~> 1.0)
redis (4.6.0)
rspec (3.11.0)

Copy link
Copy Markdown
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:

Comment thread Gemfile.lock
rspec-core (~> 3.11.0)
rspec-expectations (~> 3.11.0)
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
rspec-mocks (~> 3.11.0)
rspec-core (3.11.0)
rspec-support (~> 3.11.0)
rspec-expectations (3.11.0)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
rspec-expectations (3.11.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-mocks (3.11.1)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
rspec-mocks (3.11.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
ruby2_keywords (0.0.5)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
rspec-support (~> 3.11.0)
rspec-support (3.11.0)
ruby2_keywords (0.0.5)
shellany (0.0.1)

Copy link
Copy Markdown
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]

Comment thread Gemfile.lock
rspec-support (3.11.0)
ruby2_keywords (0.0.5)
shellany (0.0.1)
thor (1.2.1)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Comment thread Gemfile.lock
ruby2_keywords (0.0.5)
shellany (0.0.1)
thor (1.2.1)
timecop (0.9.5)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@benlangfeld

Copy link
Copy Markdown

@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