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

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

Open
bctiemann opened this issue Jan 29, 2025 · 1 comment
Open

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

bctiemann opened this issue Jan 29, 2025 · 1 comment
Labels
status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application

Comments

@bctiemann
Copy link
Contributor

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

@jeremystretch
Copy link
Member

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants