In debug mode (only); executing any ./manage.py command resets the current configuration revision to #1. #11352

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

Originally created by @mjpereira602 on GitHub (Jul 7, 2025).

Originally assigned to: @DanSheps on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.3.3 (also tested on 4.2.9)

Python Version

3.12

Steps to Reproduce

Deploy Netbox 4.3.3 with DEBUG enabled (statically in my case).
Go to System -> Configuration History page and add two configuration revisions.
Ensure config revision version #2 is active.
Execute 'manage.py --help'.
Reload Configuration History page and confirm current version reverted to #1.

Problem may be in core/apps.py line 45. Perhaps the clear.cache command needs to be gated in a similar manner as PR 14233 does for the (now defuct) manage.py clearcache command ?

I understand why clearing cache would be helpful in debug mode, but, the config_version variable seems like it should be an exception.

Expected Behavior

The configuration version should not be effected.

Observed Behavior

Configuration revision reverted to first version.

Originally created by @mjpereira602 on GitHub (Jul 7, 2025). Originally assigned to: @DanSheps on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.3.3 (also tested on 4.2.9) ### Python Version 3.12 ### Steps to Reproduce Deploy Netbox 4.3.3 with DEBUG enabled (statically in my case). Go to System -> Configuration History page and add two configuration revisions. Ensure config revision version #2 is active. Execute 'manage.py --help'. Reload Configuration History page and confirm current version reverted to #1. Problem may be in core/apps.py line 45. Perhaps the clear.cache command needs to be gated in a similar manner as PR 14233 does for the (now defuct) manage.py clearcache command ? I understand why clearing cache would be helpful in debug mode, but, the config_version variable seems like it should be an exception. ### Expected Behavior The configuration version should not be effected. ### Observed Behavior Configuration revision reverted to first version.
adam added the type: bugstatus: acceptedseverity: low labels 2025-12-29 21:44:04 +01:00
adam closed this issue 2025-12-29 21:44:04 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 26, 2025):

@DanSheps are you still working on this?

@jeremystretch commented on GitHub (Aug 26, 2025): @DanSheps are you still working on this?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11352