Allow NetBox to start cleanly if incompatible plugins are present #10715

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

Originally created by @bctiemann on GitHub (Jan 30, 2025).

Originally assigned to: @bctiemann on GitHub.

NetBox version

v4.2.2

Feature type

Data model extension

Proposed functionality

Currently we raise an ImproperlyConfigured exception and refuse to start NetBox at all if any plugin has min_version or max_version specified such that the installed version of NetBox is outside the compatible range.

Proposal is to allow NetBox to recognize incompatible plugins at startup and skip loading them (while emitting an appropriate warning), rather than raising an exception.

This should probably be done with a custom exception type that inherits from ImproperlyConfigured so that these exceptions can be caught separately.

Use case

It is not always easy to upgrade plugins at the same time as a NetBox installation, or a plugin might not yet be updated to the current NetBox version; this often leads to support issues where plugins must be painstakingly removed from the local configuration during an upgrade. This change would make it possible for plugins' published compatibility ranges to be enforced through the invalid plugins simply being disabled rather than interfering with the overall application's startup.

Note that plugins will need to be more diligent about defining max_version and pinning it to the most recent NetBox release against which it has been tested.

Database changes

N/A

External dependencies

N/A

Originally created by @bctiemann on GitHub (Jan 30, 2025). Originally assigned to: @bctiemann on GitHub. ### NetBox version v4.2.2 ### Feature type Data model extension ### Proposed functionality Currently we raise an `ImproperlyConfigured` exception and refuse to start NetBox at all if any plugin has `min_version` or `max_version` specified such that the installed version of NetBox is outside the compatible range. Proposal is to allow NetBox to recognize incompatible plugins at startup and skip loading them (while emitting an appropriate warning), rather than raising an exception. This should probably be done with a custom exception type that inherits from `ImproperlyConfigured` so that these exceptions can be caught separately. ### Use case It is not always easy to upgrade plugins at the same time as a NetBox installation, or a plugin might not yet be updated to the current NetBox version; this often leads to support issues where plugins must be painstakingly removed from the local configuration during an upgrade. This change would make it possible for plugins' published compatibility ranges to be enforced through the invalid plugins simply being disabled rather than interfering with the overall application's startup. Note that plugins will need to be more diligent about defining `max_version` and pinning it to the most recent NetBox release against which it has been tested. ### Database changes N/A ### External dependencies N/A
adam added the status: acceptedtype: featurecomplexity: medium labels 2025-12-29 21:35:08 +01:00
adam closed this issue 2025-12-29 21:35:08 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jan 30, 2025):

This will require us to track which plugins have been successfully loaded (as opposed to just enabled in the configuration). I've opened #18540 to propose tracking active plugins in the application registry for this purpose.

@jeremystretch commented on GitHub (Jan 30, 2025): This will require us to track which plugins have been successfully loaded (as opposed to just enabled in the configuration). I've opened #18540 to propose tracking active plugins in the application registry for this purpose.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10715