gitlab-labkit 2.2.0 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/labkit/redis/script.rb +7 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e99765f42b600bc7e6307b75665409c3e3ee3b6aabf69f5bdb14d65fe20d8cdc
4
- data.tar.gz: b2623750accd4178e7d938ebf87abbb6e1d40f14d4e252b9654f015d4141ce3c
3
+ metadata.gz: aa84e74351dd4b2829e4275391f8edb5b14c71dd8662353fa9741ee4e6ca42d8
4
+ data.tar.gz: 8a4ce606cb5a1d7f1f26c68bfd7c00078c2daa45b48b5b93e631d169364ea5e6
5
5
  SHA512:
6
- metadata.gz: cfc0d196a34588965f17b6598b7bf8b1cdaa8d90d79e62bf5a4d75e07537473ee4a8011c7718e18af64d4ec216a85b7bd3a3099523404f6bd7c892b5a7b4ae35
7
- data.tar.gz: fdb892b50ca446d76d999e7397c57df1539f6724e31ea698b440a7d08a5544e25246d2a4d7ed5bb4516dc5592b31fc7bb1860d29baac43bdc3b94052d011c24d
6
+ metadata.gz: cb0460842e9bd0f2f5635981d15f5024b5f8adc47b9242b5bd2bf4b6dc0041b460bd0c491496c37416b71c833af007a889b29c73608d74825838f0f2f3449c5f
7
+ data.tar.gz: 9cdb9688e251cfc87276bc507541149e54bf332f9b67ec4e3d08cce61fcc965c4b69be704f94c1bda6e8f867a31337e0dcb1736a59aec2ea1dee1cbb08683eeb
@@ -33,7 +33,13 @@ module Labkit
33
33
  # @return the script's return value
34
34
  def eval(conn, keys:, argv:)
35
35
  conn.evalsha(@sha, keys: keys, argv: argv)
36
- rescue ::Redis::CommandError => e
36
+ # Redis::CommandError and RedisClient::CommandError are sibling class trees
37
+ # with no common ancestor above StandardError -- neither inherits from the
38
+ # other. A NOSCRIPT response arrives as Redis::* on single-instance
39
+ # connections (the redis gem's translator runs) and as RedisClient::* on
40
+ # cluster connections when the cluster translator skips the conversion.
41
+ # Both shapes must reach the EVAL fallback, so we list both classes.
42
+ rescue ::Redis::CommandError, ::RedisClient::CommandError => e
37
43
  raise unless e.message.start_with?("NOSCRIPT")
38
44
 
39
45
  conn.eval(@body, keys: keys, argv: argv)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-labkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Newdigate