[PR #4001] [MERGED] Fixes: #738: Automatically check for new versions #12723

Closed
opened 2025-12-29 22:23:16 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4001
Author: @steffann
Created: 1/24/2020
Status: Merged
Merged: 3/4/2020
Merged by: @jeremystretch

Base: 738-detect-new-releasesHead: 738-automatically-check-for-new-releases


📝 Commits (10+)

  • 2fcdc90 Automatically check for new versions
  • 405d93c Update versions.py
  • 9d66ac4 Refactor the code to be more readable
  • 008fc56 Full URL for API, more consistent naming, only enabled for staff and better configuration validation
  • 3a08496 Rename settings to be more generic, not GitHub-only
  • 8d92089 Improve comments and error message on invalid characters in URL
  • 0de7f47 Fix check for permissions
  • 22ac9f6 Don't overwrite the header block, append to it
  • 8ce106c Move request to background task
  • 28473fa Disable update check by default

📊 Changes

8 files changed (+322 additions, -2 deletions)

View changed files

📝 docs/configuration/optional-settings.md (+18 -0)
📝 netbox/netbox/configuration.example.py (+8 -0)
📝 netbox/netbox/settings.py (+29 -0)
netbox/netbox/tests/test_get_releases.py (+160 -0)
📝 netbox/netbox/views.py (+19 -2)
📝 netbox/templates/home.html (+13 -0)
netbox/utilities/background_tasks.py (+51 -0)
netbox/utilities/releases.py (+24 -0)

📄 Description

Fixes: #738

This fetches the latest release from the GitHub API and uses the now mandatory Redis cache to cache the result for 8 hours. Settings to change the URL, change the cache timeout or to disable the feature are provided.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/4001 **Author:** [@steffann](https://github.com/steffann) **Created:** 1/24/2020 **Status:** ✅ Merged **Merged:** 3/4/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `738-detect-new-releases` ← **Head:** `738-automatically-check-for-new-releases` --- ### 📝 Commits (10+) - [`2fcdc90`](https://github.com/netbox-community/netbox/commit/2fcdc90d3f8addfa05e873b2758560c3b92b9792) Automatically check for new versions - [`405d93c`](https://github.com/netbox-community/netbox/commit/405d93c6f272047c568f984941e09cbfb34fe1f3) Update versions.py - [`9d66ac4`](https://github.com/netbox-community/netbox/commit/9d66ac4a6a8cb6e65ba21549c50a71bc66881ae4) Refactor the code to be more readable - [`008fc56`](https://github.com/netbox-community/netbox/commit/008fc5623e692f57b282a9ee49a3fd2d8c74347e) Full URL for API, more consistent naming, only enabled for staff and better configuration validation - [`3a08496`](https://github.com/netbox-community/netbox/commit/3a0849699fac7003bd5c6b0b232e18c5b5c0c91a) Rename settings to be more generic, not GitHub-only - [`8d92089`](https://github.com/netbox-community/netbox/commit/8d92089487c8116edf4fdfb0aa825ce9c29e308a) Improve comments and error message on invalid characters in URL - [`0de7f47`](https://github.com/netbox-community/netbox/commit/0de7f4712f82ec27ccf48685570b984d1a987fad) Fix check for permissions - [`22ac9f6`](https://github.com/netbox-community/netbox/commit/22ac9f63a122bf16fcb58915a83823855152de27) Don't overwrite the header block, append to it - [`8ce106c`](https://github.com/netbox-community/netbox/commit/8ce106cb4b82eb7cd55c129868aa9e317d65dd16) Move request to background task - [`28473fa`](https://github.com/netbox-community/netbox/commit/28473fa3e0ec9acb3c975582cdeaf538415065bf) Disable update check by default ### 📊 Changes **8 files changed** (+322 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/configuration/optional-settings.md` (+18 -0) 📝 `netbox/netbox/configuration.example.py` (+8 -0) 📝 `netbox/netbox/settings.py` (+29 -0) ➕ `netbox/netbox/tests/test_get_releases.py` (+160 -0) 📝 `netbox/netbox/views.py` (+19 -2) 📝 `netbox/templates/home.html` (+13 -0) ➕ `netbox/utilities/background_tasks.py` (+51 -0) ➕ `netbox/utilities/releases.py` (+24 -0) </details> ### 📄 Description ### Fixes: #738 This fetches the latest release from the GitHub API and uses the now mandatory Redis cache to cache the result for 8 hours. Settings to change the URL, change the cache timeout or to disable the feature are provided. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:23:16 +01:00
adam closed this issue 2025-12-29 22:23:16 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12723