SNOW-1855886: HTTP 404 when Config.Account field includes us-west-2 region #1275
Labels
enhancement
The issue is a request for improvement or a new feature
status-fixed_awaiting_release
The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector.
status-triage_done
Initial triage done, will be further handled by the driver team
What version of GO driver are you using?
v1.11.2
What operating system and processor architecture are you using?
Linux, amd64
What version of GO are you using?
1.23.2
Server version:
8.46.1
What did you do?
Attempted to connect to a Snowflake instance located in the
us-west-2
region by specifying an Account field in the Config struct that included the.us-west-2
as the region, and then connect via NewConnector:This prints an error like the following (even with otherwise valid configuration parameters):
You can see that
us-west-2
appears in the URL (whereas it's not supposed to).If I omit
.us-west-2
from the Account field, it works.What did you expect to see?
I expected to be able to connect to my Snowflake instance successfully, even when the Account field included
.us-west-2
.The problem appears to be due to the fact that
us-west-2
is a special region, and is not supposed to be included in the URL, like other regions. There is already some existing logic in place to handle this in the DSN code path when the region is provided via theRegion
field (see here). However, there is no such logic when the region is included as part of theAccount
field, or when connecting directly via theNewConnector
code path (without creating a DSN).I would expect
us-west-2
to always be stripped out if provided, and to not appear in the full URL that gets generated. This is how at least some of the other Snowflake drivers work. For instance, see here in the NodeJS driver - and note that this logic is called after the region is parsed out of the account field, meaning that the region is always correctly stripped out if it'sus-west-2
, and never appears in the URL. This disparity between driver implementations makes this particularly confusing, because a working config in one language can be broken (with a very confusing error message) in another language.Can you set logging to DEBUG and collect the logs?
N/A.
The text was updated successfully, but these errors were encountered: