hako 2.6.0 → 2.6.1

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: 7b787a7d8f621f8f8c1f9c36b4d2f6388d537c58eb33a3b0f5ff084864187b68
4
- data.tar.gz: b274e28a64b66a768aa782e80d42d5a8193cd46e85b5125726bf755ceef512d1
3
+ metadata.gz: 20b7ac14cb0c43d0fd104551f6669ffbbd75af221dc3e91a368b64c9f6ce7dc6
4
+ data.tar.gz: f4190fad69152de31d7956eb7dd2eaf40f211b71cd51f07c1777c3d1e5ca7e99
5
5
  SHA512:
6
- metadata.gz: 3dbfbe813c945a3c566200681c436e0efc95580a60c5db7750d7d584e81b7963cd31dc1e284cfd020aca0ad4104f4f7820133dab0f524759ee30dc8d1db7397b
7
- data.tar.gz: 6c91241388f94a031a411fd0cbfa896da13a9a1a55db717c6878f1a954cf93c680956dbef983e59d8947955bc2a43b8495f1e742cfb98491bf4e3c9eba901c22
6
+ metadata.gz: a1b7c1b877933e45b2c3b1c03a3467ea68cc6c442614f668ba89cab109bef13544598b41c82cc5cc1a82148f1c31d4ffdcfa4135532dd132fadb301760b0d62e
7
+ data.tar.gz: 657efc57b3d085f51e37090004a62b64df963cb3010f16b73ee176f07a64fc0d3f3a8258dd5f1b13af3923c91137381d3599290f6944046f3008b19a999df360
@@ -1,3 +1,11 @@
1
+ # 2.6.1 (2018-12-17)
2
+ ## Bug fixes
3
+ - Avoid updating service when `platform_version` is not specified
4
+ - Keep essential parameter in `hako oneshot`
5
+
6
+ ## Improvements
7
+ - Show more information about tasks in `hako status`
8
+
1
9
  # 2.6.0 (2018-12-13)
2
10
  ## New features
3
11
  - Support `essential` parameter for each container
@@ -183,9 +183,6 @@ module Hako
183
183
  # @return [Integer] Returns exit code
184
184
  def oneshot(containers, commands, env, no_wait: false)
185
185
  definitions = create_definitions(containers)
186
- definitions.each do |definition|
187
- definition.delete(:essential)
188
- end
189
186
 
190
187
  if @dry_run
191
188
  volumes_definition.each do |d|
@@ -251,24 +248,34 @@ module Hako
251
248
  ecs_client.list_tasks(cluster: @cluster, service_name: service.service_arn).each do |page|
252
249
  unless page.task_arns.empty?
253
250
  tasks = ecs_client.describe_tasks(cluster: @cluster, tasks: page.task_arns).tasks
251
+ container_instance_arns = tasks.map(&:container_instance_arn).compact
254
252
  container_instances = {}
255
- ecs_client.describe_container_instances(cluster: @cluster, container_instances: tasks.map(&:container_instance_arn)).container_instances.each do |ci|
256
- container_instances[ci.container_instance_arn] = ci
253
+ unless container_instance_arns.empty?
254
+ ecs_client.describe_container_instances(cluster: @cluster, container_instances: container_instance_arns).container_instances.each do |ci|
255
+ container_instances[ci.container_instance_arn] = ci
256
+ end
257
257
  end
258
258
  ec2_instances = {}
259
- ec2_client.describe_instances(instance_ids: container_instances.values.map(&:ec2_instance_id)).reservations.each do |r|
260
- r.instances.each do |i|
261
- ec2_instances[i.instance_id] = i
259
+ unless container_instances.empty?
260
+ ec2_client.describe_instances(instance_ids: container_instances.values.map(&:ec2_instance_id)).reservations.each do |r|
261
+ r.instances.each do |i|
262
+ ec2_instances[i.instance_id] = i
263
+ end
262
264
  end
263
265
  end
264
266
  tasks.each do |task|
267
+ task_id = task.task_arn.slice(%r{task/(.+)\z}, 1)
268
+ task_definition = task.task_definition_arn.slice(%r{task-definition/(.+)\z}, 1)
269
+ print " [#{task.last_status}] #{task_id} task_definition=#{task_definition}, desired_status=#{task.desired_status}"
265
270
  ci = container_instances[task.container_instance_arn]
266
- instance = ec2_instances[ci.ec2_instance_id]
267
- print " [#{task.last_status}]: #{ci.ec2_instance_id}"
268
- if instance
269
- name_tag = instance.tags.find { |t| t.key == 'Name' }
270
- if name_tag
271
- print " (#{name_tag.value})"
271
+ if ci
272
+ print ", instance_id=#{ci.ec2_instance_id}"
273
+ instance = ec2_instances[ci.ec2_instance_id]
274
+ if instance
275
+ name_tag = instance.tags.find { |t| t.key == 'Name' }
276
+ if name_tag
277
+ print " (#{name_tag.value})"
278
+ end
272
279
  end
273
280
  end
274
281
  puts
@@ -23,7 +23,7 @@ module Hako
23
23
  struct.member(:desired_count, Schema::Integer.new)
24
24
  struct.member(:task_definition, Schema::String.new)
25
25
  struct.member(:deployment_configuration, Schema::WithDefault.new(deployment_configuration_schema, default_configuration))
26
- struct.member(:platform_version, Schema::String.new)
26
+ struct.member(:platform_version, Schema::WithDefault.new(Schema::String.new, 'LATEST'))
27
27
  struct.member(:network_configuration, Schema::Nullable.new(network_configuration_schema))
28
28
  struct.member(:health_check_grace_period_seconds, Schema::Nullable.new(Schema::Integer.new))
29
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hako
4
- VERSION = '2.6.0'
4
+ VERSION = '2.6.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hako
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kohei Suzuki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-13 00:00:00.000000000 Z
11
+ date: 2018-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-applicationautoscaling