Skip to content

Allow SQLAlchemy 2.1 in Snowflake provider on Python 3.14+ - #76705

Merged
vincbeck merged 3 commits into
apache:mainfrom
Dev-iL:2611/snowflake-sqla21
Nov 21, 2026
Merged

vincbeck merged 3 commits into
apache:mainfrom
Dev-iL:2611/snowflake-sqla21

Conversation

@Dev-iL

@Dev-iL Dev-iL commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

The Snowflake provider's global sqlalchemy<2.1 cap keeps constraints on SQLAlchemy 2.0 even though a compatible Snowflake dialect is now available. Require snowflake-sqlalchemy>=2.1.0 and snowflake-connector-python>=5.1.0 on Python 3.14+, and allow SQLAlchemy 2.1 there. The updated lock resolves SQLAlchemy 2.1.8 for those interpreters.

Python 3.11–3.13 retain the cap: Snowpark requires connector <5, while the compatible dialect needs connector >=5.1. This preserves Snowpark support on Python 3.11–3.13 and Airflow 2.11 compatibility. Current Snowpark releases cannot be installed alongside this provider on Python 3.14+: their connector <5 requirement conflicts with the new >=5.1 floor. Broader support remains tracked in #75118; this PR addresses the Python 3.14+ portion.

Validation:

  • Python 3.14 Breeze, isolated lowest-direct Snowflake dependencies: 723 passed, 7 skipped, with boto3==1.43.6. Snowflake now declares boto3 as a development dependency so isolated syncs retain the AWS WIF test SDK.
  • Python 3.14 Breeze, synchronized from the updated lock: Snowflake provider unit tests and common SQL operator tests — 962 passed, 10 skipped. This includes Snowflake hook URI handling and OpenLineage event tests. Skips cover unavailable Snowpark and PostgreSQL/MySQL-only cases.
  • The four agent-framework checks listed by breeze verify, using the updated lock on Python 3.14: Strands 212 passed, Google ADK 177 passed, OpenAI Agents 263 passed, LlamaIndex 207 passed; other frameworks' tests skip in each isolated run.
  • Fast and manual static checks pass, including generated provider metadata, documentation tables, and lock consistency.
  • Snowflake documentation HTML and spelling checks pass with Pagefind indexing disabled (pagefind_enabled=0); the default local build stalls at search indexing.

Was generative AI tooling used to co-author this PR?
  • Yes — Codex (GPT-6)

Generated-by: Codex (GPT-6) following the guidelines

@boring-cyborg boring-cyborg Bot added area:providers kind:documentation provider:snowflake Issues related to Snowflake provider labels Nov 8, 2026
@github-actions github-actions Bot added the fork ci required Gated by AIP-120: CI must pass in the contributor's fork. Managed by the fork CI reconciler. label Nov 8, 2026
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Fork CI: green. CI for the latest commit passed in your fork. The pull request is ready for maintainer review.

Pull requests from contributors run their CI in the contributor's own fork. GitHub Actions is free and has no minute limit on public forks, while the CI capacity of the Apache Software Foundation is shared by every ASF project and is finite.

Fork CI tested this branch merged with main at 7055657e80, as project CI would, 16 commits behind main when the run turned green.

Latest run: https://github.com/Dev-iL/airflow/actions/runs/44781394721

How this works: CI in your fork.


This comment was posted automatically by the fork CI monitor from templates drafted with an AI-assisted tool, so it may contain mistakes. An Apache Airflow maintainer, a real person, will review the pull request once its fork CI is green. Why the first pass is automated.

@Dev-iL
Dev-iL marked this pull request as ready for review November 12, 2026 18:42
@Dev-iL
Dev-iL requested a review from potiuk as a code owner November 12, 2026 18:42
@github-actions github-actions Bot added the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label Nov 12, 2026
@Dev-iL
Dev-iL force-pushed the 2611/snowflake-sqla21 branch from edc2105 to 5afbcd9 Compare November 12, 2026 21:47
@github-actions github-actions Bot added ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. and removed ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. labels Nov 12, 2026
@Dev-iL
Dev-iL force-pushed the 2611/snowflake-sqla21 branch from 5afbcd9 to 22b5eec Compare November 15, 2026 18:30
@github-actions github-actions Bot added ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. and removed ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. labels Nov 15, 2026
@kaxil kaxil added the full tests needed We need to run full set of tests for this PR to merge label Nov 16, 2026
@kaxil
kaxil force-pushed the 2611/snowflake-sqla21 branch from 22b5eec to c07962f Compare November 16, 2026 13:13

@kaxil kaxil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The change looks right to me, but I'd like a full run on 3.14 before we merge. The earlier fork CI only built the 3.11 image and skipped every core and provider test job, and on 3.11 this PR changes nothing. With the new lock, 3.14 resolves SQLAlchemy 2.1.8 for the whole workspace, so core gets 2.1 there too, not just Snowflake. full tests needed alone still runs on 3.11 only, so this needs latest versions only (or all versions) as well.

Comment thread providers/snowflake/pyproject.toml Resolved
Comment thread providers/snowflake/pyproject.toml Resolved
Comment thread providers/snowflake/docs/changelog.rst Resolved
@github-actions github-actions Bot removed the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label Nov 16, 2026
@Dev-iL Dev-iL added the all versions If set, the CI build will be forced to use all versions of Python/K8S/DBs label Nov 16, 2026

@kaxil kaxil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving. I ran it end to end on 3.14 with SQLAlchemy 2.1.8: CeleryExecutor with a db+postgresql:// result backend and no psycopg2, plus a Snowflake Dag through SQLExecuteQueryOperator, get_sqlalchemy_engine() and pandas.read_sql. It all worked. The inline comments aren't blockers, but please take a look at them. Let's merge once the all-versions run is green.

@kaxil
kaxil enabled auto-merge (squash) November 16, 2026 15:03
auto-merge was automatically disabled November 16, 2026 18:04

Head branch was pushed to by a user without write access

@github-actions github-actions Bot added the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label Nov 16, 2026
@Dev-iL Dev-iL self-assigned this Nov 17, 2026
Comment thread providers/snowflake/pyproject.toml Resolved
@Dev-iL
Dev-iL force-pushed the 2611/snowflake-sqla21 branch from 1d55c02 to 3a5b2ef Compare November 19, 2026 21:21
@github-actions github-actions Bot removed the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label Nov 19, 2026
Comment thread providers/snowflake/pyproject.toml Resolved
Comment thread providers/snowflake/pyproject.toml Resolved
@Dev-iL
Dev-iL force-pushed the 2611/snowflake-sqla21 branch from 3a5b2ef to 334dfc8 Compare November 20, 2026 11:00
The compatible Snowflake dialect requires connector 5.1, while Snowpark still caps the connector below 5. Keep the older Python environments compatible with Snowpark and enable the newer dialect where Snowpark is already excluded.
Users who install Snowpark separately need to know its connector cap conflicts with the SQLAlchemy 2.1-compatible dialect. The installation guidance belongs with the operator prerequisites; the release manager owns the next changelog version.
Isolated lowest-dependency syncs remove undeclared boto3, preventing collection of the AWS workload identity federation tests.
@Dev-iL
Dev-iL force-pushed the 2611/snowflake-sqla21 branch from 334dfc8 to 0fa61e2 Compare November 20, 2026 17:14
@vincbeck
vincbeck enabled auto-merge (squash) November 20, 2026 18:49
@github-actions github-actions Bot added the ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green. label Nov 21, 2026
@vincbeck
vincbeck merged commit 7da6645 into apache:main Nov 21, 2026
10 checks passed
@Dev-iL
Dev-iL deleted the 2611/snowflake-sqla21 branch November 21, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

all versions If set, the CI build will be forced to use all versions of Python/K8S/DBs area:providers fork ci required Gated by AIP-120: CI must pass in the contributor's fork. Managed by the fork CI reconciler. full tests needed We need to run full set of tests for this PR to merge kind:documentation provider:snowflake Issues related to Snowflake provider ready for maintainer review Set by triage when all criteria pass, or by the fork CI reconciler when fork CI is green.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants