-
Notifications
You must be signed in to change notification settings - Fork 12
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] Forced psycopg2 dependency on Linux causes sudden build failures #96
[Regression] Forced psycopg2 dependency on Linux causes sudden build failures #96
Comments
Is there a workaround that would let me force |
second this regression - this fix should be reverted and the use case handled differently.
|
I agree. I posted here: #93 If the use of dbt-postgres is only as a dependency of dbt-redshift, psycopg2 is not needed at all. My outstanding questions:
|
@mateusz @andy-clapson @padbk Thanks for opening the issue, and for the detailed writeups. I want to apologize for the surprise this caused. While this isn't a change in the functionality within Thanks @mikealfare for already responding over here: The previous behavior was to check an environment variable (
What you can do:
What we can look into doing:
Rejected mitigations:
|
Thank you for your in-depth answer and understanding. I had a quick look at providing optional deps via Philosophically speaking, 1.8.0 is already backwards-incompatible and so perhaps there is a case here to embrace this, explain to the community, and switch to the most pythonic approach that's best for the long run? |
To anyone that needs a working solution and doesn't care about using a bin version of Postgres connector. I have forked this repo and updated the readme with instructions so you can build your package. Here is the link: https://github.com/farovictor/dbt-postgres If you do not want to pull the fork you still can do it by yourself, pull official repo and do this:
dependencies = [
"psycopg2-binary>=2.9,<3.0",
... Remove any other psycopg2 definition in file, they are splited by platform. Just remove it and add the one above.
pip install hatch
hatch build
Be happy. |
To follow up here, after some more investigation and discussion, this is the approach we've landed on:
|
I think that's a reasonable compromise. Just out of interest, would use of |
@georgek Fair question. While
|
Is this a regression?
Current Behavior
My existing build system now breaks due to introduction of hard
psycopg2
dependency into pyproject.toml in 1.8.0 in #60 , which forcespsycopg2
compilation from source on Linux, which hasn't got the dependencies installed in my docker image, which breaks the build. My desired production setup is psycopg2-binary (for consistency), and I do not wish to build psycopg2 from source (because I don't want the dev dependencies).Expected/Previous Behavior
I expect a minor release to not break an existing build system, and I expect the same psycopg2 variant to be used across dev and prod for quality reasons (replicable build).
Steps To Reproduce
Relevant log output
Environment
Additional Context
There is also a comment here from @andy-clapson challenging Linux=prod assumption.
The text was updated successfully, but these errors were encountered: