Changelog retention defaults to 90 days after upgrade, all prior changelogs are lost. #8806

Closed
opened 2025-12-29 20:41:29 +01:00 by adam · 4 comments
Owner

Originally created by @julianstolp on GitHub (Nov 3, 2023).

Originally assigned to: @abhi1693 on GitHub.

NetBox version

v3.6.4

Python version

3.8

Steps to Reproduce

  1. Set the changelog retention days to other value than 90 days with a new configuration revision
  2. Do upgrade as described in documentation docs.netbox.dev
  3. Log in to your netbox instance and go to /extras/changelog and the changelog retention days have been defaulted to 90 days all prior logs are deleted.

Expected Behavior

The changelog retention days should not default back to 90 days after upgrade.

Observed Behavior

/core/config/
image

/extras/changelog/
image

/extras/config-revisions/add/
image

Originally created by @julianstolp on GitHub (Nov 3, 2023). Originally assigned to: @abhi1693 on GitHub. ### NetBox version v3.6.4 ### Python version 3.8 ### Steps to Reproduce 1. Set the changelog retention days to other value than 90 days with a new configuration revision 2. Do upgrade as described in documentation [docs.netbox.dev](https://docs.netbox.dev/en/stable/installation/upgrading/) 3. Log in to your netbox instance and go to /extras/changelog and the changelog retention days have been defaulted to 90 days all prior logs are deleted. ### Expected Behavior The changelog retention days should not default back to 90 days after upgrade. ### Observed Behavior /core/config/ ![image](https://github.com/netbox-community/netbox/assets/41152397/fe85280c-5690-451f-946a-1f3e0d4badc2) /extras/changelog/ ![image](https://github.com/netbox-community/netbox/assets/41152397/57e2d792-c913-4d4d-b309-3b6627af3c5b) /extras/config-revisions/add/ ![image](https://github.com/netbox-community/netbox/assets/41152397/da4b7d97-8797-422b-b9f4-22ba57373deb)
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 20:41:30 +01:00
adam closed this issue 2025-12-29 20:41:30 +01:00
Author
Owner

@abhi1693 commented on GitHub (Nov 3, 2023):

I think this is an issue with the config revision that defaults to the 1st revision after upgrade. This was also brought up at https://github.com/netbox-community/netbox/discussions/14178. I have not tested this myself and may require some changes to the redis cache checks to ensure the set revisions are not unset.

@abhi1693 commented on GitHub (Nov 3, 2023): I think this is an issue with the config revision that defaults to the 1st revision after upgrade. This was also brought up at https://github.com/netbox-community/netbox/discussions/14178. I have not tested this myself and may require some changes to the redis cache checks to ensure the set revisions are not unset.
Author
Owner

@julianstolp commented on GitHub (Nov 3, 2023):

@abhi1693 I can confirm that #14178 is actually the root cause for the behavior i have observed.

@julianstolp commented on GitHub (Nov 3, 2023): @abhi1693 I can confirm that #14178 is actually the root cause for the behavior i have observed.
Author
Owner

@abhi1693 commented on GitHub (Nov 9, 2023):

The issue is with the clearcache command that resets the config revisions.

@abhi1693 commented on GitHub (Nov 9, 2023): The issue is with the clearcache command that resets the config revisions.
Author
Owner

@jeremystretch commented on GitHub (Nov 9, 2023):

Rather than working around the specific cache entry, a more robust solution may be to move the designation of the active config version into the database. We could do this with a boolean column and a constraint limiting the table to a single true value.

I suppose this presents a problem when enabling maintenance mode, however.

@jeremystretch commented on GitHub (Nov 9, 2023): Rather than working around the specific cache entry, a more robust solution may be to move the designation of the active config version into the database. We could do this with a boolean column and a constraint limiting the table to a single true value. I suppose this presents a problem when enabling maintenance mode, however.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8806