Page MenuHomeVyOS Platform

Use a smarter file comparison in boolean test unsaved_commits()
Closed, ResolvedPublicBUG

Description

Though not a critical bug, the following is an annoyance: The boolean test unsaved_commits() uses Python's filecmp for comparison, which does not ignore discrepancies in whitespace. This can lead to false positives in corner cases, notably after first boot before initial save, due to minor differences in formatting when appending the component string. Though arguably all formatting should be consistent, certainly the file comparison should be smarter. Add a simple file comparison util function.

Note that this is unrelated to a false positive on exiting a config session after rollback-soft, which is an outstanding bug in legacy cli-shell-api. Here we only address the boolean test unsaved_commits, checked at reboot/poweroff, commit-confirm, and, after T7319, add system image.

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)