MovableInkAWS 1.0.15 → 1.0.16

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: 68e65c324f0ef9ce4d4c2607ecc050ff7ee04070b819200e3ad34805e56f3d0f
4
- data.tar.gz: 2868c07278470a371c0ac88eb13985566d4a881eb2d944b63a118d45d033844e
3
+ metadata.gz: 8da5fcf1d95cc4642ae47bc180040671d9baeb9bbabb3c92bdf8c7a1a387b33b
4
+ data.tar.gz: ebb0966bf640735e8e5d2e2b0903ac246a8e61f85eb3f21a2950afd935ca338d
5
5
  SHA512:
6
- metadata.gz: e1da5c8861b8cec7a0b60056177b6e1b5121e9c87108bb4385edc4c32786a33f4ad306a0735eb1327c28b32302e26bb9303e61422488cb3010bf2d9b0524203b
7
- data.tar.gz: bb5bfc766d27391c49e8f981efd0abac83cedb7bac6446dc6b399706b91dc77dc8586c72ae482eb04b4b7734ed398ee620ba9fa8095a3f1ef5e83543f84b463a
6
+ metadata.gz: 635c4fe35a5c3bb404ec5ea1621345a5dca26bb8e85a911e772ad2420cbd6469a0ac896a1311f4f86326948fc25298d006981451521df244333d50d2654c82b1
7
+ data.tar.gz: af18dbf13eab9fc4b06a3006c593289f7a6323afc779e08fe881f6b3e93a2ce76a0091ef36855653e848b17887d369745750c9d857085ea4816d6070e6b62053
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- MovableInkAWS (1.0.15)
4
+ MovableInkAWS (1.0.16)
5
5
  aws-sdk-athena (~> 1)
6
6
  aws-sdk-autoscaling (~> 1)
7
7
  aws-sdk-cloudwatch (~> 1)
@@ -20,7 +20,7 @@ GEM
20
20
  remote: https://rubygems.org/
21
21
  specs:
22
22
  aws-eventstream (1.1.0)
23
- aws-partitions (1.321.0)
23
+ aws-partitions (1.322.0)
24
24
  aws-sdk-athena (1.25.0)
25
25
  aws-sdk-core (~> 3, >= 3.71.0)
26
26
  aws-sigv4 (~> 1.1)
@@ -77,12 +77,15 @@ module MovableInk
77
77
  notify_and_sleep(sleep_time, $!.class)
78
78
  end
79
79
  rescue Aws::Errors::ServiceError => e
80
- message = "#{e.class}: #{e.message}\nFrom `#{e.backtrace.last.gsub("`","'")}`"
80
+ message = "#{e.class}: #{e.message}\nFrom #{$0}\n```\n#{e.backtrace.first(3).join("\n").gsub("`","'")}\n```"
81
81
  notify_slack(subject: 'Unhandled AWS API Error', message: message)
82
82
  puts message
83
83
  raise MovableInk::AWS::Errors::ServiceError
84
84
  end
85
85
  end
86
+ message = "From: #{$0}\n```\n#{Thread.current.backtrace.first(3).join("\n").gsub("`","'")}\n```"
87
+ notify_slack(subject: "AWS API failed after #{tries} attempts", message: message)
88
+ puts message
86
89
  raise MovableInk::AWS::Errors::FailedWithBackoff
87
90
  end
88
91
 
@@ -1,5 +1,5 @@
1
1
  module MovableInk
2
2
  class AWS
3
- VERSION = '1.0.15'
3
+ VERSION = '1.0.16'
4
4
  end
5
5
  end
@@ -42,9 +42,9 @@ describe MovableInk::AWS do
42
42
  ec2 = Aws::EC2::Client.new(stub_responses: true)
43
43
  ec2.stub_responses(:describe_instances, 'RequestLimitExceeded')
44
44
 
45
- expect(aws).to receive(:notify_slack).exactly(9).times
45
+ expect(aws).to receive(:notify_slack).exactly(10).times
46
46
  expect(aws).to receive(:sleep).exactly(9).times.and_return(true)
47
- expect(STDOUT).to receive(:puts).exactly(9).times
47
+ expect(STDOUT).to receive(:puts).exactly(10).times
48
48
 
49
49
  aws.run_with_backoff { ec2.describe_instances } rescue nil
50
50
  end
@@ -64,9 +64,9 @@ describe MovableInk::AWS do
64
64
  ec2 = Aws::EC2::Client.new(stub_responses: true)
65
65
  ec2.stub_responses(:describe_instances, 'RequestLimitExceeded')
66
66
 
67
- expect(aws).to receive(:notify_slack).exactly(1).times
67
+ expect(aws).to receive(:notify_slack).exactly(2).times
68
68
  expect(aws).to receive(:sleep).exactly(9).times.and_return(true)
69
- expect(STDOUT).to receive(:puts).exactly(1).times
69
+ expect(STDOUT).to receive(:puts).exactly(2).times
70
70
 
71
71
  aws.run_with_backoff(quiet: true) { ec2.describe_instances } rescue nil
72
72
  end
@@ -77,6 +77,8 @@ describe MovableInk::AWS do
77
77
  ec2.stub_responses(:describe_instances, 'RequestLimitExceeded')
78
78
 
79
79
  expect(aws).to receive(:notify_and_sleep).exactly(9).times
80
+ expect(aws).to receive(:notify_slack).exactly(1).times
81
+ expect(STDOUT).to receive(:puts).exactly(1).times
80
82
  expect{ aws.run_with_backoff { ec2.describe_instances } }.to raise_error(MovableInk::AWS::Errors::FailedWithBackoff)
81
83
  end
82
84
  end
@@ -82,6 +82,8 @@ describe MovableInk::AWS::SSM do
82
82
  allow(aws).to receive(:ssm_client).and_return(1)
83
83
  allow(aws).to receive(:ssm_client_failover).and_return(2)
84
84
  allow(aws).to receive(:notify_and_sleep).and_return(nil)
85
+ allow(aws).to receive(:notify_slack).and_return(nil)
86
+ allow(STDOUT).to receive(:puts).and_return(nil)
85
87
 
86
88
  results = []
87
89
  calls = 0
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: 1.0.15
4
+ version: 1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Chesler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-27 00:00:00.000000000 Z
11
+ date: 2020-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core