aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.03k stars 323 forks source link

agent/s3util: `headBucketTransport.RoundTrip` drops log messages #473

Closed chrisnovakovic closed 9 months ago

chrisnovakovic commented 1 year ago

When the delegate responds with a status code indicating a redirect but no Location response header, a log message records the status code override that takes place:

https://github.com/aws/amazon-ssm-agent/blob/db56c99f4966ce1e60290b613b87326db080cb85/agent/s3util/s3util_dep.go#L119

Here, logger is the mock logger defined in the package's test suite, so the message is never meaningfully recorded:

https://github.com/aws/amazon-ssm-agent/blob/db56c99f4966ce1e60290b613b87326db080cb85/agent/s3util/test_s3util.go#L29

Presumably this should actually be trans.logger, i.e. the headBucketTransport's logger.

VishnuKarthikRavindran commented 9 months ago

Hi @chrisnovakovic, We have pushed this change as part of https://github.com/aws/amazon-ssm-agent/commit/d12c446111ec0e3658fc42a1cddb620a1bbc1555. Thanks