Skip to content

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

@jasdel jasdel self-assigned this Jan 25, 2019
@jasdel jasdel force-pushed the feat/SendContext branch from e4ce107 to 2f3a2bc Compare March 18, 2019 19:39
@jasdel jasdel force-pushed the feat/SendContext branch 2 times, most recently from 751d6b8 to 36878a0 Compare March 18, 2019 20:10
@jasdel jasdel force-pushed the feat/SendContext branch from 36878a0 to 193b6b2 Compare April 1, 2019 18:52
jasdel added 7 commits April 3, 2019 14:25
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 force-pushed the feat/SendContext branch from 193b6b2 to 582fcfa Compare April 3, 2019 21:26
@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