Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws/ec2metadata: Fix EC2 Metadata client panic with debug logging #290

Merged
merged 1 commit into from
Apr 10, 2019

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Apr 9, 2019

Fixes a panic that could occur within the EC2 Metadata client when both
AWS_EC2_METADATA_DISABLED env var is set and log level is
LogDebugWithHTTPBody. The SDK's client response body debug functionality
would panic because the Request.HTTPResponse value was not specified.

Updates the client debug loggers to check if the response is set before
attempting to log.

V2 SDK port of: aws/aws-sdk-go#2461

Fixes a panic that could occur witihin the EC2 Metadata client when both
AWS_EC2_METADATA_DISABLED env var is set and log level is
LogDebugWithHTTPBody. The SDK's client response body debug functionality
would panic because the Request.HTTPResponse value was not specified.

Updates the client debug loggers to check if the response is set before
attempting to log.

V2 SDK port of: aws/aws-sdk-go#2461
@jasdel jasdel added the v1-sync label Apr 9, 2019
@jasdel jasdel merged commit d03e547 into aws:master Apr 10, 2019
@jasdel jasdel deleted the fixup/EC2MetadataPanic branch April 10, 2019 19:00
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this pull request Apr 25, 2019
Services
---
* Synced the V2 SDK with latests AWS service API definitions.

SDK Breaking changes
---
* Update SDK API operation request send to required Context (aws#265)
  * Updates the SDK's API operation request Send method to require a context.Context value when called. This is done to encourage best applications to use Context for cancellation and request tracing.  Standardizing on this pattern will also help reduce code paths which accidentally do not have the Context causing the cancellation and tracing chain to be lost. Leading to difficult to trace down losses of cancellation and tracing within an application.
  * Fixes aws#264

SDK Enhancements
---
* Update README.md for getting SDK without Go Modules
  * Updates the README.md with instructions how to get the SDK without Go Modules enabled, or using the SDK within a GOPATH with Go 1.11, and Go 1.12.
* Refactor SDK's integration tests to be code generated (aws#283)
* `aws`: Add RequestThrottledException to set of throttled exceptions (aws#292)
* `private/model/api`: Backfill authtype, STS and Cognito Identity (aws#293)
  * Backfills the authtype=none modeled trait for STS and Cognito Identity services. This removes the in code customization for these two services' APIs that should not be signed.

SDK Bugs
---
* Fix HTTP endpoint credential provider test for unresolved hosts (aws#262)
  * Fixes the HTTP endpoint credential provider's tests to check for a host that resolves to no addresses.
* `example/service/s3/mockPaginator`: Update example to not use internal pkg (aws#278)
  * Updates the SDK's S3 Mock Paginator example to not use internal SDK packages and instead use the SDK's provided defaults package for default configuration.
  * Fixes aws#116
* Cleanup go mod unused dependencies (aws#284)
* `service/s3/s3manager`: Fix brittle Upload unit test (aws#288)
* `aws/ec2metadata`: Fix EC2 Metadata client panic with debug logging (aws#290)
  * Fixes a panic that could occur within the EC2 Metadata client when both AWS_EC2_METADATA_DISABLED env var is set and log level is LogDebugWithHTTPBody. The SDK's client response body debug functionality would panic because the Request.HTTPResponse value was not specified.
* `aws`: Fix RequestUserAgent test to be stable (aws#289)
* `private/protocol/rest`: Trim space in header key and value (aws#291)
  * Fixes a bug when using S3 metadata where metadata values with leading spaces would trigger request signature validation errors when the request is received by the service.
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this pull request Apr 25, 2019
Services
---
* Synced the V2 SDK with latests AWS service API definitions.

SDK Breaking changes
---
* Update SDK API operation request send to required Context (aws#265)
  * Updates the SDK's API operation request Send method to require a context.Context value when called. This is done to encourage best applications to use Context for cancellation and request tracing.  Standardizing on this pattern will also help reduce code paths which accidentally do not have the Context causing the cancellation and tracing chain to be lost. Leading to difficult to trace down losses of cancellation and tracing within an application.
  * Fixes aws#264

SDK Enhancements
---
* Update README.md for getting SDK without Go Modules
  * Updates the README.md with instructions how to get the SDK without Go Modules enabled, or using the SDK within a GOPATH with Go 1.11, and Go 1.12.
* Refactor SDK's integration tests to be code generated (aws#283)
* `aws`: Add RequestThrottledException to set of throttled exceptions (aws#292)
* `private/model/api`: Backfill authtype, STS and Cognito Identity (aws#293)
  * Backfills the authtype=none modeled trait for STS and Cognito Identity services. This removes the in code customization for these two services' APIs that should not be signed.

SDK Bugs
---
* Fix HTTP endpoint credential provider test for unresolved hosts (aws#262)
  * Fixes the HTTP endpoint credential provider's tests to check for a host that resolves to no addresses.
* `example/service/s3/mockPaginator`: Update example to not use internal pkg (aws#278)
  * Updates the SDK's S3 Mock Paginator example to not use internal SDK packages and instead use the SDK's provided defaults package for default configuration.
  * Fixes aws#116
* Cleanup go mod unused dependencies (aws#284)
* `service/s3/s3manager`: Fix brittle Upload unit test (aws#288)
* `aws/ec2metadata`: Fix EC2 Metadata client panic with debug logging (aws#290)
  * Fixes a panic that could occur within the EC2 Metadata client when both AWS_EC2_METADATA_DISABLED env var is set and log level is LogDebugWithHTTPBody. The SDK's client response body debug functionality would panic because the Request.HTTPResponse value was not specified.
* `aws`: Fix RequestUserAgent test to be stable (aws#289)
* `private/protocol/rest`: Trim space in header key and value (aws#291)
  * Fixes a bug when using S3 metadata where metadata values with leading spaces would trigger request signature validation errors when the request is received by the service.
jasdel added a commit to jasdel/aws-sdk-go-v2 that referenced this pull request Apr 25, 2019
Services
---
* Synced the V2 SDK with latests AWS service API definitions.

SDK Breaking changes
---
* Update SDK API operation request send to required Context (aws#265)
  * Updates the SDK's API operation request Send method to require a context.Context value when called. This is done to encourage best applications to use Context for cancellation and request tracing.  Standardizing on this pattern will also help reduce code paths which accidentally do not have the Context causing the cancellation and tracing chain to be lost. Leading to difficult to trace down losses of cancellation and tracing within an application.
  * Fixes aws#264

SDK Enhancements
---
* Update README.md for getting SDK without Go Modules
  * Updates the README.md with instructions how to get the SDK without Go Modules enabled, or using the SDK within a GOPATH with Go 1.11, and Go 1.12.
* Refactor SDK's integration tests to be code generated (aws#283)
* `aws`: Add RequestThrottledException to set of throttled exceptions (aws#292)
* `private/model/api`: Backfill authtype, STS and Cognito Identity (aws#293)
  * Backfills the authtype=none modeled trait for STS and Cognito Identity services. This removes the in code customization for these two services' APIs that should not be signed.

SDK Bugs
---
* Fix HTTP endpoint credential provider test for unresolved hosts (aws#262)
  * Fixes the HTTP endpoint credential provider's tests to check for a host that resolves to no addresses.
* `example/service/s3/mockPaginator`: Update example to not use internal pkg (aws#278)
  * Updates the SDK's S3 Mock Paginator example to not use internal SDK packages and instead use the SDK's provided defaults package for default configuration.
  * Fixes aws#116
* Cleanup go mod unused dependencies (aws#284)
* `service/s3/s3manager`: Fix brittle Upload unit test (aws#288)
* `aws/ec2metadata`: Fix EC2 Metadata client panic with debug logging (aws#290)
  * Fixes a panic that could occur within the EC2 Metadata client when both AWS_EC2_METADATA_DISABLED env var is set and log level is LogDebugWithHTTPBody. The SDK's client response body debug functionality would panic because the Request.HTTPResponse value was not specified.
* `aws`: Fix RequestUserAgent test to be stable (aws#289)
* `private/protocol/rest`: Trim space in header key and value (aws#291)
  * Fixes a bug when using S3 metadata where metadata values with leading spaces would trigger request signature validation errors when the request is received by the service.
jasdel added a commit that referenced this pull request Apr 25, 2019
Services
---
* Synced the V2 SDK with latest AWS service API definitions.

SDK Breaking changes
---
* Update SDK API operation request send to required Context (#265)
  * Updates the SDK's API operation request Send method to require a context.Context value when called. This is done to encourage best applications to use Context for cancellation and request tracing.  Standardizing on this pattern will also help reduce code paths which accidentally do not have the Context causing the cancellation and tracing chain to be lost. Leading to difficult to trace down losses of cancellation and tracing within an application.
  * Fixes #264

SDK Enhancements
---
* Update README.md for getting SDK without Go Modules
  * Updates the README.md with instructions how to get the SDK without Go Modules enabled, or using the SDK within a GOPATH with Go 1.11, and Go 1.12.
* Refactor SDK's integration tests to be code generated (#283)
* `aws`: Add RequestThrottledException to set of throttled exceptions (#292)
* `private/model/api`: Backfill authtype, STS and Cognito Identity (#293)
  * Backfills the authtype=none modeled trait for STS and Cognito Identity services. This removes the in code customization for these two services' APIs that should not be signed.

SDK Bugs
---
* Fix HTTP endpoint credential provider test for unresolved hosts (#262)
  * Fixes the HTTP endpoint credential provider's tests to check for a host that resolves to no addresses.
* `example/service/s3/mockPaginator`: Update example to not use internal pkg (#278)
  * Updates the SDK's S3 Mock Paginator example to not use internal SDK packages and instead use the SDK's provided defaults package for default configuration.
  * Fixes #116
* Cleanup go mod unused dependencies (#284)
* `service/s3/s3manager`: Fix brittle Upload unit test (#288)
* `aws/ec2metadata`: Fix EC2 Metadata client panic with debug logging (#290)
  * Fixes a panic that could occur within the EC2 Metadata client when both AWS_EC2_METADATA_DISABLED env var is set and log level is LogDebugWithHTTPBody. The SDK's client response body debug functionality would panic because the Request.HTTPResponse value was not specified.
* `aws`: Fix RequestUserAgent test to be stable (#289)
* `private/protocol/rest`: Trim space in header key and value (#291)
  * Fixes a bug when using S3 metadata where metadata values with leading spaces would trigger request signature validation errors when the request is received by the service.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant