[PR #20219] [MERGED] Fixes: #19825 - Prevent cache for config revisions from being overwritten when in debug mode when not intended #15851

Closed
opened 2025-12-30 00:24:24 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/20219
Author: @DanSheps
Created: 9/1/2025
Status: Merged
Merged: 10/9/2025
Merged by: @jnovinger

Base: mainHead: 19825-fix-config-revision-revert-in-debug-mode


📝 Commits (10+)

  • 663f9a2 Fixes: #19825 - Prevent cache for config revisions from being overwritten when in debug mode when not intended
  • 9854c66 Set ordering on the ConfigRevision to ensure consistency and usage of latest config.
  • 42857b1 Add active field on ConfigRevision model.
  • dfff41b Update migration and arrange for activation changes
  • 0074199 Update migration and arrange for activation changes
  • 98986fb Merge remote-tracking branch 'origin/19825-fix-config-revision-revert-in-debug-mode' into 19825-fix-config-revision-revert-in-debug-mode
  • efa53e8 Merge branch 'main' of https://github.com/netbox-community/netbox into 19825-fix-config-revision-revert-in-debug-mode
  • 72845c9 Renumber mgiration
  • 3fb8e8f Correct error with activate
  • 2b738f4 Revise config initialization, remove unneeded cache setting, update migration logic and add comments

📊 Changes

3 files changed (+71 additions, -3 deletions)

View changed files

netbox/core/migrations/0019_configrevision_active.py (+48 -0)
📝 netbox/core/models/config.py (+16 -1)
📝 netbox/netbox/config/__init__.py (+7 -2)

📄 Description

Fixes: #19825 - Prevent cache for config revisions from being overwritten when in debug mode when not intended

  • Obtain the current config revision information
  • Reinitialize that information when app is restarted in debug mode

🔄 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/20219 **Author:** [@DanSheps](https://github.com/DanSheps) **Created:** 9/1/2025 **Status:** ✅ Merged **Merged:** 10/9/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `main` ← **Head:** `19825-fix-config-revision-revert-in-debug-mode` --- ### 📝 Commits (10+) - [`663f9a2`](https://github.com/netbox-community/netbox/commit/663f9a223dd04e272ebd8b0f44c6fcc997be36ed) Fixes: #19825 - Prevent cache for config revisions from being overwritten when in debug mode when not intended - [`9854c66`](https://github.com/netbox-community/netbox/commit/9854c6619445087cd2cd87cb5b86d3512a4672a8) Set ordering on the ConfigRevision to ensure consistency and usage of latest config. - [`42857b1`](https://github.com/netbox-community/netbox/commit/42857b15b270974c1f4046797c0bf6047b489204) Add active field on ConfigRevision model. - [`dfff41b`](https://github.com/netbox-community/netbox/commit/dfff41bea4f1b54a8c110470501d90789700e076) Update migration and arrange for activation changes - [`0074199`](https://github.com/netbox-community/netbox/commit/00741998450b5894c0980332dbcfe7c08b162f48) Update migration and arrange for activation changes - [`98986fb`](https://github.com/netbox-community/netbox/commit/98986fbf3094a6b10de60463c6478d67d3d465c8) Merge remote-tracking branch 'origin/19825-fix-config-revision-revert-in-debug-mode' into 19825-fix-config-revision-revert-in-debug-mode - [`efa53e8`](https://github.com/netbox-community/netbox/commit/efa53e85af87e7dede313a0444d82a789d3d1138) Merge branch 'main' of https://github.com/netbox-community/netbox into 19825-fix-config-revision-revert-in-debug-mode - [`72845c9`](https://github.com/netbox-community/netbox/commit/72845c9a6867d3f083535f97ccb7e85162b16543) Renumber mgiration - [`3fb8e8f`](https://github.com/netbox-community/netbox/commit/3fb8e8f2542c6aac3b71cba53c3b2c88a9a09a58) Correct error with activate - [`2b738f4`](https://github.com/netbox-community/netbox/commit/2b738f4129e39f4d097b3caa2086af345c5397dc) Revise config initialization, remove unneeded cache setting, update migration logic and add comments ### 📊 Changes **3 files changed** (+71 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `netbox/core/migrations/0019_configrevision_active.py` (+48 -0) 📝 `netbox/core/models/config.py` (+16 -1) 📝 `netbox/netbox/config/__init__.py` (+7 -2) </details> ### 📄 Description ### Fixes: #19825 - Prevent cache for config revisions from being overwritten when in debug mode when not intended * Obtain the current config revision information * Reinitialize that information when app is restarted in debug mode --- <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-30 00:24:24 +01:00
adam closed this issue 2025-12-30 00:24:24 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15851