Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

frascuchon
Copy link
Member

Description

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

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

Checklist

  • I added relevant documentation
  • I followed the style guidelines of this project
  • I did a self-review of my code
  • I made corresponding changes to the documentation
  • I confirm My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have added relevant notes to the CHANGELOG.md file (See https://keepachangelog.com/)

@frascuchon frascuchon requested a review from jfcalvo November 5, 2024 15:34
@frascuchon
Copy link
Member Author

Tested is working on the dev environment

@frascuchon frascuchon merged commit 74ec465 into develop Nov 6, 2024
6 checks passed
@frascuchon frascuchon deleted the bugfixes/argilla-server/prevent-migration-errors-with-posgtgresql branch November 6, 2024 08:45
@jfcalvo jfcalvo changed the title [BUGFIX]: argilla server: install default psycopy2 driver used by alembic [BUGFIX]: argilla server: install default psycopg2 driver used by alembic Nov 18, 2024
@jfcalvo
Copy link
Member

jfcalvo commented Nov 18, 2024

@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
Copy link
Member Author

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 #5649

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