Skip to content

fix(breeze): fix --only-suppressed crash in lm links - #171

Draft
rootkiller6788 wants to merge 1 commit into
facebook:mainfrom
rootkiller6788:fix/lm-only-suppressed-crash
Draft

fix(breeze): fix --only-suppressed crash in lm links#171
rootkiller6788 wants to merge 1 commit into
facebook:mainfrom
rootkiller6788:fix/lm-only-suppressed-crash

Conversation

@rootkiller6788

Copy link
Copy Markdown

Problem

breeze lm links --only-suppressed crashes with:

TypeError: 'DumpLinksReply' object is not callable

In LMLinksCmd._run (openr/py/openr/cli/commands/lm.py), the only_suppressed branch reassigns links = links(...), calling the DumpLinksReply instance as a function instead of constructing a new one.

Change

Construct a new DumpLinksReply with the filtered interfaceDetails, preserving thisNodeName, nodeMetricIncrementVal, and isOverloaded so the caption (node overload / metric increment) stays correct.

Why this is safe

  • Pure Python CLI change, no protocol/schema change.
  • The node-level fields are copied verbatim; only interfaceDetails is filtered to the suppressed (flapping) interfaces, matching the original intent of --only-suppressed.

Verification

  • Confirmed --only-suppressed is a real flag (openr/py/openr/cli/clis/lm.py) wired to LMLinksCmd.run(only_suppressed, json).
  • Confirmed DumpLinksReply is a thrift struct (openr/if/Types.thrift) whose instances are not callable.

LMLinksCmd._run called the DumpLinksReply instance as a function (links = links(...)), raising TypeError. Construct a new DumpLinksReply with the filtered interfaceDetails, preserving node-level fields used for the caption.
@meta-cla meta-cla Bot added the CLA Signed label Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant