Skip to content

Use bgpkit-parser v0.20.0 upstream text dump module - #150

Merged
digizeph merged 1 commit into
mainfrom
chore/use-parser-text-dump
Aug 16, 2026
Merged

Use bgpkit-parser v0.20.0 upstream text dump module#150
digizeph merged 1 commit into
mainfrom
chore/use-parser-text-dump

Conversation

@digizeph

Copy link
Copy Markdown
Member

Summary

  • Bump bgpkit-parser 0.19.0 → 0.20.0 and replace Monocle's local 783-line Cisco sh ip bgp text dump implementation (src/lens/parse/text_dump.rs) with a re-export of the upstream bgpkit_parser::parser::text_dump module. All monocle::lens::parse::text_dump::* call sites keep working unchanged; the parser now carries the text dump test coverage (17 tests).
  • Adapt MRT export call sites (monocle parse, monocle search) to bgpkit-parser v0.20.0's fallible encoding API (upstream issue #313): export_bytes() returns Result<Bytes, EncodingError> and MrtRibEncoder::process_elem returns Result; encoding failures are reported instead of silently truncating.

Verification

  • cargo fmt clean; cargo clippy --all-features -- -D warnings clean (only pre-existing proc-macro-error2 future-incompat note)
  • cargo test --all-features: 304 tests passed (279 lib + 15 parse + 1 + 9), 0 failed, 29 ignored
  • End-to-end smoke: monocle parse on a synthetic PCH-style sh ip bgp dump produces correct BgpElem JSON (1.33.0.0/24, AS path [4657, 9318], router ID → peer_ip, local AS → peer_asn) via the re-export chain

Closes the follow-up from the v0.20.0 parser release: single text dump implementation, no fork.

Replace Monocle's 783-line local Cisco sh ip bgp implementation with a
re-export of bgpkit_parser::parser::text_dump. Public monocle paths are
unchanged; the parser now carries the text dump test coverage.

Adapt MRT export call sites to the fallible encoding API (issue #313):
export_bytes now returns Result<Bytes, EncodingError> and MrtRibEncoder
process_elem returns Result; encoding failures are reported instead of
silently truncating.
@digizeph
digizeph merged commit 6e9527d into main Aug 16, 2026
1 check passed
digizeph added a commit that referenced this pull request Aug 16, 2026
Fold the stranded route-views #145 bullet into New Features, move the
dev-dependency conflict fix to Bug Fixes, and add PR citations (#148,
#150) per the changelog conventions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant