You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide actionable feedback when internal operations are failing rather than silently retrying for over 10mins #346
To all intents and purposes the library has hung - there is no feedback that the operation is failing and being retried multiple times or any indication of why it is failing.
Maybe this issue is more of a request for better feedback in the case of failing HTTP operations.
changed the title [-]Set appropriate timeouts[/-][+]Provide actionable feedback when internal operations are failing rather than silently retrying for over 10mins[/+]on Feb 4, 2024
Do you know what kind of Thrift request is being sent that results in this 403 failing with the 403? Is it an OpenSession?
there is no feedback that the operation is failing and being retried multiple times or any indication of why it is failing.
Is this true even when you have your log level set at DEBUG? urllib3 and databricks-sql-connector both emit debug messages when they determine a request is retry-able.
Adding this to your script will help with the repro:
Yeah, generally a 403 should halt everything since authentication errors are by-nature not recoverable. The DBX team should investigate. Likely the fix will be an additional conditional check added to the should_retry() method in DatabricksRetryPolicy.
however, I don't think users should have to (know how to) configure logging to get critical usage information from the library. The library should not appear to hang indefinitely without providing any feedback/information to the user.
In this particular case, I don't think the library should be responsible for retries at all - just raise an exception and let the user decide how best to handle the error. Certainly, indefinitely retrying a 403 isn't going to lead to success.
FWIW, chiming it to say that I hit the same issue (invalid token), can see exactly the same output from urllib3 (after setting the log level appropriatley) and was similarly stymied for an hour by the apparently-hung process. Failing loudly on 403 seems like the right solution here.
Activity
dhirschfeld commentedon Feb 4, 2024
To all intents and purposes the library has hung - there is no feedback that the operation is failing and being retried multiple times or any indication of why it is failing.
Maybe this issue is more of a request for better feedback in the case of failing HTTP operations.
dhirschfeld commentedon Feb 4, 2024
The 403 is pretty fishy.
Debugging a bit further I can see the token being passed in the headers:
The token being passed is the same as my default environment variable:
BUT in my calling script I explicitly set the correct token to use:
...so it seems the token is somehow not being picked up?
[-]Set appropriate timeouts[/-][+]Provide actionable feedback when internal operations are failing rather than silently retrying for over 10mins[/+]susodapop commentedon Feb 8, 2024
Do you know what kind of Thrift request is being sent that results in this 403 failing with the 403? Is it an
OpenSession?Is this true even when you have your log level set at
DEBUG?urllib3anddatabricks-sql-connectorboth emit debug messages when they determine a request is retry-able.Adding this to your script will help with the repro:
Yeah, generally a 403 should halt everything since authentication errors are by-nature not recoverable. The DBX team should investigate. Likely the fix will be an additional conditional check added to the
should_retry()method inDatabricksRetryPolicy.dhirschfeld commentedon Feb 23, 2024
Circling back since I just hit this again. If I configure logging like:
I do get some feedback! 🎉
dhirschfeld commentedon Feb 23, 2024
however, I don't think users should have to (know how to) configure logging to get critical usage information from the library. The library should not appear to hang indefinitely without providing any feedback/information to the user.
In this particular case, I don't think the library should be responsible for retries at all - just raise an exception and let the user decide how best to handle the error. Certainly, indefinitely retrying a 403 isn't going to lead to success.
andrew-christianson commentedon Feb 28, 2024
FWIW, chiming it to say that I hit the same issue (invalid token), can see exactly the same output from urllib3 (after setting the log level appropriatley) and was similarly stymied for an hour by the apparently-hung process. Failing loudly on 403 seems like the right solution here.