argilla-io / argilla

Argilla is a collaboration tool for AI engineers and domain experts to build high-quality datasets
https://docs.argilla.io
Apache License 2.0
4k stars 378 forks source link

[BUGFIX]: argilla server: install default `psycopg2` driver used by alembic #5672

Closed frascuchon closed 2 weeks ago

frascuchon commented 2 weeks ago

Description

Alembic will use psycopy2 driver by default. We still need to install it to avoid startup errors.

Type of change

How Has This Been Tested

Checklist

frascuchon commented 2 weeks ago

Tested is working on the dev environment

jfcalvo commented 3 days ago

@frascuchon looks like psycopg aka psycopg 3 is the way to go (instead of psycopg2). It's a modern rewritten of the original psycopg2. In fact looks like all benchmarks shows that it it fast: https://www.timescale.com/blog/psycopg2-vs-psycopg3-performance-benchmark/

frascuchon commented 3 days ago

Yes. But that means changing all the default and env vars when using PostgreSQL. If no driver is defined in the SQLAlchemy database UR when using PostgreSQL, psycopg2 will be used by default, falling into a missing package error. I created this fix to avoid reverting all the dependencies upgrades included on the PR https://github.com/argilla-io/argilla/pull/5649