-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Regression] Fix psycopg2 version install #113
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the dbt-postgres contributing guide. |
…it is not implemented
Just a naive question -- does doing this lose us anything? I assume no but worth asking as we're moving to the binary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking for commentary and possibly some more programmatic accessing of package data.
The only thing this really impacts is if you're looking for better performance out of |
|
||
PSYCOPG2_NAME=$((pip show psycopg2 || pip show psycopg2-binary) | grep Name | cut -d " " -f 2) | ||
if [[ "$PSYCOPG2_NAME" != "$PSYCOPG2_EXPECTED_NAME" ]]; then | ||
echo -e 'Expected: "$PSYCOPG2_EXPECTED_NAME" but found: "$PSYCOPG2_NAME"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: can we pipe this to stderr >&2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit, otherwise looking good
resolves #96
Problem
We broke folks who were installing
dbt-postgres
on Linux and expectingpsycopg2-binary
instead ofpsycopg2
. This is an issue becausepsycopg2
expects some OS level dependencies whereaspsycopg2-binary
does not. In particular, this broke a lot of CI workflows which traditionally run on some flavor of Linux.Solution
psycopg2-binary
everywherehatch
post-build hook that looks for the environment variableDBT_PSYCOPG2_NAME
and swaps outpsycopg2-binary
forpsycopg2
and hard pins to the same versionChecklist