Skip to content

Commit

Permalink
Merge pull request #344 from aws/aws/1.4.1-release
Browse files Browse the repository at this point in the history
Aws/1.4.1 release
  • Loading branch information
t0shiii committed Dec 21, 2022
2 parents 1a53e8f + d2b099d commit 247c7e8
Show file tree
Hide file tree
Showing 6 changed files with 385 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -14,7 +14,7 @@ group :test do
gem 'coveralls_reborn', require: false
gem 'cucumber'
gem 'fakefs', :require => 'fakefs/safe'
gem 'mocha'
gem 'mocha', "0.13.3"
gem 'rspec'
gem 'webmock', :require => 'webmock/rspec'
gem 'shoulda'
Expand Down
2 changes: 1 addition & 1 deletion codedeploy_agent.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'aws_codedeploy_agent'
spec.version = '1.4.0'
spec.version = '1.4.1'
spec.summary = 'Packages AWS CodeDeploy agent libraries'
spec.description = 'AWS CodeDeploy agent is responsible for doing the actual work of deploying software on an individual EC2 instance'
spec.author = 'Amazon Web Services'
Expand Down
6 changes: 2 additions & 4 deletions lib/instance_agent/plugins/codedeploy/command_executor.rb
Expand Up @@ -304,8 +304,6 @@ def download_from_s3(deployment_spec, bucket, key, version, etag)
log(:info, "Downloading artifact bundle from bucket '#{bucket}' and key '#{key}', version '#{version}', etag '#{etag}'")
options = s3_options()
s3 = Aws::S3::Client.new(options)
ProcessManager::Log.info("s3 client configuration below:")
ProcessManager::Log.info(s3.config)

File.open(artifact_bundle(deployment_spec), 'wb') do |file|

Expand Down Expand Up @@ -346,10 +344,10 @@ def s3_options
options[:region] = region

if !InstanceAgent::Config.config[:s3_endpoint_override].to_s.empty?
ProcessManager::Log.info("using s3 override endpoint #{InstanceAgent::Config.config[:s3_endpoint_override]}")
ProcessManager::Log.debug("using s3 override endpoint #{InstanceAgent::Config.config[:s3_endpoint_override]}")
options[:endpoint] = URI(InstanceAgent::Config.config[:s3_endpoint_override])
elsif InstanceAgent::Config.config[:use_fips_mode]
ProcessManager::Log.info("using fips endpoint")
ProcessManager::Log.debug("using fips endpoint")
# There was a recent change to S3 client to decompose the region and use a FIPS endpoint is "fips-" is appended
# to the region. However, this is such a recent change that we cannot rely on the latest version of the SDK to be loaded.
# For now, the endpoint will be set directly if FIPS is active but can switch to the S3 method once we have broader support.
Expand Down
7 changes: 6 additions & 1 deletion lib/instance_agent/plugins/codedeploy/command_poller.rb
Expand Up @@ -143,7 +143,12 @@ def process_command(command, spec)
private
def next_command
log(:debug, "Calling PollHostCommand:")
output = @deploy_control_client.poll_host_command(:host_identifier => @host_identifier)
begin
output = @deploy_control_client.poll_host_command(:host_identifier => @host_identifier)
rescue Exception => e
log(:error, "Error polling for host commands: #{e.class} - #{e.message} - #{e.backtrace.join("\n")}")
raise e
end
command = output.host_command
if command.nil?
log(:debug, "PollHostCommand: Host Command = nil")
Expand Down

0 comments on commit 247c7e8

Please sign in to comment.