MovableInkAWS 0.1.9 → 0.1.10
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/Gemfile.lock +9 -9
- data/lib/movable_ink/aws/errors.rb +1 -0
- data/lib/movable_ink/aws.rb +7 -1
- data/lib/movable_ink/version.rb +1 -1
- data/spec/aws_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32cc5f4b290b7afc559ccc8c34f3abf54c5c2216aaca0b2d4d5f1d066dddee48
|
4
|
+
data.tar.gz: b14670bd7662e6e013c3889af9cf2da3ff4e64ebb01470f9a1d022aced3e3396
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3292926afdd6716234a244c4b3a8e1fb99ddbf2b421383bee0a28ef54244587f8b919717e1b2fb8f23858e0f91970f5583b9f7faa6e680b323610a75c57b1b49
|
7
|
+
data.tar.gz: 85f0a66e12260cb970dc80902979188926e123d803ec1267c816ac543d7e951b6209a3fcca179ff4d4aed651c48fca9d5f2f8e704346b9ba3728fe755327698d
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
MovableInkAWS (0.1.
|
4
|
+
MovableInkAWS (0.1.10)
|
5
5
|
aws-sdk (~> 2.11, >= 2.11.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
aws-sdk (2.11.
|
11
|
-
aws-sdk-resources (= 2.11.
|
12
|
-
aws-sdk-core (2.11.
|
10
|
+
aws-sdk (2.11.88)
|
11
|
+
aws-sdk-resources (= 2.11.88)
|
12
|
+
aws-sdk-core (2.11.88)
|
13
13
|
aws-sigv4 (~> 1.0)
|
14
14
|
jmespath (~> 1.0)
|
15
|
-
aws-sdk-resources (2.11.
|
16
|
-
aws-sdk-core (= 2.11.
|
17
|
-
aws-sigv4 (1.0.
|
15
|
+
aws-sdk-resources (2.11.88)
|
16
|
+
aws-sdk-core (= 2.11.88)
|
17
|
+
aws-sigv4 (1.0.3)
|
18
18
|
diff-lcs (1.3)
|
19
|
-
jmespath (1.
|
19
|
+
jmespath (1.4.0)
|
20
20
|
rspec (3.6.0)
|
21
21
|
rspec-core (~> 3.6.0)
|
22
22
|
rspec-expectations (~> 3.6.0)
|
@@ -39,4 +39,4 @@ DEPENDENCIES
|
|
39
39
|
rspec (~> 3.6)
|
40
40
|
|
41
41
|
BUNDLED WITH
|
42
|
-
1.16.
|
42
|
+
1.16.2
|
data/lib/movable_ink/aws.rb
CHANGED
@@ -43,7 +43,7 @@ module MovableInk
|
|
43
43
|
Aws::AutoScaling::Errors::ThrottledException,
|
44
44
|
Aws::S3::Errors::SlowDown,
|
45
45
|
Aws::Route53::Errors::ThrottlingException,
|
46
|
-
Aws::Route53::Errors::
|
46
|
+
Aws::Route53::Errors::PriorRequestNotComplete,
|
47
47
|
Aws::SSM::Errors::TooManyUpdates,
|
48
48
|
Aws::Athena::Errors::ThrottlingException,
|
49
49
|
MovableInk::AWS::Errors::NoEnvironmentTagError
|
@@ -53,6 +53,12 @@ module MovableInk
|
|
53
53
|
else
|
54
54
|
notify_and_sleep(sleep_time, $!.class)
|
55
55
|
end
|
56
|
+
rescue Aws::Errors::ServiceError => e
|
57
|
+
message = "#{e.class}: #{e.message}\nFrom `#{e.backtrace.last.gsub("`","'")}`"
|
58
|
+
notify_slack(subject: 'Unhandled AWS API Error',
|
59
|
+
message: message)
|
60
|
+
puts message
|
61
|
+
raise MovableInk::AWS::Errors::ServiceError
|
56
62
|
end
|
57
63
|
end
|
58
64
|
raise MovableInk::AWS::Errors::FailedWithBackoff
|
data/lib/movable_ink/version.rb
CHANGED
data/spec/aws_spec.rb
CHANGED
@@ -41,6 +41,16 @@ describe MovableInk::AWS do
|
|
41
41
|
aws.run_with_backoff { ec2.describe_instances } rescue nil
|
42
42
|
end
|
43
43
|
|
44
|
+
it "should not retry and raise if a non-throttling error occurs" do
|
45
|
+
aws = MovableInk::AWS.new(environment: 'test')
|
46
|
+
route53 = Aws::Route53::Client.new(stub_responses: true)
|
47
|
+
route53.stub_responses(:list_resource_record_sets, 'NoSuchHostedZone')
|
48
|
+
|
49
|
+
expect(aws).to receive(:notify_slack).exactly(1).times
|
50
|
+
expect(STDOUT).to receive(:puts).exactly(1).times
|
51
|
+
expect{ aws.run_with_backoff { route53.list_resource_record_sets(hosted_zone_id: 'foo') } }.to raise_error(MovableInk::AWS::Errors::ServiceError)
|
52
|
+
end
|
53
|
+
|
44
54
|
it "should not notify slack when quiet param is passed in" do
|
45
55
|
aws = MovableInk::AWS.new(environment: 'test')
|
46
56
|
ec2 = Aws::EC2::Client.new(stub_responses: true)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: MovableInkAWS
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Chesler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|