fix: Bump decommissioned Snowflake Python UDF runtime from 3.9 to 3.10 (#6606)#6608
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6608 +/- ##
==========================================
+ Coverage 45.64% 45.86% +0.22%
==========================================
Files 412 412
Lines 48761 48763 +2
Branches 6913 6913
==========================================
+ Hits 22256 22367 +111
+ Misses 24957 24849 -108
+ Partials 1548 1547 -1
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
|
@zerafachris is it possible to make it user configurable ? |
Addresses maintainer feedback from @ntkathole on feast-dev#6608 ("is it possible to make it user configurable?") following the RUNTIME_VERSION 3.9 -> 3.10 bump for decommissioned Snowflake Python UDF runtimes (feast-dev#6606). Adds `python_udf_runtime_version` (default "3.10") to SnowflakeComputeEngineConfig, validated as a Python version string, and plumbs it through SnowflakeComputeEngine.update() via a new RUNTIME_VERSION_HOLDER placeholder in snowflake_python_udfs_creation.sql, following the same substitution pattern already used for STAGE_HOLDER and PROJECT_NAME. This way, the next time Snowflake decommissions a Python runtime, users can override the config instead of waiting on a Feast release with another hardcoded bump. Also updates snowflake_udfs.py with a note clarifying its RUNTIME_VERSION docstrings are static reference documentation of the default (not the templated value actually deployed), documents the new field in docs/reference/compute-engine/snowflake.md, and adds/updates tests covering the config default, custom override, validation, and the rendered SQL template. Signed-off-by: zerafachris <christopher.zerafa@blocklabs.io>
|
@ntkathole Good call — done. Pushed a follow-up commit (c5ae39b) that makes the Python UDF runtime version user-configurable instead of hardcoded. Added a new field batch_engine:
type: snowflake.engine
...
python_udf_runtime_version: "3.10" # optional, defaults to "3.10"
So the next time Snowflake decommissions a runtime, it's a one-line config change (e.g. |
feast-dev#6606) Snowflake decommissioned the Python 3.9 UDF runtime, so any Snowflake offline store `feast apply` that deploys the Feast materialization UDFs now fails with "Python runtime version 3.9 is decommissioned". The RUNTIME_VERSION = '3.9' value was hardcoded in the executed UDF creation SQL template (snowflake_python_udfs_creation.sql) and mirrored in the reference docstrings of snowflake_udfs.py. Both are bumped to '3.10', matching Feast's own minimum supported Python version (requires-python = ">=3.10.0" in pyproject.toml). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: zerafachris <christopher.zerafa@blocklabs.io>
Addresses maintainer feedback from @ntkathole on feast-dev#6608 ("is it possible to make it user configurable?") following the RUNTIME_VERSION 3.9 -> 3.10 bump for decommissioned Snowflake Python UDF runtimes (feast-dev#6606). Adds `python_udf_runtime_version` (default "3.10") to SnowflakeComputeEngineConfig, validated as a Python version string, and plumbs it through SnowflakeComputeEngine.update() via a new RUNTIME_VERSION_HOLDER placeholder in snowflake_python_udfs_creation.sql, following the same substitution pattern already used for STAGE_HOLDER and PROJECT_NAME. This way, the next time Snowflake decommissions a Python runtime, users can override the config instead of waiting on a Feast release with another hardcoded bump. Also updates snowflake_udfs.py with a note clarifying its RUNTIME_VERSION docstrings are static reference documentation of the default (not the templated value actually deployed), documents the new field in docs/reference/compute-engine/snowflake.md, and adds/updates tests covering the config default, custom override, validation, and the rendered SQL template. Signed-off-by: zerafachris <christopher.zerafa@blocklabs.io>
c5ae39b to
a327346
Compare
…s take effect Addresses maintainer feedback from @ntkathole on feast-dev#6608 (feast-dev#6608 (comment)): once materialization UDFs were deployed for a project, SnowflakeComputeEngine.update() short-circuited on a `SHOW USER FUNCTIONS` check, and the SQL template used `CREATE FUNCTION IF NOT EXISTS`. Together, this meant an already-deployed project's UDFs were never redeployed, so changing `python_udf_runtime_version` (e.g. after Snowflake decommissions a runtime, as in feast-dev#6606) silently left the stale runtime version in place. Removes the early-return guard and switches every UDF creation statement in snowflake_python_udfs_creation.sql from `CREATE FUNCTION IF NOT EXISTS` to `CREATE OR REPLACE FUNCTION`, so `update()` always (re)deploys the UDFs using whatever runtime version is currently configured. Adds unit tests covering that update() no longer short-circuits and that a redeploy always uses the current python_udf_runtime_version. Signed-off-by: zerafachris <christopher.zerafa@blocklabs.io>
Fixes #6606
Snowflake decommissioned the Python 3.9 UDF runtime environment as of
April 30, 2026, so any
feast applyagainst a Snowflake offline storethat deploys Feast's materialization UDFs now fails with:
Python runtime version 3.9 is decommissioned. Please update your code to Python runtime version 3.10 or later.What changed
RUNTIME_VERSION = '3.9'was hardcoded 16 times insnowflake_python_udfs_creation.sql(the SQL template actually executedagainst Snowflake by
SnowflakeComputeEngine.deploy_infra) and mirroredin the reference docstrings of
snowflake_udfs.py. Both are bumped to'3.10', matching Feast's own minimum supported Python version(
requires-python = ">=3.10.0"in pyproject.toml) and a runtimeSnowflake still supports.
Test evidence
Added
sdk/python/tests/unit/infra/utils/snowflake/test_snowflake_udfs.py,which statically asserts neither file references the decommissioned
runtime version.
Before fix:
After fix:
Full snowflake unit suite: 28 passed. Broader
sdk/python/tests/unit/infrasuite: 397 passed (1 pre-existing, unrelated environment failure due to
missing pip in the test venv).
ruff check/formatandmypyclean ontouched files.
Prepared with AI assistance (Claude, agent: claude-sonnet-5), reviewed for correctness before submission.