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

psycopg[binary,pool] breaks s390x deployments #15193

Closed
vmorris opened this issue Feb 19, 2024 · 3 comments
Closed

psycopg[binary,pool] breaks s390x deployments #15193

vmorris opened this issue Feb 19, 2024 · 3 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation status: under review Further discussion is needed to determine this issue's scope and/or implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@vmorris
Copy link

vmorris commented Feb 19, 2024

Deployment Type

Self-hosted

NetBox Version

v3.7.2

Python Version

3.8

Steps to Reproduce

Hello, This change in the requirements to use the binary psycopg breaks my deployment on s390x.

https://github.com/netbox-community/netbox/blob/develop/requirements.txt#L28

I modified my installation to use just psycopg[pool]==3.1.18 and it is working okay.. Is there any way that you can detect the architecture and not use the binary if it's not available?

Thanks for the awesome product, I really love netbox!

Expected Behavior

Installation of netbox works on s390x without modification to requirements.txt.

Observed Behavior

psycopg binary is unavailable for s390x architecture.

@vmorris vmorris added the type: bug A confirmed report of unexpected behavior in the application label Feb 19, 2024
@jeremystretch
Copy link
Member

This change in the requirements to use the binary psycopg breaks my deployment on s390x.

It would help to explain what s390x is. I had to Google it.

This one took some digging. We switched to the binary package of psycopg2 waaay back in NetBox v2.3. According to #1899, this was done because the wheel packages were being renamed.

From what I can glean from pip's documentation, we might be able to replace

psycopg[binary,pool]==3.1.18

with

psycopg[pool]==3.1.18 --prefer-binary=psycopg

to install the binary package where it's available and fall back to the pure Python build where it's not. However, now I'm wondering if we should be using the C package instead.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Feb 20, 2024
@vmorris
Copy link
Author

vmorris commented Feb 20, 2024

It would help to explain what s390x is. I had to Google it.

Sorry! I'm too close to the problem, I know :D

I also wonder if the [c] option would be better.. I think this is similar to to what we had before, where we were building the psycopg2 binary every time.

@arthanson arthanson self-assigned this Mar 18, 2024
@arthanson arthanson added the status: accepted This issue has been accepted for implementation label Mar 18, 2024
@jeremystretch
Copy link
Member

We've switched to the compiled (C) package beginning with NetBox v4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: accepted This issue has been accepted for implementation status: under review Further discussion is needed to determine this issue's scope and/or implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

3 participants