Skip to content

fix: Bump decommissioned Snowflake Python UDF runtime from 3.9 to 3.10 (#6606)#6608

Open
zerafachris wants to merge 4 commits into
feast-dev:masterfrom
zerafachris:fix/snowflake-udf-decommissioned-runtime-version
Open

fix: Bump decommissioned Snowflake Python UDF runtime from 3.9 to 3.10 (#6606)#6608
zerafachris wants to merge 4 commits into
feast-dev:masterfrom
zerafachris:fix/snowflake-udf-decommissioned-runtime-version

Conversation

@zerafachris

Copy link
Copy Markdown

Fixes #6606

Snowflake decommissioned the Python 3.9 UDF runtime environment as of
April 30, 2026, so any feast apply against a Snowflake offline store
that 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 in
snowflake_python_udfs_creation.sql (the SQL template actually executed
against Snowflake by SnowflakeComputeEngine.deploy_infra) 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) and a runtime
Snowflake 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:

test_udf_creation_sql_does_not_use_decommissioned_runtime_version FAILED
test_udf_module_docstrings_do_not_reference_decommissioned_runtime_version FAILED
(AssertionError: ... still requests the decommissioned Snowflake Python runtime '3.9')

After fix:

test_udf_creation_sql_does_not_use_decommissioned_runtime_version PASSED
test_udf_module_docstrings_do_not_reference_decommissioned_runtime_version PASSED

Full snowflake unit suite: 28 passed. Broader sdk/python/tests/unit/infra
suite: 397 passed (1 pre-existing, unrelated environment failure due to
missing pip in the test venv). ruff check/format and mypy clean on
touched files.

Prepared with AI assistance (Claude, agent: claude-sonnet-5), reviewed for correctness before submission.

@zerafachris
zerafachris requested a review from a team as a code owner July 16, 2026 18:08
@codecov-commenter

codecov-commenter commented Jul 16, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.86%. Comparing base (f487b37) to head (0a3db47).
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
go-feature-server 30.58% <ø> (ø)
python-unit 47.16% <100.00%> (+0.24%) ⬆️
Files with missing lines Coverage Δ
...nfra/compute_engines/snowflake/snowflake_engine.py 46.47% <100.00%> (+46.47%) ⬆️
...t/infra/utils/snowflake/snowpark/snowflake_udfs.py 0.00% <ø> (ø)

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f487b37...0a3db47. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ntkathole

Copy link
Copy Markdown
Member

@zerafachris is it possible to make it user configurable ?

zerafachris added a commit to zerafachris/feast that referenced this pull request Jul 17, 2026
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>
@zerafachris

Copy link
Copy Markdown
Author

@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 python_udf_runtime_version to SnowflakeComputeEngineConfig (the batch_engine config, alongside account, warehouse, database, etc.):

batch_engine:
  type: snowflake.engine
  ...
  python_udf_runtime_version: "3.10"  # optional, defaults to "3.10"
  • Defaults to "3.10" (matching Feast's own requires-python = ">=3.10.0" floor), so no config change is needed for existing users picking up this PR.
  • Validated as a Python version string (e.g. "3.10" or "3.11.2") — an invalid value raises a clear ValidationError instead of failing later as an opaque Snowflake SQL error.
  • Plumbed through to the executed SQL the same way PROJECT_NAME/STAGE_HOLDER already are: snowflake_python_udfs_creation.sql now uses a RUNTIME_VERSION_HOLDER placeholder, which SnowflakeComputeEngine.update() fills in from python_udf_runtime_version at deploy time.

So the next time Snowflake decommissions a runtime, it's a one-line config change (e.g. python_udf_runtime_version: "3.11") rather than another hardcoded-value PR. Also documented in docs/reference/compute-engine/snowflake.md, and added tests covering the default, a custom override, invalid-value validation, and the rendered SQL template.

zerafachris and others added 2 commits July 17, 2026 15:01
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>
@ntkathole
ntkathole force-pushed the fix/snowflake-udf-decommissioned-runtime-version branch from c5ae39b to a327346 Compare July 17, 2026 09:31
zerafachris and others added 2 commits July 18, 2026 16:50
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snowflake offline store provider uses decommissioned Python 3.9 runtime, blocking feast apply

3 participants