-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing change log Difference after upgrade to 2.11 for pre 2.11 changes #6493
Comments
We observe the same issue when testing upgrade from 2.10.10 to 2.11.3 This will definitively stop us in or tracks at the moment. |
This is working as intended. The changelog was overhauled in NetBox v2.11 to capture atomic changes as discussed in the release notes. You haven't lost any data by upgrading: The old change records are still there and can be inspected. The only thing missing is the delta automatically comparing a v2.10-format change record to its predecessor for convenience. Of course, this was often misleading anyway (hence the improvement in v2.11). |
Where in the WebUI can I see the old changelog data? |
The same place you're looking now. The changelog implementation prior to v2.11 did not capture pre-change data, only post-change data. You have to compare two pre-v2.11 change records to see the differences (which is all the UI was doing under v2.10). |
Ok, understand. Any chances this can be improved? |
As a fellow "retention = 0" believer, I agree this change is a bit jarring. I don't disagree that the old delta views were at times misleading or confusing, but having some thousands of changes that no longer have a delta view is confusing (to end users) as well. My suspicion is that it would be a couple of comparatively-simple updates to the view and template to get this behavior back for legacy changes, but I'm not sure if that's what the BDFL wants based on his earlier comments. 😄 |
I've marked this as |
I think a upgrade script which sets Pre-Change Data from the previous change record Post-Change Data would be better. |
@netsandbox we can't do that, because it's not strictly the same data as in post-v2.11, and would be a misrepresentation of the context in which the change is being viewed. |
I should expand on my comment above. Suppose, under v2.10, the following actions occur:
Under v2.10 and earlier, comparing the last change to the earlier change will show the change from step 2 as well. (This deficiency is why we overhauled change logging in v2.11.) If the same set of actions were to occur in v2.11, the changes from steps 1 and 3 will be shown atomically, each attributed to the appropriate user. We can't "fake" this for older changes, because it would attribute the change from step 2 to the user responsible for step 3 without acknowledging the caveat. |
A migration or script seems obvious, but it would clutter the database and make it difficult to know whether a record is atomic without adding another field. It makes sense to implement this in the UI. I would propose the following logic: if the ObjectChange contains post-change data but no pre-change data and a previous change exists, generate a diff between the post-change data and the previous change's post-change data. This effectively replicates the v2.10 logic for cases where it could be useful. On differentiating:
Thoughts? |
Yes, with an additional condition: do this only when dealing with an update or delete event; not create. (Though of course a create event should never have a preceding change record in the first place.) I think it's sufficient to just display a mild warning message when comparing to a previous change. Something along the lines of:
|
Sounds reasonable to me. I can give this a shot if you'd like. |
NetBox version
v2.11.4
Python version
3.8
Steps to Reproduce
Expected Behavior
Change log record should show the changes (Differences).
Observed Behavior
Change log record doesn't show the changes (Differences).
NetBox 2.10.10:
NetBox 2.11.4:
The text was updated successfully, but these errors were encountered: