sidekiq 8.0.4 → 8.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70244790b6f984dfb4da9922e5971f3072479bce2f484ca3ab3982108906e6d0
4
- data.tar.gz: 77b5d8e952603bebfe6e703b0f92df3cf4b78be6caf7e46fb46e5376c02c45c7
3
+ metadata.gz: c6b95635fb1084ed28d8b6dd5f7d273873e24ffab09aeb5057de74d4bebeae07
4
+ data.tar.gz: bba44aed090637fb4991ae3935112b84b33df8b7281c9d0f273f0146ea11415a
5
5
  SHA512:
6
- metadata.gz: 5c347f189e4ed255a1de061afa5c08bf73b3d77f83d853669e09c9b7e06f430958d1db4e3aa9a6ae3a9abad5802c3872f050ae43b2db014105633c45be4cfaa0
7
- data.tar.gz: 0fca2e77cfd25ab7ccc6be20edeb8a0c09056c8bb0bde03de5ff415a5ca15f55668e1c662a2f91c1dfe8ed074ae5d106d95b1d3a04e32fa1d86606aa35c06645
6
+ metadata.gz: 657b2d2f1e1c850779d29990c88227d7776f8e5a4b3333fd7b2e5f249fb360a1f69de40a773dc5b608ae37ff249713af5aa5b38cd04da2ceffe64f79578861a3
7
+ data.tar.gz: a8d8d6f32921b00341dc8910155b8a85d6c036bc31a69437dde3f5107d02bed5ffb2b0754f014eaf69f577570e91455a7ead03367cf43fe0b24ef2650e9f57be
data/Changes.md CHANGED
@@ -2,6 +2,15 @@
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
+ 8.0.5
6
+ ----------
7
+
8
+ - Add `stopping?` method to AJ adapter for compatibility with the new AJ::Continuations feature [#6732]
9
+ - Further improvements to Rails boot compatibility [#6710]
10
+ - Add ability to disable CSRF middleware. SameSite cookies prevent
11
+ CSRF in a cleaner manner and are default in most browsers now.
12
+ CSRF code will be removed in Sidekiq 9.0. [#6739]
13
+
5
14
  8.0.4
6
15
  ----------
7
16
 
@@ -17,7 +17,7 @@ begin
17
17
  end
18
18
  end
19
19
 
20
- unless ActiveJob::Base.respond_to?(:sidekiq_options)
20
+ ActiveSupport.on_load(:active_job) do
21
21
  # By including the Options module, we allow AJs to directly control sidekiq features
22
22
  # via the *sidekiq_options* class method and, for instance, not use AJ's retry system.
23
23
  # AJ retries don't show up in the Sidekiq UI Retries tab, don't save any error data, can't be
@@ -29,7 +29,7 @@ begin
29
29
  # def perform
30
30
  # end
31
31
  # end
32
- ActiveJob::Base.include Sidekiq::Job::Options
32
+ include Sidekiq::Job::Options unless respond_to?(:sidekiq_options)
33
33
  end
34
34
 
35
35
  # Patch the ActiveJob module
@@ -43,7 +43,14 @@ begin
43
43
  # To use Sidekiq set the queue_adapter config to +:sidekiq+.
44
44
  #
45
45
  # Rails.application.config.active_job.queue_adapter = :sidekiq
46
- class SidekiqAdapter
46
+ class SidekiqAdapter < AbstractAdapter
47
+ @@stopping = false
48
+
49
+ callback = -> { @@stopping = true }
50
+
51
+ Sidekiq.configure_client { |config| config.on(:quiet, &callback) }
52
+ Sidekiq.configure_server { |config| config.on(:quiet, &callback) }
53
+
47
54
  # Defines whether enqueuing should happen implicitly to after commit when called
48
55
  # from inside a transaction.
49
56
  # @api private
@@ -99,10 +106,12 @@ begin
99
106
  enqueued_count
100
107
  end
101
108
 
109
+ # @api private
110
+ def stopping? = !!@@stopping
111
+
102
112
  # Defines a class alias for backwards compatibility with enqueued Active Job jobs.
103
113
  # @api private
104
- class JobWrapper < Sidekiq::ActiveJob::Wrapper
105
- end
114
+ JobWrapper = Sidekiq::ActiveJob::Wrapper
106
115
  end
107
116
  end
108
117
  end
data/lib/sidekiq/rails.rb CHANGED
@@ -1,12 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "sidekiq/job"
4
- require_relative "../active_job/queue_adapters/sidekiq_adapter"
5
-
6
3
  module Sidekiq
7
4
  begin
8
5
  gem "railties", ">= 7.0"
9
6
  require "rails"
7
+ require "sidekiq/job"
8
+ require_relative "../active_job/queue_adapters/sidekiq_adapter"
10
9
 
11
10
  class Rails < ::Rails::Engine
12
11
  class Reloader
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sidekiq
4
- VERSION = "8.0.4"
4
+ VERSION = "8.0.5"
5
5
  MAJOR = 8
6
6
 
7
7
  def self.gem_version
@@ -24,7 +24,10 @@ module Sidekiq
24
24
  # and very difficult for us to vendor or provide ourselves. If you are worried
25
25
  # about data security and wish to self-host, you can change these URLs.
26
26
  profile_view_url: "https://profiler.firefox.com/public/%s",
27
- profile_store_url: "https://api.profiler.firefox.com/compressed-store"
27
+ profile_store_url: "https://api.profiler.firefox.com/compressed-store",
28
+ # Will be false in Sidekiq 9.0.
29
+ # CSRF is unnecessary if you are using SameSite=(Strict|Lax) cookies.
30
+ csrf: true
28
31
  }
29
32
 
30
33
  ##
data/lib/sidekiq/web.rb CHANGED
@@ -109,7 +109,7 @@ module Sidekiq
109
109
  cascade: true,
110
110
  header_rules: rules
111
111
  m.each { |middleware, block| use(*middleware, &block) }
112
- use CsrfProtection unless $TESTING # rubocop:disable Style/GlobalVars
112
+ use CsrfProtection if cfg[:csrf]
113
113
  run Sidekiq::Web::Application.new(self.class)
114
114
  end
115
115
  end
@@ -567,6 +567,7 @@ body > footer .nav {
567
567
  --color-border: oklch(25% 0.01 256);
568
568
  --color-input-border: oklch(31% 0.01 256);
569
569
  --color-selected: oklch(27% 0.01 256);
570
+ --color-selected-text: oklch(55% 0.11 45);
570
571
  --color-table-bg-alt: oklch(24% 0.01 256);
571
572
  --color-shadow: oklch(9% 0.01 256 / 10%);
572
573
  --color-text: oklch(75% 0.01 256);
@@ -615,6 +616,10 @@ body > footer .nav {
615
616
  .label-info { background: var(--color-info); }
616
617
  .label-danger { background: var(--color-danger); }
617
618
  .label-warning { background: var(--color-warning); }
619
+
620
+ td.box::selection {
621
+ background-color: var(--color-selected-text);
622
+ }
618
623
  }
619
624
 
620
625
  @media (max-width: 800px) { :root { --font-size: 14px; } }
@@ -758,4 +763,4 @@ body > footer .nav {
758
763
  text-align: center;
759
764
  padding: 20px;
760
765
  background: var(--color-success);
761
- }
766
+ }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.0.4
4
+ version: 8.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Perham
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-05-28 00:00:00.000000000 Z
10
+ date: 2025-06-30 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: redis-client