snowflakedb / snowpark-java-scala

Snowflake Snowpark Java & Scala API
Apache License 2.0
18 stars 21 forks source link

SNOW-1735997: Changes in Session construction break services in SPCS applications #170

Open s1ck opened 1 week ago

s1ck commented 1 week ago

I was upgrading from 1.12.1 to 1.14.0 and discovered breaking behavior for our Snowpark Container Services.

The main issue is Unsupported statement type 'SHOW PARAMETERS' for services in application.

SHOW PARAMETERS is triggered due to changes that have been introduced in

https://github.com/snowflakedb/snowpark-java-scala/pull/115 https://github.com/snowflakedb/snowpark-java-scala/pull/116

When creating a session, e.g. Session.builder().appName(APP_NAME).configs(connectionParams).create();, the create method triggers a new function updateQueryTag which eventually leads to this call https://github.com/snowflakedb/snowpark-java-scala/pull/115/files#diff-906df2b68b971b63df14181fd6af77ffb9b7276fbf15d12ff45241ea20a4fd0eR375 which triggers the above error for applications within container services.

Before those changes, setting the app name just set the query_tag on the session and no query was issued.

A workaround is to not set the appName when building a session, and then call session.setQueryTag(appName).

I still think this should be considered breaking and I wonder if your integration testing should include running the SDK from within container services?

s1ck commented 1 week ago

ping @sfc-gh-fgonzalezmendez as you authored those PRs and might have more insight into expected user behavior