Page MenuHomeVyOS Platform

op-mode: "show system commit diff N" prints nothing - catch_broken_pipe decorator discards return values (regression from T8362)
Closed, ResolvedPublicBUG

Description

show system commit diff <rev> produces no output (exit 0) for any revision, regardless of how much the revisions differ. The revision store and diff engine are intact — show system commit file <rev> works, and ConfigMgmt().compare(rev1=0, rev2=1) returns the correct diff when called directly.

Root cause: commit rVYOSONEXa29d73d007a9 (T8362) added @catch_broken_pipe to ConfigMgmt.show_commit_diff to suppress BrokenPipeError tracebacks when piping output, but the decorator (python/vyos/utils/io.py) calls the wrapped function without returning its value — so the op-mode framework receives None and prints nothing. The command worked before that commit.

Fix (verified on a live system via monkey-patch): return func(*args, **kwargs) in catch_broken_pipe. The same decorator wraps the /usr/bin/config-mgmt entry point and likely also explains config-mode compare <rev> <rev> printing nothing.

Details

Version
1.5, 1.4
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)