a topology document silently loses every link when a port name needs the full resolver #1519
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1519
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Topology.connect()resolves port names with the weak copy inengine/iface-name.js(MikroTik rules only). A document whose links nameGigabitEthernet1/0/1throws atengine/topology.js:361, andfromJSONswallows the throw at:607-611with a comment that blames "port removed".Proved: a two-device document with links loads as 2 devices and 0 links, with no error, no warning and no output. The copy that does resolve the name is
engine/cli.js:232(exported at:14085).Why it matters: silent data loss on load. A saved document is not the document you get back, and the comment makes the loss look intentional.
Suggested fix: use the strong resolver in
connect(), and makefromJSONreport a link it could not resolve as a warning on the document rather than discarding it. A link that cannot be rebuilt is a fact about the file, not an absence.