Skip to content

Commit 222998a

Browse files
authored
AWS API bug fix and debug logging (#103)
* debug logging * don't validate * better debug logging * wrong constant name * remove core * add formatter * simplify * moar debug * attempt fix for aws debug * typo in param change * learn 2 spell * allow param validation to be turned off * remove typo * shutup hound * remove aws param validation (to be released in later PR) * actually remove param validation
1 parent 60b3800 commit 222998a

File tree

5 files changed

+14
-14
lines changed

5 files changed

+14
-14
lines changed

.rubocop.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -875,17 +875,6 @@ Style/EmptyMethod:
875875
- compact
876876
- expanded
877877

878-
# Checks whether the source file has a utf-8 encoding comment or not
879-
# AutoCorrectEncodingComment must match the regex
880-
# /#.*coding\s?[:=]\s?(?:UTF|utf)-8/
881-
Style/Encoding:
882-
EnforcedStyle: never
883-
SupportedStyles:
884-
- when_needed
885-
- always
886-
- never
887-
AutoCorrectEncodingComment: '# encoding: utf-8'
888-
889878
# Checks use of for or each in multiline loops.
890879
Style/For:
891880
EnforcedStyle: each

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 3.3.2
2+
- Add debug logging for aws-sdk components
3+
- Add some other debug logging
4+
- Fix for aws api changes: ecs task_definition response includes `compatibilities`, but requests want `requires_compatibilities`
5+
16
# 3.3.1
27
- Use new modularized aws-sdk gems: aws-sdk-ec2 & aws-sdk-ecs
38

lib/broadside/ecs/ecs_deploy.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ def update_task_revision
135135
# Deep merge doesn't work well with arrays (e.g. container_definitions), so build the container first.
136136
updatable_container_definitions.first.merge!(configured_container_definition)
137137
revision.deep_merge!((@target.task_definition_config || {}).except(:container_definitions))
138+
revision[:requires_compatibilities] = revision.delete(:compatibilities) if revision.key? :compatibilities
138139

140+
debug "Registering updated task definition for #{revision[:family]}"
139141
task_definition = EcsManager.ecs.register_task_definition(revision).task_definition
140142
debug "Successfully created #{task_definition.task_definition_arn}"
141143
end

lib/broadside/ecs/ecs_manager.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ class << self
88
def ecs
99
@ecs_client ||= Aws::ECS::Client.new(
1010
region: Broadside.config.aws.region,
11-
credentials: Broadside.config.aws.credentials
11+
credentials: Broadside.config.aws.credentials,
12+
logger: Broadside.config.logger,
13+
log_formatter: Aws::Log::Formatter.colored
1214
)
1315
end
1416

@@ -166,7 +168,9 @@ def all_results(method, key, args = {})
166168
def ec2_client
167169
@ec2_client ||= Aws::EC2::Client.new(
168170
region: Broadside.config.aws.region,
169-
credentials: Broadside.config.aws.credentials
171+
credentials: Broadside.config.aws.credentials,
172+
logger: Broadside.config.logger,
173+
log_formatter: Aws::Log::Formatter.colored
170174
)
171175
end
172176
end

lib/broadside/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Broadside
2-
VERSION = '3.3.1'.freeze
2+
VERSION = '3.3.2'.freeze
33
end

0 commit comments

Comments
 (0)