Skip to content

Upgrade sqlalchemy-cratedb dependency to >= 0.43.1#846

Merged
bgunebakan merged 4 commits into
mainfrom
845-upgrade-sqlalchemy-cratedb-dependency-to-0430
Jun 23, 2026
Merged

Upgrade sqlalchemy-cratedb dependency to >= 0.43.1#846
bgunebakan merged 4 commits into
mainfrom
845-upgrade-sqlalchemy-cratedb-dependency-to-0430

Conversation

@bgunebakan

Copy link
Copy Markdown
Contributor

Summary of the changes / Why this is an improvement

Checklist

@bgunebakan bgunebakan linked an issue Jun 22, 2026 that may be closed by this pull request
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 04ff6560-bf89-484b-bf1d-72f8ea8f4d5b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

In the PyMongo adapter's insert_one fast path, the cursor.execute call in insert_returning_id now passes parameters as a dict(zip(keys, data[0])) mapping instead of the raw row. The sqlalchemy-cratedb minimum version is bumped from >=0.41.0 to >=0.43.0.

PyMongo adapter pyformat compatibility

Layer / File(s) Summary
Named parameter mapping fix and dependency bump
cratedb_toolkit/adapter/pymongo/collection.py, pyproject.toml
cursor.execute in insert_returning_id now passes a {column_key: value} dict instead of the raw row, matching the pyformat paramstyle (%(col)s placeholders) introduced in crate-python 2.2.1; sqlalchemy-cratedb minimum is raised to >=0.43.0.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • crate/cratedb-toolkit#436: Directly related — that PR previously set the sqlalchemy-cratedb lower bound to >=0.41, which this PR now supersedes by raising it to >=0.43.0.

Poem

🐇 A mapping of keys, a dict born anew,
The raw row passed plainly just wouldn't do.
With pyformat in play and placeholders named,
The insert returns _id, no longer defamed.
I bumped the constraint, hopped version to .43,
And now the adapter runs happy and free! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description check ✅ Passed The description references issue #845 which is directly related to the pull request's objective of upgrading sqlalchemy-cratedb and fixing the PyMongo adapter compatibility.
Linked Issues check ✅ Passed The PR successfully addresses both objectives from issue #845: upgrading sqlalchemy-cratedb to >=0.43.0 in pyproject.toml and fixing the PyMongo adapter's parameter passing in collection.py to work with the new paramstyle format.
Out of Scope Changes check ✅ Passed All changes are directly related to the objectives in issue #845. The dependency upgrade and the parameter passing fix in the PyMongo adapter are both necessary and in-scope for resolving the compatibility regression.
Title check ✅ Passed The title accurately reflects the main change: upgrading sqlalchemy-cratedb dependency. However, it specifies >= 0.43.1 while the actual change in pyproject.toml is >= 0.43.0, creating a minor discrepancy.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 845-upgrade-sqlalchemy-cratedb-dependency-to-0430

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

Comment @coderabbitai help to get the list of available commands.

@bgunebakan

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Comment thread pyproject.toml Outdated
@amotl

amotl commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Hi there. FWIW, let me elaborate about two more test failures spotted on CI.

NLSQL woes

I've created an issue to track another single test case failure and possibly resolve it.

FAILED tests/query/test_nlsql.py::test_query_nlsql_openai

ingestr woes

Installing ingestr now seems to bail out because of stronger version constraints introduced to other packages, and this one. We advised against such strictness for better ecosystem library interoperability, but let's fix forward now: The solution on spots like outlined below (PostgreSQL integration tests and OCI building) can be to migrate from ingestr to omniload, which employs a far more relaxed dependency policy to avoid such frictions going forward.

      we can conclude that ingestr>=0.13.61,<0.15 depends on one of:
          sqlalchemy-cratedb==0.41.0
          sqlalchemy-cratedb==0.42.0.dev2

      And because cratedb-toolkit[io-ingest]==0.0.0 depends on
      ingestr>=0.13.61,<0.15 and cratedb-toolkit==0.0.0 depends on
      sqlalchemy-cratedb>=0.43.0, we can conclude that cratedb-toolkit==0.0.0
      and cratedb-toolkit[io-ingest]==0.0.0 are incompatible.
      And because only cratedb-toolkit[io-ingest]==0.0.0 is available and
      you require cratedb-toolkit[io-ingest], we can conclude that your
      requirements are unsatisfiable.

@bgunebakan bgunebakan force-pushed the 845-upgrade-sqlalchemy-cratedb-dependency-to-0430 branch from 39042f5 to 98397e4 Compare June 23, 2026 09:54
@bgunebakan bgunebakan changed the title Upgrade sqlalchemy-cratedb dependency to >= 0.43.0 Upgrade sqlalchemy-cratedb dependency to >= 0.43.1 Jun 23, 2026
@bgunebakan

Copy link
Copy Markdown
Contributor Author

ingestr woes

Installing ingestr now seems to bail out because of stronger version constraints introduced to other packages, and this one. We advised against such strictness for better ecosystem library interoperability, but let's fix forward now: The solution on spots like outlined below (PostgreSQL integration tests and OCI building) can be to migrate from ingestr to omniload, which employs a far more relaxed dependency policy to avoid such frictions going forward.

      we can conclude that ingestr>=0.13.61,<0.15 depends on one of:
          sqlalchemy-cratedb==0.41.0
          sqlalchemy-cratedb==0.42.0.dev2

      And because cratedb-toolkit[io-ingest]==0.0.0 depends on
      ingestr>=0.13.61,<0.15 and cratedb-toolkit==0.0.0 depends on
      sqlalchemy-cratedb>=0.43.0, we can conclude that cratedb-toolkit==0.0.0
      and cratedb-toolkit[io-ingest]==0.0.0 are incompatible.
      And because only cratedb-toolkit[io-ingest]==0.0.0 is available and
      you require cratedb-toolkit[io-ingest], we can conclude that your
      requirements are unsatisfiable.

CrateDB-toolkit uses really old ingestr version >=0.13.61,<0.15, latest stable version is 1.0.39. I think better approach would be updating ingestr and support their latest stable version other than migrating completely new package.

@bgunebakan bgunebakan merged commit cc3162f into main Jun 23, 2026
26 of 31 checks passed
@bgunebakan bgunebakan deleted the 845-upgrade-sqlalchemy-cratedb-dependency-to-0430 branch June 23, 2026 11:49
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.

Upgrade sqlalchemy-cratedb dependency to >0.43.1

4 participants