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

[Regression] Installing psycopg2-binary instead of psycopg2 #50

Closed
2 tasks done
mikealfare opened this issue Apr 4, 2024 · 1 comment · Fixed by dbt-labs/dbt-core-bundles#139 or #60
Closed
2 tasks done
Assignees

Comments

@mikealfare
Copy link
Contributor

mikealfare commented Apr 4, 2024

Is this a regression?

  • I believe this is a regression in functionality
  • I have searched the existing issues, and I could not find an existing issue for this regression

Current Behavior

dbt-postgres>=1.8.0b2 is installing psycopg2-binary when DBT_PSYCOPG2_NAME=psycopg2 and installing from PyPI

Expected/Previous Behavior

dbt-postgres should build using psycopg2 for all versions on PyPI when the environment variable DBT_PSYCOPG2_NAME=psycopg2 exists.

Steps To Reproduce

Run:

DBT_PSYCOPG2_NAME=psycopg2 pip install dbt-postgres==1.8.0b2
pip list

Notice that psycopg2-binary is installed (in addition to psycopg2). This happens even if the --no-binary dbt-postgres flag is provided, which downloads the source distribution instead of the wheel.

Environment

  • OS: linux/macos
  • Python: 3.8
  • dbt-postgres (working version): 1.8.0b1
  • dbt-postgres (regression version): 1.8.0b2

Additional Notes

Run:

DBT_PSYCOPG2_NAME=psycopg2 pip install "dbt-postgres @ git+https://www.github.com/dbt-labs/dbt-postgres.git"
pip list

Notice that this installs psycopg2 as expected, and not psycopg2-binary. We suspect that this has something to do with how the hatch hook in hatch_build.py with a distribution instead of building from source.

Fixing this may also require and update to dbt-core-bundles to ensure bundles are building correctly.

@mikealfare mikealfare self-assigned this Apr 4, 2024
@mikealfare mikealfare changed the title [Regression] <title> [Regression] psycopg2 version conflict Apr 4, 2024
@mikealfare mikealfare removed the triage label Apr 4, 2024
@mikealfare mikealfare transferred this issue from dbt-labs/dbt-postgres Apr 4, 2024
@mikealfare mikealfare changed the title [Regression] psycopg2 version conflict [Regression] Installing psycopg2-binary instead of psycopg2 Apr 4, 2024
@mikealfare mikealfare linked a pull request Apr 4, 2024 that will close this issue
@mikealfare mikealfare transferred this issue from dbt-labs/dbt-core-bundles Apr 4, 2024
@mikealfare mikealfare reopened this Apr 12, 2024
@mikealfare
Copy link
Contributor Author

We need to update the bundle test to account for this. Re-opening to capture that work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant