ecs_deploy 1.0.6 → 1.0.7
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/CHANGELOG.md +6 -0
- data/lib/ecs_deploy/auto_scaler/auto_scaling_group_config.rb +8 -2
- data/lib/ecs_deploy/version.rb +1 -1
- 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: 932b0b421b5a352c6f5fd2a3f110baf393c6d0667fa951abfeeb97a0badbe074
|
4
|
+
data.tar.gz: 53ddcbcea0662a0e154192be3e71c5161309ba042146e81f9a5f29794e25988f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88a77e68a9ef43fe818fe529af5f75b1dfaa4b9ccf0505fabe1c185f67eb051f041b6720239bda895fd812125aa960728585aff85f149b99a30331e16c47cef7
|
7
|
+
data.tar.gz: 4dd7312beb91fc54635d79e44b8795c00866085d3b117f8583fb5c082970dc521fd53423ef3aa5c2c942d5adf6656296034b1952cb32e5b55087d8102173e79e
|
data/CHANGELOG.md
CHANGED
@@ -63,10 +63,14 @@ module EcsDeploy
|
|
63
63
|
)
|
64
64
|
end
|
65
65
|
|
66
|
+
# NOTE: InstanceDrainer calls this method when it receives spot instance interruption warnings
|
66
67
|
def detach_instances(instance_ids:, should_decrement_desired_capacity:)
|
67
68
|
return if instance_ids.empty?
|
68
69
|
|
69
|
-
|
70
|
+
# detach only detachable instances
|
71
|
+
detachable_instance_ids = instance_ids & describe_detachable_instances.map(&:instance_id)
|
72
|
+
|
73
|
+
detachable_instance_ids.each_slice(MAX_DETACHABLE_INSTANCE_COUNT) do |ids|
|
70
74
|
client.detach_instances(
|
71
75
|
auto_scaling_group_name: name,
|
72
76
|
instance_ids: ids,
|
@@ -181,7 +185,9 @@ module EcsDeploy
|
|
181
185
|
client.describe_auto_scaling_groups({ auto_scaling_group_names: [name] }).auto_scaling_groups[0].instances.reject do |i|
|
182
186
|
# The lifecycle state of terminated instances becomes "Detaching", "Terminating", "Terminating:Wait", or "Terminating:Proceed",
|
183
187
|
# and we can't detach instances in such a state.
|
184
|
-
i.lifecycle_state.start_with?("Terminating") || i.lifecycle_state == "Detaching"
|
188
|
+
i.lifecycle_state.start_with?("Terminating") || i.lifecycle_state == "Detaching" ||
|
189
|
+
# EC2 instance sometimes stays in Pending state for more than 10 minutes
|
190
|
+
i.lifecycle_state == "Pending"
|
185
191
|
end
|
186
192
|
end
|
187
193
|
|
data/lib/ecs_deploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecs_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joker1007
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-autoscaling
|