-
Notifications
You must be signed in to change notification settings - Fork 873
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
Opaque retry errors make debugging difficult #5923
Comments
I believe the error will be returned once the max retries is exceeded, but I don't see any issue with making the log more verbose. I would, however, suggest you adopt a slightly less pejorative tone. |
Oh, uh, apologies. I'm not really sure what got interpreted as pejorative in there but it definitely wasn't intended! Anyways, the only error I get back when max retries is exceeded is
The information I needed to troubleshoot was the fact that there was an invalid certificate. This is what I got out of printing
|
I was referring to "Users shouldn't have to fork and patch the repo to discover why their requests are failing".
Generally it is considered best practice to either include an error as a Now we blur this a little in some places for ergonomics reasons, but in general we want to leave it up to the caller to decide the level of verbosity they want.
Did you try enabling more verbose logging? Hyper is quite chatty at the debug and trace levels and I would have expected it to provide further context on this? Perhaps we just need to better document how to get more verbose logging information out of |
Sorry again -- was not intending this to be pejorative.
So a (very simplified) version of my code looks like this:
Is your suggestion here that instead of falling back to the try operator (
Yes, the logs that I included in the original comment are with DEBUG logging enabled. I guess I didn't specifically try bumping it to trace level, but I think what I expect as a user is that if there is an explicit error, there is (hopefully) enough information in the error logs to understand what caused the error. |
Ok so I'm a dumbass. After a bunch more investigation, I discovered that what I thought was happening (that I posted above) is not actually what was happening, there was another lib sitting inbetween that was swallowing the anyhow:: chain. This wasn't at all obvious to me (in part because I didn't understand about the anyhow chain behaviour), but this doesn't seem like an issue with object_store. Very sorry to waste your time on this, I will close the issue :( |
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
I am trying to use object_store to write to the three major cloud provider storage solutions; when the
put
request fails (or, I assume, any other request), it enters a retry loop that looks like the following (with debug logs enabled):There's no indication in there as to what actually went wrong or how to fix it. The only way I was able to get the needed information was by hacking my own fork of object_store that printed out the raw error message, and then I discovered that the Docker container I was running in didn't have the needed certificates installed.
Describe the solution you'd like
Users shouldn't have to fork and patch the repo to discover why their requests are failing. Can we add more logging output around retries?
Additional context
I'm happy to submit a PR for this but I've seem some (I think related) issues that have been closed or suggest that the current behaviour is as expected, so wanted to submit the issue first and make sure that folks agree about the proposed fix.
Related links: #5345, #5607, #5013
The text was updated successfully, but these errors were encountered: