Improve AWS credential errors#187
Merged
Merged
Conversation
Why these changes are being introduced: There are two main buckets (no pun intended) in which AWS credentials can fail: 1. They are not set or stale 2. They are pointing at the wrong environment The error reporting for both is poor, with opaque DuckDB or boto3 errors. For DuckDB it's during secret construction, and makes me mention of AWS. For boto3, it's checking that destination bucket exists, which is better but still confusing. How this addresses that need: * Catches AWS related errors in very different parts of the codebase, surfacing a normalized error message that something is wrong with AWS credentials. Side effects of this change: * None Relevant ticket(s): * None
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose and background context
Why these changes are being introduced:
There are two main buckets (no pun intended) in which AWS credentials can fail:
The error reporting for both is poor, with opaque DuckDB or boto3 errors.
For DuckDB it's during secret construction, and makes me mention of AWS.
For boto3, it's checking that destination bucket exists, which is better
but still confusing.
How this addresses that need:
surfacing a normalized error message that something is wrong with AWS
credentials.
How can a reviewer manually see the effects of these changes?
Previously, missing or stale credentials would throw an error like this:
And incorrect credentials (e.g. wrong environment) would look like this:
With the changes, they both now look like this:
See the new tests for come commentary / explanation of how to recreate (pointing at wrong environment and/or unsetting AWS credentials completely).
Includes new or updated dependencies?
NO
Changes expectations for external applications?
NO
What are the relevant tickets?
Code review