SNOW-3375255: Fix 3.14 UDF bugs#4196
Closed
sfc-gh-bkogan wants to merge 15 commits into
Closed
Conversation
In resolve_imports_and_packages, non-anaconda paths branched on the truthiness of `packages`, which treated an empty list the same as None. This meant passing `packages=[]` to opt out of session-level package resolution silently skipped resolution entirely, while the anaconda path consistently differentiates between None (use session defaults) and [] (use no packages). Switch to an explicit `is None` / `is not None` check so non-anaconda behavior matches the anaconda path.
The PyPI gaps in UDTF package resolution (SQL Server, Databricks) are independent of the Python version - they apply to any session whose default artifact repository is PyPI, not just Python 3.14+. Update the comment and the SnowparkClientException message to reflect that, and note that on Python <3.14 a PyPI default can still occur via an account/database/schema-level override.
The dbapi UDTF package resolution fix in this branch (dynamic package map based on the effective artifact repository) is sufficient to unblock the data source tests on Python 3.14, whose default artifact repository is PyPI. Databricks and SQL Server UDTF ingestion still fail on PyPI due to upstream package availability, but those tests already skip on IS_PY314.
These tests rely on server-side UDTF package installation from the default artifact repository. On Python 3.14 that default is PyPI, where: - databricks-sql-connector pulls in thrift, which has no 3.14 wheel and fails the server's sdist-compile policy. - msodbcsql is not published to PyPI at all. Skip the affected tests on 3.14 until the Snowflake Anaconda channel ships 3.14 builds or a PyPI-resolvable alternative exists.
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4196 +/- ##
===========================================
- Coverage 95.17% 82.57% -12.60%
===========================================
Files 171 170 -1
Lines 43788 43706 -82
Branches 7503 7504 +1
===========================================
- Hits 41674 36092 -5582
- Misses 1293 6158 +4865
- Partials 821 1456 +635 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…ogan-dbapi-package-resolution-fix
Collaborator
Author
|
not needed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-3375255
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
In resolve_imports_and_packages, non-anaconda paths branched on the truthiness of
packages, which treated an empty list the same as None. This meant passingpackages=[]to opt out of session-level package resolution silently skipped resolution entirely, while the anaconda path consistently differentiates between None (use session defaults) and [] (use no packages).Switch to an explicit
is None/is not Nonecheck so non-anaconda behavior matches the anaconda path.