-
Notifications
You must be signed in to change notification settings - Fork 643
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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