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/request: Fix SDK error checking when seeking readers #2696

Merged
merged 5 commits into from
Jul 22, 2019

Conversation

jasdel
Copy link
Contributor

@jasdel jasdel commented Jul 17, 2019

Fixes the SDK handling of seeking a reader to ensure errors are not
lost, and are bubbled up.

In several places the SDK ignored Seek errors when attempting to
determine a reader's length, or rewinding the reader for retry attempts.

Related to #2525

@jasdel jasdel added the needs-review This issue or pull request needs review from a core team member. label Jul 17, 2019
@jasdel jasdel requested a review from skotambkar July 17, 2019 21:26
@jasdel jasdel self-assigned this Jul 17, 2019
@jasdel jasdel force-pushed the fixup/RequestReaderSeekErrors branch from 670f8e6 to 123cf7b Compare July 18, 2019 18:13
@@ -1111,6 +1111,43 @@ func TestRequestNoConnection(t *testing.T) {
}
}

func TestRequetBodySeekFails(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: spelling for TestRequestBodySeekFails

aws/signer/v4/v4.go Outdated Show resolved Hide resolved
aws/signer/v4/v4.go Outdated Show resolved Hide resolved
Copy link
Contributor

@skotambkar skotambkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at some of the nit changes before merging.

Fixes the SDK handling of seeking a reader to ensure errors are not
lost, and are bubbled up.

In several places the SDK ignored Seek errors when attempting to
determine a reader's length, or rewinding the reader for retry attempts.

Related to aws#2525
@jasdel jasdel force-pushed the fixup/RequestReaderSeekErrors branch from 123cf7b to 2c36c8e Compare July 19, 2019 23:41
@jasdel jasdel merged commit 5bab1ec into aws:master Jul 22, 2019
@jasdel jasdel deleted the fixup/RequestReaderSeekErrors branch July 22, 2019 15:31
jasdel added a commit that referenced this pull request Jul 22, 2019
@aws-sdk-go-automation aws-sdk-go-automation mentioned this pull request Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-review This issue or pull request needs review from a core team member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants