Title: fix(snowflake): Stop double-quoting connection identifiers by jials · Pull Request #6462 · feast-dev/feast · GitHub
Open Graph Title: fix(snowflake): Stop double-quoting connection identifiers by jials · Pull Request #6462 · feast-dev/feast
X Title: fix(snowflake): Stop double-quoting connection identifiers by jials · Pull Request #6462 · feast-dev/feast
Description: What this PR does / why we need it: GetSnowflakeConnection was wrapping role, warehouse, database, and schema_ in literal double quotes before passing them to snowflake.connector.connect(...): for k, v in kwargs.items(): if k in ["role", "warehouse", "database", "schema_"]: kwargs[k] = f'"{v}"' That code was based on a misunderstanding of how the connector handles these kwargs. Tracing the connector source confirms they never reach a SQL USE WAREHOUSE statement - they go through a different path entirely: snowflake/connector/auth/_auth.py:244-254 packs them into URL query parameters (databaseName, schemaName, warehouse, roleName) for the login REST endpoint, via urlencode(...). snowflake/connector/connection.py:1684 stores them verbatim on the connection object. connection.py:1940-1946 reads the server-resolved finalWarehouseName / finalDatabaseName / ... back from the login response. There is no client-side SQL parsing or identifier folding. So feast's f'"{v}"' wrapping caused the connector to send a percent-encoded "MY_WH" to the login endpoint, where the server tried to match a warehouse literally named "MY_WH" (with quote characters) and failed. The official Python connector docs accordingly show all four parameters as plain unquoted strings. Removing the wrapping lets the documented contract hold: users put the warehouse/role/database/schema name in their feature_store.yaml exactly as Snowflake stores it, and the connector forwards it unmodified. Which issue(s) this PR fixes: Re-fixes the bug originally reported in #2595 ("Snowflake has connection issues") and previously attempted in #2601 ("fix: Remove extra quoting in snowflake python connection"). PR #2601 was closed in 2022 because the author couldn't reproduce after resetting their environment, and the maintainer's defense at the time - that Snowflake uses quoted-identifier syntax - was conflating SQL identifier rules with REST login-parameter handling. The connector source above shows those are entirely separate paths. Checks I've made sure the tests are passing. My commits are signed off (git commit -s) My PR title follows conventional commits format Testing Strategy Unit tests Integration tests Manual tests Testing is not required for this change
Open Graph Description: What this PR does / why we need it: GetSnowflakeConnection was wrapping role, warehouse, database, and schema_ in literal double quotes before passing them to snowflake.connector.connect(...): for ...
X Description: What this PR does / why we need it: GetSnowflakeConnection was wrapping role, warehouse, database, and schema_ in literal double quotes before passing them to snowflake.connector.connect(...): for ...
Opengraph URL: https://github.com/feast-dev/feast/pull/6462
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:df95a099-7392-4ddf-b8d9-b9ba941ebb1e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AA7A:381ACD:1B0DDDB:258E972:6A501343 |
| html-safe-nonce | 0d6663bd1e88b2c53bd6826f698a7786a504b6a22f39952b2c45d11c4d77e807 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTdBOjM4MUFDRDoxQjBERERCOjI1OEU5NzI6NkE1MDEzNDMiLCJ2aXNpdG9yX2lkIjoiODM1NDQwNjg3MjI2MjkwNjY5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f70cfb84ff9befe78a72a7f80470c585db2c2a00c5254f33475b4cb63abf4853 |
| hovercard-subject-tag | pull_request:3785363232 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/feast-dev/feast/pull/6462/files |
| twitter:image | https://avatars.githubusercontent.com/u/5955220?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/5955220?s=400&v=4 |
| og:image:alt | What this PR does / why we need it: GetSnowflakeConnection was wrapping role, warehouse, database, and schema_ in literal double quotes before passing them to snowflake.connector.connect(...): for ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fe4f38b24922a1ce81c1708c3793b47c185599b9144ab94f6ca846b00698058d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/feast-dev/feast git https://github.com/feast-dev/feast.git |
| octolytics-dimension-user_id | 57027613 |
| octolytics-dimension-user_login | feast-dev |
| octolytics-dimension-repository_id | 161133770 |
| octolytics-dimension-repository_nwo | feast-dev/feast |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 161133770 |
| octolytics-dimension-repository_network_root_nwo | feast-dev/feast |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 42b6390c91978a16f9196c38c7a00e9bf21f37e7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width