Update upgrade.sh to support using uv #11277

Closed
opened 2025-12-29 21:42:46 +01:00 by adam · 1 comment
Owner

Originally created by @hblandford on GitHub (Jun 8, 2025).

NetBox version

v4.3.2

Feature type

New functionality

Proposed functionality

Update the upgrade.sh script to check for the presence of Astral's uv program. If found, it would use uv to create the virtual environment rather than pip.

I would appreciate some guidance on the following.
The default venv directory is /opt/netbox/venv. By default uv would use /opt/netbox/.venv.

I have originally done the work to keep using /opt/netbox/venv via an environment variable, but if using uv, would it be better/acceptable to use /opt/netbox/.venv. Not sure whether this would have any flow on effects to elsewhere in netbox.

If accepted, I am happy to take this on.

Use case

If uv is detected on the path of the user, it would us uv to create the virtual environment for the user rather than pip.

Database changes

NA

External dependencies

Does not require any external dependencies, will just use uv to manage the virtual environment if detected.

Originally created by @hblandford on GitHub (Jun 8, 2025). ### NetBox version v4.3.2 ### Feature type New functionality ### Proposed functionality Update the upgrade.sh script to check for the presence of Astral's uv program. If found, it would use uv to create the virtual environment rather than pip. I would appreciate some guidance on the following. The default venv directory is /opt/netbox/venv. By default uv would use /opt/netbox/.venv. I have originally done the work to keep using /opt/netbox/venv via an environment variable, but if using uv, would it be better/acceptable to use /opt/netbox/.venv. Not sure whether this would have any flow on effects to elsewhere in netbox. If accepted, I am happy to take this on. ### Use case If uv is detected on the path of the user, it would us uv to create the virtual environment for the user rather than pip. ### Database changes NA ### External dependencies Does not require any external dependencies, will just use uv to manage the virtual environment if detected.
adam added the type: feature label 2025-12-29 21:42:46 +01:00
adam closed this issue 2025-12-29 21:42:47 +01:00
Author
Owner

@jnovinger commented on GitHub (Jun 13, 2025):

Thanks for the request, @hblandford . However, as a project we only have so much bandwidth to maintain hosting implementation details like this and we have to choose carefully what to include. I'm going to convert this issue to a discussion, in case someone else in the community can provide some details to help you come up with a solution that works for you.

@jnovinger commented on GitHub (Jun 13, 2025): Thanks for the request, @hblandford . However, as a project we only have so much bandwidth to maintain hosting implementation details like this and we have to choose carefully what to include. I'm going to convert this issue to a discussion, in case someone else in the community can provide some details to help you come up with a solution that works for you.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11277