MovableInkAWS 2.9.2 → 2.9.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd541e2c6c70b23a168dbaf65963f4f05dd8ea8f08e0ff110e55649525590fec
4
- data.tar.gz: add03a4f9390d395a50c58a76ab122b6e59a083d7dd9b70b174b4950e21089e9
3
+ metadata.gz: 9ef93a1acfd75c148ddd4282a1042f84d923e26273f4fd0508e5981dd7fa49fe
4
+ data.tar.gz: 834422c38ae543968b9c0c480dc502df65b6bef06ee78ed5ef2dded44c7de716
5
5
  SHA512:
6
- metadata.gz: 7d25ba5150a0aa03699ca3b375e230e8daed9b655390d8c0b9844f32369b54a2a36b3b15c6e5aa658a5d6b4d24dd20ce8eef469fb7a1223835862bf92fb54ebb
7
- data.tar.gz: dc1aca65175bc2d03e295fbeabba103d78b696d02e3b2cb29a4836f43665252dc2e50b6c0a639bd714c86f60e1067221cc7ef63009d8827d2d0558ed6942d706
6
+ metadata.gz: '05080f47d109bbd54a5137f3a84f034662d1d116bb2d26e0d6df23f87ceb4d7df0e3de582fd7319e872d7319e14289ad68ff9f1e2a59e09eb545641a42b415d2'
7
+ data.tar.gz: dece6ebd716121df8c81a41c6678fb10e23d3ab2e90d730a59e96cda1d856a6f6a162910c755d81da5d61d991e42a67c04091f0bd7a8a8383b28368d1293525f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- MovableInkAWS (2.9.2)
4
+ MovableInkAWS (2.9.4)
5
5
  aws-sdk-athena (~> 1)
6
6
  aws-sdk-autoscaling (~> 1)
7
7
  aws-sdk-cloudwatch (~> 1)
@@ -46,6 +46,20 @@ module MovableInk
46
46
  end
47
47
  end
48
48
 
49
+ def delete_role_tag_with_retries(role:)
50
+ run_with_backoff do
51
+ ec2_with_retries.delete_tags({
52
+ resources: [instance_id],
53
+ tags: [
54
+ {
55
+ key: "mi:roles",
56
+ value: role
57
+ }
58
+ ]
59
+ })
60
+ end
61
+ end
62
+
49
63
  def complete_lifecycle_action(lifecycle_hook_name:, auto_scaling_group_name:, lifecycle_action_token: nil, instance_id: nil)
50
64
  raise ArgumentError.new('lifecycle_action_token or instance_id required') if lifecycle_action_token.nil? && instance_id.nil?
51
65
 
@@ -10,6 +10,16 @@ module MovableInk
10
10
  @ec2_client[region] ||= (client) ? client : Aws::EC2::Client.new(region: region)
11
11
  end
12
12
 
13
+ def ec2_with_retries(region: my_region, client: nil)
14
+ @ec2_client_with_retries ||= {}
15
+ if (client)
16
+ @ec2_client_with_retries[region] ||= client
17
+ else
18
+ instance_credentials = Aws::InstanceProfileCredentials.new(retries: 5)
19
+ @ec2_client_with_retries[region] ||= Aws::EC2::Client.new(region: region, credentials: instance_credentials)
20
+ end
21
+ end
22
+
13
23
  def mi_env_cache_file_path
14
24
  '/etc/movableink/environments.json'
15
25
  end
@@ -75,7 +75,6 @@ module MovableInk
75
75
  Aws::EC2::Errors::InternalError,
76
76
  Aws::EC2::Errors::Http503Error,
77
77
  Aws::EKS::Errors::TooManyRequestsException,
78
- Aws::Errors::MissingCredentialsError,
79
78
  Aws::SNS::Errors::ThrottledException,
80
79
  Aws::SNS::Errors::Throttling,
81
80
  Aws::AutoScaling::Errors::Throttling,
@@ -1,5 +1,5 @@
1
1
  module MovableInk
2
2
  class AWS
3
- VERSION = '2.9.2'
3
+ VERSION = '2.9.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: MovableInkAWS
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.2
4
+ version: 2.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - MI SRE