Skip to content

Add context to bgpkit warning messages#274

Merged
digizeph merged 4 commits intobgpkit:mainfrom
ties:feature/context-to-warn-messages
Mar 31, 2026
Merged

Add context to bgpkit warning messages#274
digizeph merged 4 commits intobgpkit:mainfrom
ties:feature/context-to-warn-messages

Conversation

@ties
Copy link
Copy Markdown
Contributor

@ties ties commented Mar 31, 2026

When reading logs, lines like

WARN worker-13 mrt_file: not enough bytes: input bytes left - 3, want to read - 1024; skipping ^]]3mfile=./2025-11-05/rrc00/2025.11/updates.20251105.0600.gz
WARN worker-26 mrt_file: not enough bytes: input bytes left - 3, want to read - 1024; skipping ^]]3mfile=./2025-11-05/rrc15/2025.11/updates.20251105.0605.gz

Made me think the full file was skipped, while only the attributes for this message were skipped.

I think adding context to the warning messages clarifies them.

When reading logs, lines like
```
WARN worker-13 mrt_file: not enough bytes: input bytes left - 3, want to read - 1024; skipping ^]]3mfile=./2025-11-05/rrc00/2025.11/updates.20251105.0600.gz
WARN worker-26 mrt_file: not enough bytes: input bytes left - 3, want to read - 1024; skipping ^]]3mfile=./2025-11-05/rrc15/2025.11/updates.20251105.0605.gz
```
Made me think the full file was skipped, while only the attributes for
this message were skipped.

I think adding context to the warning messages clarifies them.
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 41.66667% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.70%. Comparing base (da6b8dd) to head (a2acfdb).

Files with missing lines Patch % Lines
src/parser/bgp/attributes/attr_14_15_nlri.rs 50.00% 2 Missing ⚠️
src/parser/bgp/messages.rs 0.00% 2 Missing ⚠️
src/parser/bmp/messages/headers.rs 0.00% 2 Missing ⚠️
...rser/mrt/messages/table_dump_v2/rib_afi_entries.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #274   +/-   ##
=======================================
  Coverage   90.70%   90.70%           
=======================================
  Files          84       84           
  Lines       15496    15496           
=======================================
  Hits        14056    14056           
  Misses       1440     1440           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@digizeph digizeph merged commit a16a543 into bgpkit:main Mar 31, 2026
8 checks passed
@ties ties deleted the feature/context-to-warn-messages branch April 1, 2026 06:39
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.

2 participants