netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
16.26k stars 2.59k forks source link

Add a time-based "out of date" warning for NetBox releases #14766

Open jeremystretch opened 10 months ago

jeremystretch commented 10 months ago

NetBox version

v3.7.0

Feature type

New functionality

Proposed functionality

If the running NetBox version was released more than a certain number of days ago, display an alert on the web UI letting users (probably just administrators) know they should upgrade. This could be displayed at the top or bottom of the main page.

This could be accomplished by introducing a new OUTDATED_RELEASE_DAYS configuration parameter (name TBD) which defaults to perhaps 90 days. Setting this parameter to zero would disable the warning.

Note that the determination is being made by comparing the current date to the release date, as opposed to actively checking for the most recent release (which is also possible). To facilitate this, we would also need to encode the release data along with the version number in each release.

Use case

NetBox typically publishes a new patch release roughly every two weeks on average, yet we find that many users lag far behind the latest stable release when raising issues. This mechanism would provide a reminder to keep NetBox deployments up to date.

Admittedly, there's some overlap with the release checking feature mentioned above. However, this is a purely passive check whereas the former is actively querying for the latest release (and is disabled by default). The time-based warning would better suit deployments which have been isolated from the Internet for security reasons.

Database changes

None

External dependencies

None

ITJamie commented 10 months ago

For isolated instances, its likely the users browser will have public internet access so in-browser javascript could be used to attempt to pull the current release version from github or some other website, if thats also blocked then failing back to a time based alert would be a good path.

jeremystretch commented 6 months ago

Blocked by #15908