Skip to content

[Regression] Forced psycopg2 dependency on Linux causes sudden build failures #96

Closed
@mateusz

Description

@mateusz

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

My existing build system now breaks due to introduction of hard psycopg2 dependency into pyproject.toml in 1.8.0 in #60 , which forces psycopg2 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

  1. On an existing psycopg2-binary setup, update dbt-postgres to 1.8.0.

Relevant log output

#0 21.05   ChefBuildError
#0 21.05 
#0 21.05   Backend subprocess exited when trying to invoke get_requires_for_build_wheel
#0 21.05   
#0 21.05   running egg_info
#0 21.05   writing psycopg2.egg-info/PKG-INFO
#0 21.05   writing dependency_links to psycopg2.egg-info/dependency_links.txt
#0 21.05   writing top-level names to psycopg2.egg-info/top_level.txt
#0 21.05   
#0 21.05   Error: pg_config executable not found.
#0 21.05   
#0 21.05   pg_config is required to build psycopg2 from source.  Please add the directory
#0 21.05   containing pg_config to the $PATH or specify the full executable path with the
#0 21.05   option:
#0 21.05   
#0 21.05       python setup.py build_ext --pg-config /path/to/pg_config build ...
#0 21.05   
#0 21.05   or with the pg_config option in 'setup.cfg'.
#0 21.05   
#0 21.05   If you prefer to avoid building psycopg2 from source, please install the PyPI
#0 21.05   'psycopg2-binary' package instead.
#0 21.05   
#0 21.05   For further information please check the 'doc/src/install.rst' file (also at
#0 21.05   <https://www.psycopg.org/docs/install.html>).

Environment

- OS: Mac
- Python: 3.9
- dbt-postgres (working version): 1.7.14
- dbt-postgres (regression version): 1.8.0

Additional Context

There is also a comment here from @andy-clapson challenging Linux=prod assumption.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions