sidekiq 7.0.7 → 7.0.9

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23b4f6ae3bb1b64fbc6bb359c6d10b52596e3d9c6bae08129907adbaa77f9dd6
4
- data.tar.gz: '08590b7d942b48cf050f80236d56957c1ab2b26c37bc94ab07606e5b2be5b4bb'
3
+ metadata.gz: 8bdff48fe97b8b29f77dcd24b8807541fb5ddee0562efc6a836d0888a07f7429
4
+ data.tar.gz: a106c157bbe402f5ebc1ce15ffea50a1a82e5aefed49943f7dfdafa412fb4961
5
5
  SHA512:
6
- metadata.gz: 1819631e039de53bc7b1285d6955e89bc8723af0fd6ee64faf3c0d84cd69bc51a6d31ef3f7c6993cd7c937c59993c913c4bba7e3f7a936198081ab2c0af6a499
7
- data.tar.gz: a08b785013202849bca3fa61b51757ae413efb5dd459606925107843185881b8b62c8255e1aa7b1e9e3ac44bef69dfc6f1f07d93ffed0029906750850d003061
6
+ metadata.gz: 7e63f9d1bbb4f685f59a6c65c1dc820ddc3d31f1dea8c87828072f5eb89dc8a99491d43517d60d917feb8f912822fefd38f694199f31fccb36da8cab0e931ea0
7
+ data.tar.gz: e43c57aae746ae4e77b64f34bd9927e5b3b8fb2c9e5f257784a1aa767fca7aff2a978d6a7924fd5d3b659a401fc90d6ee3b9971acee547c358cc4066ac1c2a7d
data/Changes.md CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  [Sidekiq Changes](https://github.com/sidekiq/sidekiq/blob/main/Changes.md) | [Sidekiq Pro Changes](https://github.com/sidekiq/sidekiq/blob/main/Pro-Changes.md) | [Sidekiq Enterprise Changes](https://github.com/sidekiq/sidekiq/blob/main/Ent-Changes.md)
4
4
 
5
+ 7.0.9
6
+ ----------
7
+
8
+ - Restore confirmation dialogs in Web UI [#5881, shevaun]
9
+ - Increase fetch timeout to minimize ReadTimeoutError [#5874]
10
+ - Reverse histogram tooltip ordering [#5868]
11
+ - Add Scottish Gaelic (gd) locale [#5867, GunChleoc]
12
+
13
+ 7.0.8
14
+ ----------
15
+
16
+ - **SECURITY** Sanitize `period` input parameter on Metrics pages.
17
+ Specially crafted values can lead to XSS. This functionality
18
+ was introduced in 7.0.4. Thank you to spercex @ huntr.dev [#5694]
19
+ - Add job hash as 3rd parameter to the `sidekiq_retry_in` block.
20
+
5
21
  7.0.7
6
22
  ----------
7
23
 
data/lib/sidekiq/fetch.rb CHANGED
@@ -44,7 +44,7 @@ module Sidekiq # :nodoc:
44
44
  return nil
45
45
  end
46
46
 
47
- queue, job = redis { |conn| conn.blocking_call(TIMEOUT + 1, "brpop", *qs, TIMEOUT) }
47
+ queue, job = redis { |conn| conn.blocking_call(conn.read_timeout + TIMEOUT, "brpop", *qs, TIMEOUT) }
48
48
  UnitOfWork.new(queue, job, config) if queue
49
49
  end
50
50
 
@@ -171,7 +171,7 @@ module Sidekiq
171
171
  # Goodbye dear message, you (re)tried your best I'm sure.
172
172
  return retries_exhausted(jobinst, msg, exception) if count >= max_retry_attempts
173
173
 
174
- strategy, delay = delay_for(jobinst, count, exception)
174
+ strategy, delay = delay_for(jobinst, count, exception, msg)
175
175
  case strategy
176
176
  when :discard
177
177
  return # poof!
@@ -190,12 +190,12 @@ module Sidekiq
190
190
  end
191
191
 
192
192
  # returns (strategy, seconds)
193
- def delay_for(jobinst, count, exception)
193
+ def delay_for(jobinst, count, exception, msg)
194
194
  rv = begin
195
195
  # sidekiq_retry_in can return two different things:
196
196
  # 1. When to retry next, as an integer of seconds
197
197
  # 2. A symbol which re-routes the job elsewhere, e.g. :discard, :kill, :default
198
- jobinst&.sidekiq_retry_in_block&.call(count, exception)
198
+ jobinst&.sidekiq_retry_in_block&.call(count, exception, msg)
199
199
  rescue Exception => e
200
200
  handle_exception(e, {context: "Failure scheduling retry using the defined `sidekiq_retry_in` in #{jobinst.class.name}, falling back to default"})
201
201
  nil
@@ -70,7 +70,7 @@ module Sidekiq
70
70
  result.job_results[klass].add_metric "ms", time, ms.to_i if ms
71
71
  result.job_results[klass].add_metric "p", time, p.to_i if p
72
72
  result.job_results[klass].add_metric "f", time, f.to_i if f
73
- result.job_results[klass].add_hist time, Histogram.new(klass).fetch(conn, time)
73
+ result.job_results[klass].add_hist time, Histogram.new(klass).fetch(conn, time).reverse
74
74
  time -= 60
75
75
  end
76
76
  end
@@ -29,8 +29,8 @@ module Sidekiq
29
29
  1100, 1700, 2500, 3800, 5750,
30
30
  8500, 13000, 20000, 30000, 45000,
31
31
  65000, 100000, 150000, 225000, 335000,
32
- Float::INFINITY # the "maybe your job is too long" bucket
33
- ]
32
+ 1e20 # the "maybe your job is too long" bucket
33
+ ].freeze
34
34
  LABELS = [
35
35
  "20ms", "30ms", "45ms", "65ms", "100ms",
36
36
  "150ms", "225ms", "335ms", "500ms", "750ms",
@@ -38,7 +38,7 @@ module Sidekiq
38
38
  "8.5s", "13s", "20s", "30s", "45s",
39
39
  "65s", "100s", "150s", "225s", "335s",
40
40
  "Slow"
41
- ]
41
+ ].freeze
42
42
  FETCH = "GET u16 #0 GET u16 #1 GET u16 #2 GET u16 #3 \
43
43
  GET u16 #4 GET u16 #5 GET u16 #6 GET u16 #7 \
44
44
  GET u16 #8 GET u16 #9 GET u16 #10 GET u16 #11 \
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sidekiq
4
- VERSION = "7.0.7"
4
+ VERSION = "7.0.9"
5
5
  MAJOR = 7
6
6
  end
@@ -68,7 +68,7 @@ module Sidekiq
68
68
 
69
69
  get "/metrics" do
70
70
  q = Sidekiq::Metrics::Query.new
71
- @period = params[:period]
71
+ @period = h((params[:period] || "")[0..1])
72
72
  @periods = METRICS_PERIODS
73
73
  minutes = @periods.fetch(@period, @periods.values.first)
74
74
  @query_result = q.top_jobs(minutes: minutes)
@@ -77,7 +77,7 @@ module Sidekiq
77
77
 
78
78
  get "/metrics/:name" do
79
79
  @name = route_params[:name]
80
- @period = params[:period]
80
+ @period = h((params[:period] || "")[0..1])
81
81
  q = Sidekiq::Metrics::Query.new
82
82
  @periods = METRICS_PERIODS
83
83
  minutes = @periods.fetch(@period, @periods.values.first)
data/sidekiq.gemspec CHANGED
@@ -19,7 +19,8 @@ Gem::Specification.new do |gem|
19
19
  "bug_tracker_uri" => "https://github.com/sidekiq/sidekiq/issues",
20
20
  "documentation_uri" => "https://github.com/sidekiq/sidekiq/wiki",
21
21
  "changelog_uri" => "https://github.com/sidekiq/sidekiq/blob/main/Changes.md",
22
- "source_code_uri" => "https://github.com/sidekiq/sidekiq"
22
+ "source_code_uri" => "https://github.com/sidekiq/sidekiq",
23
+ "rubygems_mfa_required" => "true"
23
24
  }
24
25
 
25
26
  gem.add_dependency "redis-client", ">= 0.11.0"
@@ -0,0 +1,99 @@
1
+ # elements like %{queue} are variables and should not be translated
2
+ gd:
3
+ Actions: Gnìomhan
4
+ AddToQueue: Cuir ris a’ chiutha
5
+ AreYouSure: A bheil thu cinnteach?
6
+ AreYouSureDeleteJob: A bheil thu cinnteach gu bheil thu airson an obair seo a sguabadh às?
7
+ AreYouSureDeleteQueue: A bheil thu cinnteach gu bheil thu airson ciutha %{queue} a sguabadh às? Sguabaidh seo às gach obair sa chiutha seo, nochdaidh e a-rithist nuair a phutas tu barrachd obraichean dha an uairsin.
8
+ Arguments: Argamaidean
9
+ BackToApp: Till dhan aplacaid
10
+ Busy: Trang
11
+ Class: Clas
12
+ Connections: Ceanglaichean
13
+ CreatedAt: Air a chruthachadh
14
+ CurrentMessagesInQueue: Obraichean làithreach am broinn <span class='title'>%{queue}</span>
15
+ Dashboard: Deas-bhòrd
16
+ Dead: Marbh
17
+ DeadJobs: Obraichean marbh
18
+ Delete: Sguab às
19
+ DeleteAll: Sguab às na h-uile
20
+ Deploy: Cuir an gnìomh
21
+ Enqueued: Sa chiutha
22
+ Error: Mearachd
23
+ ErrorBacktrace: Backtrace na mearachd
24
+ ErrorClass: Clas na mearachd
25
+ ErrorMessage: Teachdaireachd na mearachd
26
+ ExecutionTime: Àm a’ ghnìomha
27
+ Extras: Nithean a bharrachd
28
+ Failed: Air fàilligeadh
29
+ Failures: Fàilligidhean
30
+ Failure: Fàilligeadh
31
+ GoBack: ← Air ais
32
+ History: Eachdraidh
33
+ Job: Obair
34
+ Jobs: Obraichean
35
+ Kill: Marbh
36
+ KillAll: Marbh na h-uile
37
+ LastRetry: An oidhirp mu dheireadh
38
+ Latency: Foillidheachd
39
+ LivePoll: Ath-nuadhachadh beò
40
+ MemoryUsage: Cleachdadh a’ chuimhne
41
+ Name: Ainm
42
+ Namespace: Ainm-spàs
43
+ NextRetry: An ath-oidhirp
44
+ NoDeadJobsFound: Cha deach obair mharbh a lorg
45
+ NoRetriesFound: Cha deach ath-oidhirp a lorg
46
+ NoScheduledFound: Cha deach obair air an sgeideal a lorg
47
+ NotYetEnqueued: Chan eil seo sa chiutha fhathast
48
+ OneMonth: Mìos
49
+ OneWeek: Seachdain
50
+ OriginallyFailed: Dh’fhàillig e o thùs
51
+ Pause: Cuir ’na stad
52
+ Paused: ’Na stad
53
+ PeakMemoryUsage: Bàrr cleachdadh a’ chuimhne
54
+ Plugins: Plugain
55
+ PollingInterval: Eadaramh an ath-nuadhachaidh
56
+ Process: Pròiseas
57
+ Processed: Air pròiseasadh
58
+ Processes: Pròiseasan
59
+ Queue: Ciutha
60
+ Queues: Ciuthan
61
+ Quiet: Mùch
62
+ QuietAll: Mùch na h-uile
63
+ Realtime: Fìor-àm
64
+ Retries: Oidhirpean
65
+ RetryAll: Feuch ris na h-uile a-rithist
66
+ RetryCount: Cunntas nan oidhirpean
67
+ RetryNow: Feuch ris a-rithist an-dràsta
68
+ Scheduled: Air an sgeideal
69
+ ScheduledJobs: Obraichean air an sgeideal
70
+ Seconds: Diogan
71
+ ShowAll: Seall na h-uile
72
+ SixMonths: Leth-bhliadhna
73
+ Size: Meud
74
+ Started: Air a thòiseachadh
75
+ Status: Staid
76
+ Stop: Cuir stad air
77
+ StopAll: Cuir stad air na h-uile
78
+ StopPolling: Sguir dhen ath-nuadhachadh
79
+ Success: Chaidh leis
80
+ Summary: Geàrr-chunntas
81
+ Thread: Snàithlean
82
+ Threads: Snàithleanan
83
+ ThreeMonths: 3 mìosan
84
+ Time: Àm
85
+ Unpause: Lean air
86
+ Uptime: Beò fad (làithean)
87
+ Utilization: Cleachdadh
88
+ Version: Tionndadh
89
+ When: Cuin
90
+ Worker: Obraiche
91
+ active: gnìomhach
92
+ idle: ’na thàmh
93
+ Metrics: Meatraigeachd
94
+ NoDataFound: Cha deach dàta a lorg
95
+ TotalExecutionTime: Ùine iomlan nan gnìomhan
96
+ AvgExecutionTime: Ùine cuibheasach nan gnìomhan
97
+ Context: Co-theacsa
98
+ Bucket: Bucaid
99
+ NoJobMetricsFound: Cha deach meatraigeachd o chionn goirid air obair a lorg
data/web/views/busy.erb CHANGED
@@ -33,8 +33,8 @@
33
33
  <form method="POST" class="warning-messages">
34
34
  <%= csrf_tag %>
35
35
  <div class="btn-group pull-right flip">
36
- <button class="btn btn-warn" type="submit" name="quiet" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('QuietAll') %></button>
37
- <button class="btn btn-danger" type="submit" name="stop" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('StopAll') %></button>
36
+ <input class="btn btn-warn" type="submit" name="quiet" value="<%= t('QuietAll') %>" data-confirm="<%= t('AreYouSure') %>"/>
37
+ <input class="btn btn-danger" type="submit" name="stop" value="<%= t('StopAll') %>" data-confirm="<%= t('AreYouSure') %>"/>
38
38
  </div>
39
39
  </form>
40
40
  </div>
@@ -6,11 +6,8 @@
6
6
  <%
7
7
  job_result = @query_result.job_results[@name]
8
8
  hist_totals = job_result.hist.values.first.zip(*job_result.hist.values[1..-1]).map(&:sum)
9
- bucket_labels =Sidekiq::Metrics::Histogram::LABELS
10
- bucket_intervals =Sidekiq::Metrics::Histogram::BUCKET_INTERVALS.reverse
11
-
12
- # Replace INFINITY since it can't be represented as JSON
13
- bucket_intervals[0] = bucket_intervals[1] * 2
9
+ bucket_labels = Sidekiq::Metrics::Histogram::LABELS
10
+ bucket_intervals = Sidekiq::Metrics::Histogram::BUCKET_INTERVALS
14
11
  %>
15
12
 
16
13
  <% if job_result.totals["s"] > 0 %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.7
4
+ version: 7.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-14 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client
@@ -156,6 +156,7 @@ files:
156
156
  - web/locales/es.yml
157
157
  - web/locales/fa.yml
158
158
  - web/locales/fr.yml
159
+ - web/locales/gd.yml
159
160
  - web/locales/he.yml
160
161
  - web/locales/hi.yml
161
162
  - web/locales/it.yml
@@ -205,6 +206,7 @@ metadata:
205
206
  documentation_uri: https://github.com/sidekiq/sidekiq/wiki
206
207
  changelog_uri: https://github.com/sidekiq/sidekiq/blob/main/Changes.md
207
208
  source_code_uri: https://github.com/sidekiq/sidekiq
209
+ rubygems_mfa_required: 'true'
208
210
  post_install_message: |2+
209
211
 
210
212
  Welcome to Sidekiq 7.0!