Skip to content

fix(snowflake): require snowflake-snowpark-python>=1.0.0 - #6242

Merged
mday-io merged 1 commit into
SQLMesh:mainfrom
mday-io:fix/snowflake-snowpark-floor
Nov 23, 2026
Merged

mday-io merged 1 commit into
SQLMesh:mainfrom
mday-io:fix/snowflake-snowpark-floor

Conversation

@mday-io

@mday-io mday-io commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

engine-tests-cloud (snowflake) has failed on every main run since 2026-11-04. The last pass was c4dbac499 on 11-02, and the first failure was 3fea21eaa. The errors are:

  • test_snowpark_concurrency: ModuleNotFoundError: No module named 'snowflake.connector.options'
  • every [df-snowpark] case: AttributeError: 'NoneType' object has no attribute 'create_dataframe'

Cause

snowflake-connector-python 5.2.0 was released on 2026-11-04. Every snowflake-snowpark-python 1.x pins snowflake-connector-python<5. Nothing sets a floor on Snowpark, so the resolver keeps connector 5.2.0 and falls back to snowflake-snowpark-python==0.12.0, the only release without a connector cap. That release imports snowflake.connector.options, which connector 5 removed, so the Snowpark session is None. The CI install log for job 137528636670 shows snowflake-connector-python==5.2.0 with snowflake-snowpark-python==0.12.0.

This isn't limited to CI. A fresh resolve of the snowflake extra produces the same pair, so pip install sqlmesh[snowflake] users get a broken Snowpark.

Fix

Require snowflake-snowpark-python>=1.0.0 in the snowflake extra. The non-Snowpark Snowflake tests passed on connector 5.2.0, so the connector itself stays uncapped.

Verification

  • uv pip compile of the extra's requirements:
    • before: snowflake-connector-python==5.2.0, snowflake-snowpark-python==0.12.0
    • after: snowflake-connector-python==4.8.1, snowflake-snowpark-python==1.58.0
  • CI's two-step install (connector 5.2.0 already installed, then the extra added) downgrades to connector 4.8.1 and Snowpark 1.58.0, and both packages import.
  • The cloud job only runs on main, so the first main run after merge is what proves the fix.

Summary by CodeRabbit

  • Chores
    • The optional Snowflake integration now requires Snowpark Python version 1.0.0 or later. Installations using an older version may need to upgrade to continue using this integration.

snowflake-connector-python 5.x (5.2.0 released 2026-11-04) is not
installable alongside any snowflake-snowpark-python 1.x, which all pin
connector<5. With no floor on snowpark, resolvers keep connector 5.x and
fall back to snowpark 0.12.0, the only release without a connector cap.
That release imports snowflake.connector.options, which no longer exists,
so the Snowpark session is None.

This broke engine-tests-cloud (snowflake) on main from 2026-11-04 and
affects a fresh `pip install sqlmesh[snowflake]` the same way. A floor of
1.0.0 makes the resolver pick connector 4.x with a current Snowpark.

Signed-off-by: mday-io <mdaytn@gmail.com>
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Snowflake optional dependency now requires snowflake-snowpark-python>=1.0.0.

Changes: Snowflake optional dependency

Layer / File(s) Summary
Set the Snowpark minimum version
pyproject.toml
The Snowflake extra now requires snowflake-snowpark-python>=1.0.0.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: hdm-db2-eco-system, stuffbyyuki

Merge Risk: Minimal · up to e61b1

This change adds a minimum Snowpark version to the Snowflake extra so dependency resolution avoids pairing an incompatible old Snowpark with a newer connector. It is a low-risk dependency constraint, and no merge-blocking concerns remain.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: the snowflake extra now requires snowflake-snowpark-python>=1.0.0. The diff is a one-line pyproject.toml change that does exactly this, so the title matches the main change…
Description check Passed The description covers the problem, root cause, fix, and verification. It gives the failing CI job, error messages, the connector and Snowpark versions before and after the change, and the reason the …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: the snowflake extra now requires snowflake-snowpark-python>=1.0.0. The diff is a one-line pyproject.toml change that does exactly this, so the title matches the main change. It uses the conventional fix(snowflake) prefix and is specific enough for a teammate scanning history.

Full details: Description check

Explanation

The description covers the problem, root cause, fix, and verification. It gives the failing CI job, error messages, the connector and Snowpark versions before and after the change, and the reason the connector stays uncapped. It does not follow the repository template exactly: the Checklist section is missing, and the Test Plan content sits under a Verification heading. Those are the required structural gaps. The author also does not state whether tests were added, and the checklist items (make style, DCO sign-off) are not confirmed.

Resolution

Add the repository template's Checklist section, with each item checked or explained. Confirm that make style was run, that tests were added or are not applicable, that make fast-test passed, and that commits are signed off with git commit -s. Optionally rename the Verification section to Test Plan to match the template.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
Fix failing CI checks

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 45b3bff0-912e-47ec-95e9-48722a01aa4a
Commits

Reviewing files that changed from the base of the PR and between c4d7513 and e61b104.

Files selected for processing: 1

  • pyproject.toml

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

@StuffbyYuki StuffbyYuki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved though one ci test failed

@mday-io
mday-io merged commit 9e854d9 into SQLMesh:main Nov 23, 2026
72 of 73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants