sidekiq-canary 0.0.1 → 0.0.2
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 +4 -4
- data/.gitignore +1 -1
- data/.travis.yml +2 -0
- data/README.md +47 -0
- data/demo.gif +0 -0
- data/lib/sidekiq/canary/version.rb +1 -1
- data/sidekiq-canary.gemspec +2 -1
- metadata +21 -6
- data/Gemfile.lock +0 -64
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bbe12a582fdcf9139fe6e92078034cc5ba57512
|
4
|
+
data.tar.gz: b6586e2fe81e62b9e8102e1bc6c4f655d49bcd82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 36d9c309b57fa512848c0f550428566bcf5b66a5f900eab4aa9724ea2dd75345a21afcaa18bf7aa2340657926cd6db79b6a90421e434b7c2a5fca6fcbfd20b86
|
7
|
+
data.tar.gz: ce5bb550463bae5c871d89d0b3c754d47b5abbcb9195224ff33fb4057fdb538cadc829c76094f292e39c64683a2320ad3de37b9400978a94386df03e40db4417
|
data/.gitignore
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
.bundle
|
2
|
-
|
2
|
+
Gemfile.lock
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -2,3 +2,50 @@
|
|
2
2
|
[](https://travis-ci.org/dmathieu/sidekiq-canary)
|
3
3
|
|
4
4
|
Deploy sidekiq sensitive changes in canaries
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add the gem to your Gemfile
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'sidekiq-canary'
|
12
|
+
```
|
13
|
+
|
14
|
+
Extend your workers with it
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
class MyAwesomeWorker
|
18
|
+
include Sidekiq::Worker
|
19
|
+
extend Sidekiq::Canary
|
20
|
+
|
21
|
+
def perform
|
22
|
+
# Do something awesome
|
23
|
+
end
|
24
|
+
end
|
25
|
+
```
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
Sidekiq Canary will allow you to randomly push workers to a queue or another.
|
30
|
+
That means if you deploy a new version of your worker in another app, running
|
31
|
+
the canary queue, only a random subset of them will run the new version.
|
32
|
+
|
33
|
+
All other ones will keep running as before. If a failure happens, the same
|
34
|
+
randomizer will be applied again.
|
35
|
+
|
36
|
+
In order to do that, you need two apps. Your main one will run the default queue.
|
37
|
+
The second one will run a `default_canary` queue.
|
38
|
+
|
39
|
+
when deploying a sensitive change, you need to deploy the canary app only, and
|
40
|
+
set the `default_canary_percent` environment variable on the app which triggers
|
41
|
+
the job.
|
42
|
+
|
43
|
+
Once this is done, all jobs will have the specified percentage number of
|
44
|
+
chances of being picked to run in the canary instead of the main app.
|
45
|
+
|
46
|
+
When your experiment is over, you can bring back the canary percentage to zero
|
47
|
+
and deploy your changes to your main app.
|
48
|
+
|
49
|
+
## Demo
|
50
|
+
|
51
|
+

|
data/demo.gif
ADDED
Binary file
|
data/sidekiq-canary.gemspec
CHANGED
@@ -17,7 +17,8 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ['lib']
|
19
19
|
|
20
|
-
gem.add_dependency 'sidekiq'
|
20
|
+
gem.add_dependency 'sidekiq'
|
21
21
|
|
22
|
+
gem.add_development_dependency 'rake'
|
22
23
|
gem.add_development_dependency 'rspec'
|
23
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-canary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Damien Mathieu
|
@@ -14,16 +14,30 @@ dependencies:
|
|
14
14
|
name: sidekiq
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
25
32
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -46,11 +60,12 @@ extensions: []
|
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
48
62
|
- ".gitignore"
|
63
|
+
- ".travis.yml"
|
49
64
|
- Gemfile
|
50
|
-
- Gemfile.lock
|
51
65
|
- LICENSE
|
52
66
|
- README.md
|
53
67
|
- Rakefile
|
68
|
+
- demo.gif
|
54
69
|
- lib/sidekiq-canary.rb
|
55
70
|
- lib/sidekiq/canary.rb
|
56
71
|
- lib/sidekiq/canary/version.rb
|
data/Gemfile.lock
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
sidekiq-canary (0.0.1)
|
5
|
-
sidekiq (~> 3.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
celluloid (0.17.3)
|
11
|
-
celluloid-essentials
|
12
|
-
celluloid-extras
|
13
|
-
celluloid-fsm
|
14
|
-
celluloid-pool
|
15
|
-
celluloid-supervision
|
16
|
-
timers (>= 4.1.1)
|
17
|
-
celluloid-essentials (0.20.5)
|
18
|
-
timers (>= 4.1.1)
|
19
|
-
celluloid-extras (0.20.5)
|
20
|
-
timers (>= 4.1.1)
|
21
|
-
celluloid-fsm (0.20.5)
|
22
|
-
timers (>= 4.1.1)
|
23
|
-
celluloid-pool (0.20.5)
|
24
|
-
timers (>= 4.1.1)
|
25
|
-
celluloid-supervision (0.20.5)
|
26
|
-
timers (>= 4.1.1)
|
27
|
-
connection_pool (2.2.0)
|
28
|
-
diff-lcs (1.2.5)
|
29
|
-
hitimes (1.2.4)
|
30
|
-
json (1.8.3)
|
31
|
-
redis (3.3.0)
|
32
|
-
redis-namespace (1.5.2)
|
33
|
-
redis (~> 3.0, >= 3.0.4)
|
34
|
-
rspec (3.4.0)
|
35
|
-
rspec-core (~> 3.4.0)
|
36
|
-
rspec-expectations (~> 3.4.0)
|
37
|
-
rspec-mocks (~> 3.4.0)
|
38
|
-
rspec-core (3.4.4)
|
39
|
-
rspec-support (~> 3.4.0)
|
40
|
-
rspec-expectations (3.4.0)
|
41
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
-
rspec-support (~> 3.4.0)
|
43
|
-
rspec-mocks (3.4.1)
|
44
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.4.0)
|
46
|
-
rspec-support (3.4.1)
|
47
|
-
sidekiq (3.5.4)
|
48
|
-
celluloid (~> 0.17.2)
|
49
|
-
connection_pool (~> 2.2, >= 2.2.0)
|
50
|
-
json (~> 1.0)
|
51
|
-
redis (~> 3.2, >= 3.2.1)
|
52
|
-
redis-namespace (~> 1.5, >= 1.5.2)
|
53
|
-
timers (4.1.1)
|
54
|
-
hitimes
|
55
|
-
|
56
|
-
PLATFORMS
|
57
|
-
ruby
|
58
|
-
|
59
|
-
DEPENDENCIES
|
60
|
-
rspec
|
61
|
-
sidekiq-canary!
|
62
|
-
|
63
|
-
BUNDLED WITH
|
64
|
-
1.12.1
|