karafka 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0bb0a1f72768ebf4bf720ebda57ebc26a0178275adabffd494b24e1612e9b38a
4
- data.tar.gz: f586038a0498227e8a287cc173a23e77bb99b6cb8d453c39be55a220e2a0d361
3
+ metadata.gz: b9dc0bdd3ac35d6c39ff0a346a1c4bf4e722ed0c58ae91f4b52369b5855a5f4c
4
+ data.tar.gz: 1a54a505b51bb7152101c94084eaecfded9a030dbaf3823c0148bf2732bfb5ed
5
5
  SHA512:
6
- metadata.gz: e2b862da6372bc91f76bc01c20eb21ccde9d61d67749ccce97eadd2f739484dbd68a149d08d6e275d94d95b6ce9610d86c2d01e85bb1841a80e048ed832810ac
7
- data.tar.gz: 06fb89700e59f810ec984b54f0424cfdeb98c79e17b8629010f011e68edff5fa1e345576a7b28ed07aff440739ed11824016da6083601a92b8f83fcca68e576e
6
+ metadata.gz: 12f08420da02321a089da6e4d20d445bec75cccbbad682a7939deeb7fae7787c93e6adffd6c6f6e4ebe6d1dfc9b72443d08f6f300e4c4badc028621a9c510e14
7
+ data.tar.gz: 66b8f7382bf4beead971fe3ff9e40b439802e145f0a8dc9c0f116631ba460a961983ded0b897414505b4fe0178ff6c8dbb1e7b7c1a2e775207487c8e14783b4e
@@ -1 +1 @@
1
- 2.5.0
1
+ 2.5.1
@@ -1,15 +1,10 @@
1
1
  language: ruby
2
2
  sudo: false
3
3
  rvm:
4
- - 2.3.0
5
- - 2.3.1
6
- - 2.3.2
7
- - 2.3.3
8
- - 2.3.4
9
- - 2.4.0
10
- - 2.4.1
11
- - 2.4.2
12
- - 2.5.0
4
+ - 2.3.7
5
+ - 2.4.3
6
+ - 2.5.1
7
+ - ruby-head
13
8
  - jruby-head
14
9
  script: bundle exec rspec spec/
15
10
  env:
@@ -1,5 +1,9 @@
1
1
  # Karafka framework changelog
2
2
 
3
+ ## 1.2.1
4
+ - #304 - Unification of error instrumentation event details
5
+ - #306 - Using file logger from within a trap context upon shutdown is impossible
6
+
3
7
  ## 1.2.0
4
8
  - Spec improvements
5
9
  - #260 - Specs missing randomization
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- karafka (1.2.0)
4
+ karafka (1.2.1)
5
5
  activesupport (>= 4.0)
6
6
  dry-configurable (~> 0.7)
7
7
  dry-inflector (~> 0.1.1)
@@ -18,9 +18,9 @@ PATH
18
18
  GEM
19
19
  remote: https://rubygems.org/
20
20
  specs:
21
- activesupport (5.1.5)
21
+ activesupport (5.1.6)
22
22
  concurrent-ruby (~> 1.0, >= 1.0.2)
23
- i18n (~> 0.7)
23
+ i18n (>= 0.7, < 2)
24
24
  minitest (~> 5.1)
25
25
  tzinfo (~> 1.1)
26
26
  concurrent-ruby (1.0.5)
@@ -68,7 +68,7 @@ GEM
68
68
  dry-types (~> 0.12.0)
69
69
  envlogic (1.1.0)
70
70
  dry-inflector (~> 0.1)
71
- i18n (0.9.5)
71
+ i18n (1.0.0)
72
72
  concurrent-ruby (~> 1.0)
73
73
  inflecto (0.0.2)
74
74
  json (2.1.0)
@@ -103,12 +103,12 @@ GEM
103
103
  timecop (0.9.1)
104
104
  tzinfo (1.2.5)
105
105
  thread_safe (~> 0.1)
106
- waterdrop (1.2.0)
106
+ waterdrop (1.2.2)
107
107
  delivery_boy (~> 0.2)
108
108
  dry-configurable (~> 0.7)
109
109
  dry-monitor (~> 0.1)
110
110
  dry-validation (~> 0.11)
111
- null-logger
111
+ null-logger (~> 0.1)
112
112
 
113
113
  PLATFORMS
114
114
  ruby
data/README.md CHANGED
@@ -8,15 +8,13 @@ Karafka allows you to capture everything that happens in your systems in large s
8
8
 
9
9
  Karafka not only handles incoming messages but also provides tools for building complex data-flow applications that receive and send messages.
10
10
 
11
- **Warning**: Wiki and all the docs refer to the 1.2.0.beta4. Sorry for the inconvenience. We will release the stable 1.2.0 version soon.
12
-
13
11
  ## How does it work
14
12
 
15
- Karafka provides a higher-level abstraction that allows you to focus on your business logic development, instead of focusing on implementing lower level abstraction layers. It provides developers with a set of tools that are dedicated for building multi-topic applications similarly to how Rails applications are being built.
13
+ Karafka provides a higher-level abstraction that allows you to focus on your business logic development, instead of focusing on implementing lower level abstraction layers. It provides developers with a set of tools that are dedicated for building multi-topic applications similar to how Rails applications are being built.
16
14
 
17
15
  ### Some things you might wonder about:
18
16
 
19
- - You can integrate Karafka with **any** Ruby based application.
17
+ - You can integrate Karafka with **any** Ruby-based application.
20
18
  - Karafka does **not** require Sidekiq or any other third party software (apart from Kafka itself).
21
19
  - Karafka works with Ruby on Rails but it is a **standalone** framework that can work without it.
22
20
  - Karafka has a **minimal** set of dependencies, so adding it won't be a huge burden for your already existing applications.
@@ -30,7 +28,7 @@ Karafka based applications can be easily deployed to any type of infrastructure,
30
28
 
31
29
  ## Support
32
30
 
33
- Karafka has a [Wiki pages](https://github.com/karafka/karafka/wiki) for almost everything and a pretty decent [FAQ](https://github.com/karafka/karafka/wiki/FAQ). It covers the whole installation, setup and deployment along with other useful details on how to run Karafka.
31
+ Karafka has a [Wiki pages](https://github.com/karafka/karafka/wiki) for almost everything and a pretty decent [FAQ](https://github.com/karafka/karafka/wiki/FAQ). It covers the whole installation, setup, and deployment along with other useful details on how to run Karafka.
34
32
 
35
33
  If you have any questions about using Karafka, feel free to join our [Gitter](https://gitter.im/karafka/karafka) chat channel.
36
34
 
@@ -69,7 +67,7 @@ Karafka framework and Karafka team are __not__ related to Kafka streaming servic
69
67
 
70
68
  First, thank you for considering contributing to Karafka! It's people like you that make the open source community such a great community!
71
69
 
72
- Each pull request must pass all the rspec specs and meet our quality requirements.
70
+ Each pull request must pass all the RSpec specs and meet our quality requirements.
73
71
 
74
72
  To check if everything is as it should be, we use [Coditsu](https://coditsu.io) that combines multiple linters and code analyzers for both code and documentation. Once you're done with your changes, submit a pull request.
75
73
 
@@ -46,5 +46,8 @@ module Karafka
46
46
 
47
47
  # Raised when want to hook up to an event that is not registered and supported
48
48
  UnregisteredMonitorEvent = Class.new(BaseError)
49
+
50
+ # Raised when we've waited enough for shutting down an unresponding process
51
+ ForcefulShutdown = Class.new(BaseError)
49
52
  end
50
53
  end
@@ -67,7 +67,12 @@ module Karafka
67
67
  # Stops Karafka with a supervision (as long as there is a shutdown timeout)
68
68
  # If consumers won't stop in a given timeframe, it will force them to exit
69
69
  def stop_supervised
70
- Karafka.monitor.instrument('server.stop', {})
70
+ # Because this is called in the trap context, there is a chance that instrumentation
71
+ # listeners contain things that aren't allowed from within a trap context.
72
+ # To bypass that (instead of telling users not to do things they need to)
73
+ # we spin up a thread to instrument server.stop and server.stop.error and wait until
74
+ # they're finished
75
+ Thread.new { Karafka.monitor.instrument('server.stop', {}) }.join
71
76
 
72
77
  Karafka::App.stop!
73
78
  # If there is no shutdown timeout, we don't exit and wait until all the consumers
@@ -82,7 +87,9 @@ module Karafka
82
87
  sleep SUPERVISION_SLEEP
83
88
  end
84
89
 
85
- Karafka.monitor.instrument('server.stop.error', {})
90
+ raise Errors::ForcefulShutdown
91
+ rescue Errors::ForcefulShutdown => error
92
+ Thread.new { Karafka.monitor.instrument('server.stop.error', error: error) }.join
86
93
  # We're done waiting, lets kill them!
87
94
  consumer_threads.each(&:terminate)
88
95
 
@@ -3,5 +3,5 @@
3
3
  # Main module namespace
4
4
  module Karafka
5
5
  # Current Karafka version
6
- VERSION = '1.2.0'
6
+ VERSION = '1.2.1'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: karafka
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Mensfeld
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-03-23 00:00:00.000000000 Z
13
+ date: 2018-04-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport