bricolage-streamingload 0.16.0 → 0.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +31 -24
- data/RELEASE.md +16 -0
- data/bricolage-streamingload.gemspec +2 -3
- data/lib/bricolage/streamingload/dispatcher.rb +9 -1
- data/lib/bricolage/streamingload/job.rb +13 -2
- data/lib/bricolage/streamingload/taskhandler.rb +3 -0
- data/lib/bricolage/streamingload/version.rb +1 -1
- metadata +19 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 156e42da1bd9a51564c4648b497997ae96c5a9211b0716506f7781cb2ca6e572
|
4
|
+
data.tar.gz: facff01968de8a74e9164c314fc2c540eb36ea20092f9db56748b1493f1bc1ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 906915bf0cf9ff63bbb9a048d21b42e51059665643b8a34cf5c51751fa2b708b083e5ab061c7c3cb7d56b5457f04b9479e66ae3320e9df175070ffbdb04d7399
|
7
|
+
data.tar.gz: 7583875fa978f25c420cb8ff9732ff3d73553af3157d72115581fe4ef09ef11b40c90b64041158ff147eee8adad29e2ebc56d83b9755323a3b414065cadab466
|
data/Gemfile.lock
CHANGED
@@ -1,44 +1,51 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bricolage-streamingload (0.
|
4
|
+
bricolage-streamingload (0.16.1)
|
5
5
|
aws-sdk-s3 (~> 1.8)
|
6
6
|
aws-sdk-sqs (~> 1.3)
|
7
|
-
bricolage (
|
7
|
+
bricolage (~> 5.30)
|
8
8
|
pg (~> 0.18.0)
|
9
|
+
sentry-raven (~> 3.0)
|
9
10
|
|
10
11
|
GEM
|
11
12
|
remote: https://rubygems.org/
|
12
13
|
specs:
|
13
|
-
aws-eventstream (1.0
|
14
|
-
aws-partitions (1.
|
15
|
-
aws-sdk-core (3.
|
16
|
-
aws-eventstream (~> 1.0)
|
17
|
-
aws-partitions (~> 1.0)
|
18
|
-
aws-sigv4 (~> 1.
|
14
|
+
aws-eventstream (1.1.0)
|
15
|
+
aws-partitions (1.351.0)
|
16
|
+
aws-sdk-core (3.104.3)
|
17
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
18
|
+
aws-partitions (~> 1, >= 1.239.0)
|
19
|
+
aws-sigv4 (~> 1.1)
|
19
20
|
jmespath (~> 1.0)
|
20
|
-
aws-sdk-kms (1.
|
21
|
-
aws-sdk-core (~> 3)
|
22
|
-
aws-sigv4 (~> 1.
|
23
|
-
aws-sdk-s3 (1.
|
24
|
-
aws-sdk-core (~> 3, >= 3.
|
21
|
+
aws-sdk-kms (1.36.0)
|
22
|
+
aws-sdk-core (~> 3, >= 3.99.0)
|
23
|
+
aws-sigv4 (~> 1.1)
|
24
|
+
aws-sdk-s3 (1.75.0)
|
25
|
+
aws-sdk-core (~> 3, >= 3.104.1)
|
25
26
|
aws-sdk-kms (~> 1)
|
26
|
-
aws-sigv4 (~> 1.
|
27
|
-
aws-sdk-sns (1.
|
28
|
-
aws-sdk-core (~> 3)
|
29
|
-
aws-sigv4 (~> 1.
|
30
|
-
aws-sdk-sqs (1.
|
31
|
-
aws-sdk-core (~> 3)
|
32
|
-
aws-sigv4 (~> 1.
|
33
|
-
aws-sigv4 (1.
|
34
|
-
|
27
|
+
aws-sigv4 (~> 1.1)
|
28
|
+
aws-sdk-sns (1.28.0)
|
29
|
+
aws-sdk-core (~> 3, >= 3.99.0)
|
30
|
+
aws-sigv4 (~> 1.1)
|
31
|
+
aws-sdk-sqs (1.30.0)
|
32
|
+
aws-sdk-core (~> 3, >= 3.99.0)
|
33
|
+
aws-sigv4 (~> 1.1)
|
34
|
+
aws-sigv4 (1.2.1)
|
35
|
+
aws-eventstream (~> 1, >= 1.0.2)
|
36
|
+
bricolage (5.30.0)
|
35
37
|
aws-sdk-s3 (~> 1)
|
36
38
|
aws-sdk-sns (~> 1)
|
37
39
|
pg (~> 0.18.0)
|
40
|
+
faraday (1.0.1)
|
41
|
+
multipart-post (>= 1.2, < 3)
|
38
42
|
jmespath (1.4.0)
|
43
|
+
multipart-post (2.1.1)
|
39
44
|
pg (0.18.4)
|
40
45
|
power_assert (1.1.3)
|
41
|
-
rake (12.3.
|
46
|
+
rake (12.3.3)
|
47
|
+
sentry-raven (3.0.0)
|
48
|
+
faraday (>= 1.0)
|
42
49
|
test-unit (3.2.8)
|
43
50
|
power_assert
|
44
51
|
|
@@ -51,4 +58,4 @@ DEPENDENCIES
|
|
51
58
|
test-unit
|
52
59
|
|
53
60
|
BUNDLED WITH
|
54
|
-
1.
|
61
|
+
1.17.2
|
data/RELEASE.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1
1
|
# Bricolage Streaming Load Release Note
|
2
2
|
|
3
|
+
## version 0.17.2
|
4
|
+
|
5
|
+
- [fix] Relax dependency gem versions
|
6
|
+
|
7
|
+
## version 0.17.1
|
8
|
+
|
9
|
+
- [new][tmp] Sends a message to Sentry on start-up.
|
10
|
+
|
11
|
+
## version 0.17.0
|
12
|
+
|
13
|
+
- [new] Introduces Sentry error reporting. Define SENTRY_DSN environment variable to enable it.
|
14
|
+
|
15
|
+
## version 0.16.1
|
16
|
+
|
17
|
+
- [fix] Stop retrying after 2 times retried (total 3 trial).
|
18
|
+
|
3
19
|
## version 0.16.0
|
4
20
|
|
5
21
|
- [new] Retry for also error tasks, not only failure tasks.
|
@@ -17,10 +17,9 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.require_path = 'lib'
|
18
18
|
|
19
19
|
s.required_ruby_version = '>= 2.3.0'
|
20
|
-
s.add_dependency 'bricolage', '>= 5.
|
21
|
-
s.add_dependency 'pg', '~> 0.18.0'
|
22
|
-
s.add_dependency 'aws-sdk-s3', '~> 1.8'
|
20
|
+
s.add_dependency 'bricolage', '>= 5.30.0', '< 6.0.0'
|
23
21
|
s.add_dependency 'aws-sdk-sqs', '~> 1.3'
|
22
|
+
s.add_dependency 'sentry-raven', '~> 3.0'
|
24
23
|
s.add_development_dependency 'rake'
|
25
24
|
s.add_development_dependency 'test-unit'
|
26
25
|
end
|
@@ -10,8 +10,9 @@ require 'bricolage/streamingload/chunkbuffer'
|
|
10
10
|
require 'bricolage/streamingload/loadtasklogger'
|
11
11
|
require 'bricolage/streamingload/alertinglogger'
|
12
12
|
require 'yaml'
|
13
|
-
require 'optparse'
|
14
13
|
require 'fileutils'
|
14
|
+
require 'raven'
|
15
|
+
require 'optparse'
|
15
16
|
|
16
17
|
module Bricolage
|
17
18
|
|
@@ -20,6 +21,13 @@ module Bricolage
|
|
20
21
|
class Dispatcher < SQSDataSource::MessageHandler
|
21
22
|
|
22
23
|
def Dispatcher.main
|
24
|
+
Raven.capture_message("dispatcher start")
|
25
|
+
Raven.capture {
|
26
|
+
_main
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
def Dispatcher._main
|
23
31
|
opts = DispatcherOptions.new(ARGV)
|
24
32
|
opts.parse
|
25
33
|
unless opts.rest_arguments.size == 1
|
@@ -3,6 +3,7 @@ require 'bricolage/streamingload/manifest'
|
|
3
3
|
require 'bricolage/sqlutils'
|
4
4
|
require 'socket'
|
5
5
|
require 'json'
|
6
|
+
require 'raven'
|
6
7
|
|
7
8
|
module Bricolage
|
8
9
|
|
@@ -44,7 +45,8 @@ module Bricolage
|
|
44
45
|
def execute(fail_fast: false)
|
45
46
|
execute_task
|
46
47
|
return true
|
47
|
-
rescue JobCancelled
|
48
|
+
rescue JobCancelled => ex
|
49
|
+
Raven.capture_exception(ex)
|
48
50
|
return true
|
49
51
|
rescue JobDuplicated
|
50
52
|
return true
|
@@ -52,20 +54,25 @@ module Bricolage
|
|
52
54
|
return false
|
53
55
|
rescue ControlConnectionFailed => ex
|
54
56
|
@logger.error ex.message
|
57
|
+
Raven.capture_exception(ex)
|
55
58
|
wait_for_connection('ctl', @ctl_ds) unless fail_fast
|
56
59
|
return false
|
57
60
|
rescue DataConnectionFailed => ex
|
58
61
|
@logger.error ex.message
|
62
|
+
Raven.capture_exception(ex)
|
59
63
|
wait_for_connection('data', @data_ds) unless fail_fast
|
60
64
|
return false
|
61
65
|
rescue JobFailure => ex
|
62
66
|
@logger.error ex.message
|
67
|
+
Raven.capture_exception(ex)
|
63
68
|
return false
|
64
69
|
rescue JobError => ex
|
65
70
|
@logger.error ex.message
|
71
|
+
Raven.capture_exception(ex)
|
66
72
|
return false
|
67
73
|
rescue Exception => ex
|
68
74
|
@logger.exception ex
|
75
|
+
Raven.capture_exception(ex)
|
69
76
|
return true
|
70
77
|
end
|
71
78
|
|
@@ -126,7 +133,11 @@ module Bricolage
|
|
126
133
|
raise
|
127
134
|
rescue JobError => ex
|
128
135
|
ctl.open {
|
129
|
-
|
136
|
+
fail_count = @task.failure_count
|
137
|
+
final_retry = (fail_count >= MAX_RETRY)
|
138
|
+
retry_msg = (fail_count > 0) ? "(retry\##{fail_count}#{final_retry ? ' FINAL' : ''}) " : ''
|
139
|
+
ctl.abort_job job_id, 'error', retry_msg + ex.message.lines.first.strip
|
140
|
+
raise JobCancelled, "retry count exceeds limit: task_id=#{@task_id}" if final_retry
|
130
141
|
}
|
131
142
|
raise
|
132
143
|
rescue Exception => ex
|
@@ -7,6 +7,7 @@ require 'bricolage/logger'
|
|
7
7
|
require 'bricolage/exception'
|
8
8
|
require 'bricolage/version'
|
9
9
|
require 'yaml'
|
10
|
+
require 'raven'
|
10
11
|
require 'optparse'
|
11
12
|
|
12
13
|
module Bricolage
|
@@ -16,6 +17,8 @@ module Bricolage
|
|
16
17
|
class TaskHandler < SQSDataSource::MessageHandler
|
17
18
|
|
18
19
|
def TaskHandler.main
|
20
|
+
Raven.capture_message("loader start")
|
21
|
+
|
19
22
|
opts = TaskHandlerOptions.new(ARGV)
|
20
23
|
opts.parse
|
21
24
|
unless opts.rest_arguments.size <= 1
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bricolage-streamingload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Minero Aoki
|
8
8
|
- Shimpei Kodama
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-08-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bricolage
|
@@ -17,56 +17,48 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: 5.
|
20
|
+
version: 5.30.0
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 6.0.0
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
24
27
|
requirements:
|
25
28
|
- - ">="
|
26
29
|
- !ruby/object:Gem::Version
|
27
|
-
version: 5.
|
28
|
-
-
|
29
|
-
name: pg
|
30
|
-
requirement: !ruby/object:Gem::Requirement
|
31
|
-
requirements:
|
32
|
-
- - "~>"
|
30
|
+
version: 5.30.0
|
31
|
+
- - "<"
|
33
32
|
- !ruby/object:Gem::Version
|
34
|
-
version: 0.
|
35
|
-
type: :runtime
|
36
|
-
prerelease: false
|
37
|
-
version_requirements: !ruby/object:Gem::Requirement
|
38
|
-
requirements:
|
39
|
-
- - "~>"
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
version: 0.18.0
|
33
|
+
version: 6.0.0
|
42
34
|
- !ruby/object:Gem::Dependency
|
43
|
-
name: aws-sdk-
|
35
|
+
name: aws-sdk-sqs
|
44
36
|
requirement: !ruby/object:Gem::Requirement
|
45
37
|
requirements:
|
46
38
|
- - "~>"
|
47
39
|
- !ruby/object:Gem::Version
|
48
|
-
version: '1.
|
40
|
+
version: '1.3'
|
49
41
|
type: :runtime
|
50
42
|
prerelease: false
|
51
43
|
version_requirements: !ruby/object:Gem::Requirement
|
52
44
|
requirements:
|
53
45
|
- - "~>"
|
54
46
|
- !ruby/object:Gem::Version
|
55
|
-
version: '1.
|
47
|
+
version: '1.3'
|
56
48
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
49
|
+
name: sentry-raven
|
58
50
|
requirement: !ruby/object:Gem::Requirement
|
59
51
|
requirements:
|
60
52
|
- - "~>"
|
61
53
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
54
|
+
version: '3.0'
|
63
55
|
type: :runtime
|
64
56
|
prerelease: false
|
65
57
|
version_requirements: !ruby/object:Gem::Requirement
|
66
58
|
requirements:
|
67
59
|
- - "~>"
|
68
60
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
61
|
+
version: '3.0'
|
70
62
|
- !ruby/object:Gem::Dependency
|
71
63
|
name: rake
|
72
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,7 +152,7 @@ homepage: https://github.com/aamine/bricolage-streamingload
|
|
160
152
|
licenses:
|
161
153
|
- MIT
|
162
154
|
metadata: {}
|
163
|
-
post_install_message:
|
155
|
+
post_install_message:
|
164
156
|
rdoc_options: []
|
165
157
|
require_paths:
|
166
158
|
- lib
|
@@ -175,8 +167,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
175
167
|
- !ruby/object:Gem::Version
|
176
168
|
version: '0'
|
177
169
|
requirements: []
|
178
|
-
rubygems_version: 3.1.
|
179
|
-
signing_key:
|
170
|
+
rubygems_version: 3.1.4
|
171
|
+
signing_key:
|
180
172
|
specification_version: 4
|
181
173
|
summary: Bricolage Streaming Load Daemon
|
182
174
|
test_files: []
|