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

rsc: Log failures to upload blob #1623

Merged
merged 2 commits into from
Aug 5, 2024
Merged

rsc: Log failures to upload blob #1623

merged 2 commits into from
Aug 5, 2024

Conversation

V-FEXrt
Copy link
Contributor

@V-FEXrt V-FEXrt commented Aug 5, 2024

We've observed blob uploads that silently failed which caused a delay is response time. This updates the POST /blob route to log an error when blob upload fails for some reason

Copy link
Contributor

@colinschmidt colinschmidt left a comment

Choose a reason for hiding this comment

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

It seems like there is still one more failure case we aren't logging anything for in the multipart section. Otherwise looks good.

@V-FEXrt
Copy link
Contributor Author

V-FEXrt commented Aug 5, 2024

Ah that's intentional. That only happens when the client make a bad request, its nothing related to the server.

My thought there was that we shouldn't allow a misbehaving client to spam GBs of data into the server logs

@colinschmidt
Copy link
Contributor

Ah that's intentional. That only happens when the client make a bad request, its nothing related to the server.

My thought there was that we shouldn't allow a misbehaving client to spam GBs of data into the server logs

So that error would show up in the client log? If so thats ok.

@V-FEXrt
Copy link
Contributor Author

V-FEXrt commented Aug 5, 2024

So that error would show up in the client log? If so thats ok.

Yep. It's pretty much a "client developer only" error because its the kind of thing that once you get it right the code never changes and you never hit that failure case again. Its the same kind of error as checking the shape of the POST'd JSON. You might have the client shape wrong a few times during development but once you get the shape right its always correct until the server changes it

@V-FEXrt V-FEXrt merged commit 2e0c2d0 into master Aug 5, 2024
10 checks passed
@V-FEXrt V-FEXrt deleted the rsc-blob-log-error branch August 5, 2024 18:19
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.

2 participants