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

Update SDK API operation request send to required Context #265

Merged
merged 7 commits into from Apr 5, 2019

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Jan 25, 2019

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.

If a context is not desired using context.Background, or
context.TODO instead of specific context, like cancel or trace.

Fix #264

TODO:

  • Documentation
  • Examples
  • Pagination with context
  • Waiters with context

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.

If a context is not desired using `context.Background`, or
`context.TODO` instead of a cancel or trace context.

Fix aws#264
@jasdel jasdel added the breaking-change Issue requires a breaking change to remediate. label Apr 3, 2019
@jasdel jasdel merged commit efe43a4 into aws:master Apr 5, 2019
@jasdel jasdel deleted the feat/SendContext branch April 5, 2019 20:34
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.
mpon added a commit to mpon/ecswalk that referenced this pull request May 14, 2019
@ghost
Copy link

ghost commented Jun 2, 2019

How do I access my data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Issue requires a breaking change to remediate.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update client operation request send method to require Context
1 participant