Skip to content

Conversation

@pcmoritz
Copy link
Contributor

@pcmoritz pcmoritz commented Sep 1, 2022

This is the last change I propose to improve our S3 error message.

For certain errors, unfortunately the AWS SDK is doing a poor job in propagating the error and just reports UNKNOWN (see https://github.com/aws/aws-sdk-cpp/blob/1614bce979a201ada1e3436358edb7bd1834b5d6/aws-cpp-sdk-core/source/client/AWSClient.cpp#L77), in these cases the HTTP status code can be an important source to find out what is going wrong (and is also reported by boto3).

This has the downside of cluttering the error message a bit more, but in general this information will be very valuable to diagnose the problem. Given that we now have the API call and the HTTP status error, in general there is good documentation on the internet that helps diagnose the problem.

Before:

When getting information for key 'test.csv' in bucket 'pcmoritz-test-bucket-arrow-errors': AWS Error UNKNOWN during HeadObject call: No response body.

After:

When getting information for key 'test.csv' in bucket 'pcmoritz-test-bucket-arrow-errors': AWS Error UNKNOWN (HTTP status 400) during HeadObject call: No response body.

@github-actions
Copy link

github-actions bot commented Sep 1, 2022

S3ErrorToString(static_cast<Aws::S3::S3Errors>(error.GetErrorType())), " during ",
operation, " operation: ", error.GetMessage());
S3ErrorToString(static_cast<Aws::S3::S3Errors>(error.GetErrorType())),
" (http status ", static_cast<int>(error.GetResponseCode()), ")",
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't we add this only if the AWS error is actually "unknown"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes you are right, that will be less confusing I think (instead of the user needing to juggle with two errors).

@pcmoritz
Copy link
Contributor Author

pcmoritz commented Sep 6, 2022

@pitrou This should be ready now :)

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

+1, thanks for the improvement @pcmoritz

@pitrou pitrou changed the title ARROW-17079: Show http status code for S3 errors ARROW-17079: Show http status code for unknown S3 errors Sep 6, 2022
@pitrou pitrou changed the title ARROW-17079: Show http status code for unknown S3 errors ARROW-17079: Show HTTP status code for unknown S3 errors Sep 6, 2022
@pitrou pitrou merged commit a5ecb0f into apache:master Sep 6, 2022
@ursabot
Copy link

ursabot commented Sep 6, 2022

Benchmark runs are scheduled for baseline = 3e40cd3 and contender = a5ecb0f. a5ecb0f is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed] test-mac-arm
[Failed ⬇️0.82% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.11% ⬆️0.04%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] a5ecb0ff ec2-t3-xlarge-us-east-2
[Failed] a5ecb0ff test-mac-arm
[Failed] a5ecb0ff ursa-i9-9960x
[Finished] a5ecb0ff ursa-thinkcentre-m75q
[Finished] 3e40cd36 ec2-t3-xlarge-us-east-2
[Failed] 3e40cd36 test-mac-arm
[Failed] 3e40cd36 ursa-i9-9960x
[Finished] 3e40cd36 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

@ursabot
Copy link

ursabot commented Sep 6, 2022

['Python', 'R'] benchmarks have high level of regressions.
ursa-i9-9960x

@ursabot
Copy link

ursabot commented Sep 7, 2022

Benchmark runs are scheduled for baseline = 3e40cd3 and contender = a5ecb0f. a5ecb0f is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
Conbench compare runs links:
[Finished ⬇️0.0% ⬆️0.0%] ec2-t3-xlarge-us-east-2
[Failed] test-mac-arm
[Failed ⬇️0.82% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.07% ⬆️0.0%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] a5ecb0ff ec2-t3-xlarge-us-east-2
[Failed] a5ecb0ff test-mac-arm
[Failed] a5ecb0ff ursa-i9-9960x
[Finished] a5ecb0ff ursa-thinkcentre-m75q
[Finished] 3e40cd36 ec2-t3-xlarge-us-east-2
[Failed] 3e40cd36 test-mac-arm
[Failed] 3e40cd36 ursa-i9-9960x
[Finished] 3e40cd36 ursa-thinkcentre-m75q
Supported benchmarks:
ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
test-mac-arm: Supported benchmark langs: C++, Python, R
ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
ursa-thinkcentre-m75q: Supported benchmark langs: C++, Java

zagto pushed a commit to zagto/arrow that referenced this pull request Oct 7, 2022
This is the last change I propose to improve our S3 error message.

For certain errors, unfortunately the AWS SDK is doing a poor job in propagating the error and just reports UNKNOWN (see https://github.com/aws/aws-sdk-cpp/blob/1614bce979a201ada1e3436358edb7bd1834b5d6/aws-cpp-sdk-core/source/client/AWSClient.cpp#L77), in these cases the HTTP status code can be an important source to find out what is going wrong (and is also reported by boto3).

This has the downside of cluttering the error message a bit more, but in general this information will be very valuable to diagnose the problem. Given that we now have the API call and the HTTP status error, in general there is good documentation on the internet that helps diagnose the problem.

Before:

> When getting information for key 'test.csv' in bucket 'pcmoritz-test-bucket-arrow-errors': AWS Error UNKNOWN during HeadObject call: No response body.

After:

> When getting information for key 'test.csv' in bucket 'pcmoritz-test-bucket-arrow-errors': AWS Error UNKNOWN **(HTTP status 400)** during HeadObject call: No response body.

Lead-authored-by: Philipp Moritz <pcmoritz@gmail.com>
Co-authored-by: Antoine Pitrou <pitrou@free.fr>
Signed-off-by: Antoine Pitrou <antoine@python.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants