-
Notifications
You must be signed in to change notification settings - Fork 119
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
Context not respected for Ping command #138
Comments
Thanks for filing an issue. I'll look into this tomorrow morning or earlier. |
It appeared the driver method Anyway I believe the goal here is when an invalid account name is specified, how quickly connection failure can be detected and raises an error to the user, right? I see the issue is LoginTimeout is not honored if it is less than 60 seconds and the connection hangs. But I get 403 back as soon as it founds the endpoint doesn't exist, e.g., https://foobar-somewhere.snowflakecomputing.com/, so LoginTimeout works. Do you experience something different to me? such as hanging and waiting for 60 seconds on every connection failure? |
@smtakeda as described in my code sample, the As far as what to do for an invalid account, I agree with you that it would be much preferred that we identify that condition much more quickly as it's currently indistinguishable from a network error. |
Thanks for confirmation. At the moment, I cannot do much for the behavior of Ping with context due to what I discovered. But the driver could raise an error as soon as HTTP 403 is returned in authentication. The only reason why the driver retries for 403 is because AWS S3 endpoints sometimes return 403 and retry often works, but since the authentication won't involve AWS S3 endpoints, I believe it should be fine. Working on the fix. |
@dominicbarnes can you please try the latest code? e1f17ec |
The changes worked great! Thank you very much, I don't think this fix is necessary anymore. |
Issue description
If you try to ping a non-existent Snowflake account, you just get an HTTP timeout after about 60s. This is pretty long, and there is
Config.LoginTimeout
which cancels the HTTP request after another duration.However, if you use a
Context
that expires, this does not get respected byPingContext
and theLoginTimeout
(if specified) or the raw HTTP timeout gets triggered instead.Example code
Configuration
Driver version (or git SHA): 1.1.2
Go version:
go version go1.9.2 linux/amd64
The text was updated successfully, but these errors were encountered: