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

ARROW-17079: [C++] Raise proper error message instead of error code for S3 errors #14001

Merged
merged 9 commits into from
Sep 1, 2022

Conversation

pcmoritz
Copy link
Contributor

@pcmoritz pcmoritz commented Aug 30, 2022

Part 2 to bring our S3 error messages up to the same standard as the ones from boto3.

The error types are from https://github.com/aws/aws-sdk-cpp/blob/main/aws-cpp-sdk-s3/include/aws/s3/S3Errors.h#L16 -- unfortunately the AWS C++ doesn't seem to have a way to get the errors programmatically from the error codes so we had to hand code them.
The new error format is:

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

The old format was:

When getting information for key 'test.csv' in bucket 'pcmoritz-test-bucket-arrow-errors': AWS Error [code 15] during HeadObject operation: No response body.

@github-actions
Copy link

@github-actions
Copy link

⚠️ Ticket has not been started in JIRA, please click 'Start Progress'.

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.

Thanks @pcmoritz , let's wait for CI now.

@pcmoritz
Copy link
Contributor Author

Sounds great! I hope the inline won't lead to code explosion -- do you think that's a concern?

@pitrou
Copy link
Member

pitrou commented Aug 31, 2022

Well, "inline" is a bit a of a misnomer nowadays and it doesn't force inlining.

@pitrou
Copy link
Member

pitrou commented Aug 31, 2022

Hmm... looks like you need to be a bit more careful about which enum values exist:
https://github.com/apache/arrow/runs/8110860974?check_suite_focus=true#step:8:6508

@pcmoritz
Copy link
Contributor Author

Thanks, I updated the PR and left a comment about it (one of the builds is using an older version of the SDK that doesn't have this error in the enum yet). This error was added ~2 years ago, all others have been there for >= 4 years, so we should be good now :)

I'm planning to merge the PR if the CI passes.

@pcmoritz pcmoritz merged commit 46f38dc into apache:master Sep 1, 2022
@ursabot
Copy link

ursabot commented Sep 1, 2022

Benchmark runs are scheduled for baseline = 13a7b60 and contender = 46f38dc. 46f38dc 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.0% ⬆️0.0%] ursa-i9-9960x
[Finished ⬇️0.85% ⬆️0.25%] ursa-thinkcentre-m75q
Buildkite builds:
[Finished] 46f38dca ec2-t3-xlarge-us-east-2
[Failed] 46f38dca test-mac-arm
[Failed] 46f38dca ursa-i9-9960x
[Finished] 46f38dca ursa-thinkcentre-m75q
[Finished] 13a7b605 ec2-t3-xlarge-us-east-2
[Failed] 13a7b605 test-mac-arm
[Failed] 13a7b605 ursa-i9-9960x
[Finished] 13a7b605 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 1, 2022

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

zagto pushed a commit to zagto/arrow that referenced this pull request Oct 7, 2022
…or S3 errors (apache#14001)

Part 2 to bring our S3 error messages up to the same standard as the ones from boto3.

The error types are from https://github.com/aws/aws-sdk-cpp/blob/main/aws-cpp-sdk-s3/include/aws/s3/S3Errors.h#L16 -- unfortunately the AWS C++ doesn't seem to have a way to get the errors programmatically from the error codes so we had to hand code them.
The new error format is:

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

The old format was:

> When getting information for key 'test.csv' in bucket 'pcmoritz-test-bucket-arrow-errors': AWS Error **[code 15]** during HeadObject operation: No response body.

Authored-by: Philipp Moritz <[email protected]>
Signed-off-by: Philipp Moritz <[email protected]>
fatemehp pushed a commit to fatemehp/arrow that referenced this pull request Oct 17, 2022
…or S3 errors (apache#14001)

Part 2 to bring our S3 error messages up to the same standard as the ones from boto3.

The error types are from https://github.com/aws/aws-sdk-cpp/blob/main/aws-cpp-sdk-s3/include/aws/s3/S3Errors.h#L16 -- unfortunately the AWS C++ doesn't seem to have a way to get the errors programmatically from the error codes so we had to hand code them.
The new error format is:

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

The old format was:

> When getting information for key 'test.csv' in bucket 'pcmoritz-test-bucket-arrow-errors': AWS Error **[code 15]** during HeadObject operation: No response body.

Authored-by: Philipp Moritz <[email protected]>
Signed-off-by: Philipp Moritz <[email protected]>
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