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

NO_SUCH_BUCKET and RESOURCE_UNAVAILABLE are not expected error types #1648

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

willdealtry
Copy link
Collaborator

We should not treat resource unavailable or no such bucket as expected S3 errors, as we might incorrectly decide that an object doesn't exist and can be newly created when in fact we've just not managed to talk to the storage to ascertain whether it's there or not.

poodlewars
poodlewars previously approved these changes Jun 26, 2024
@muhammadhamzasajjad
Copy link
Collaborator

muhammadhamzasajjad commented Jun 26, 2024

We shouldn't remove RESOURCE_NOT_FOUND. As mentioned in this issue, RESOURCE_NOT_FOUND is returned when you call HeadObject() and the key is not found. You can also see this in failing tests in the CI. This came up during my exception normalization PRs (I guess I should've left a comment explaining why RESOURCE_NOT_FOUND is swallowed).

As for NO_SUCH_BUCKET, it is kept as per what is found here. Although, we might be able remove this with some more work.

@jamesmunro jamesmunro self-requested a review June 27, 2024 08:33
Copy link
Collaborator

@jamesmunro jamesmunro left a comment

Choose a reason for hiding this comment

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

Please can we have a representative test? Something that shows the full issue and how this solves that.

Given the confusion about how these errors are used by AWS S3 SDK, I think it deserves a comment in the code as well please. Thanks.

@poodlewars poodlewars dismissed their stale review June 27, 2024 08:52

Cannot merge due to Hamza's comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants